Commit 99676c01 authored by notebook's avatar notebook
Browse files

Merge origin/master into skuska

Conflicts:
	composer.lock
	config/packages/security.yaml
	src/Controller/Admin/DashboardController.php
	symfony.lock
parent 25e27c12
# Based on http://stackoverflow.com/questions/17313023/symfony-2-2-1-url-rewrite-issue
# Modified to use index.php as per symfony >= 4.0 installer
# Use the front controller as index file. It serves as fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# startpage (path "/") because otherwise Apache will apply the rewritting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ public [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^public/
RewriteRule ^(.*)$ public/$1
RewriteEngine On
# Redirect to URI without front controller to prevent duplicate content
# (with and without `/index.php`). Only do this redirect on the initial
# rewrite by Apache and not on subsequent cycles. Otherwise we would get an
# endless redirect loop (request -> rewrite to front controller ->
# redirect -> request -> ...).
# So in case you get a "too many redirects" error or you always get redirected
# to the startpage because your Apache does not expose the REDIRECT_STATUS
# environment variable, you have 2 choices:
# - disable this feature by commenting the following 2 lines or
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
# following RewriteCond (best solution)
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
# cache-bust assets url rewrite
# Example format: /cpv-10/js/test123.js -> /js/test123.js
# This allows us to change the asset version and "bust" intermediate caches (like varnish)
# See http://symfony.com/doc/current/reference/configuration/framework.html#ref-framework-assets-version
# See http://symfony.com/doc/current/reference/configuration/framework.html#assets-version-format
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^cpv-\d+\/(.+)$ $1 [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ index.php [QSA,L]
# The following rewrites all other queries to the front controller. The
# condition ensures that if you are using Apache aliases to do mass virtual
# hosting, the base path will be prepended to allow proper resolution of the
# index.php file; it will work in non-aliased environments as well, providing
# a safe, one-size fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule .? %{ENV:BASE}index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
# When mod_rewrite is not available, we instruct a temporary redirect of
# the startpage to the front controller explicitly so that the website
# and the generated links can still be used.
RedirectMatch 302 ^/$ /index.php/
# RedirectTemp cannot be used instead
</IfModule>
</IfModule>
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "74f6d3a4cc579a5adbad4667a2b03dbf",
"content-hash": "6127dffb686a91acb01740e9be75fe2d",
"packages": [
{
"name": "composer/package-versions-deprecated",
......@@ -1394,6 +1394,101 @@
},
"time": "2020-07-30T16:57:33+00:00"
},
{
"name": "easycorp/easyadmin-bundle",
"version": "v3.2.7",
"source": {
"type": "git",
"url": "https://github.com/EasyCorp/EasyAdminBundle.git",
"reference": "48f71e3c95a5b1afffd99e5cee350f313dad4038"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/48f71e3c95a5b1afffd99e5cee350f313dad4038",
"reference": "48f71e3c95a5b1afffd99e5cee350f313dad4038",
"shasum": ""
},
"require": {
"doctrine/common": "^2.13 || ^3.0",
"doctrine/dbal": "^2.10",
"doctrine/doctrine-bundle": "^1.12|^2.0",
"doctrine/orm": "^2.6,>=2.6.3",
"doctrine/persistence": "^1.3.3 || ^2.0",
"ext-json": "*",
"nikic/php-parser": "^4.3",
"php": ">=7.2.5",
"symfony/asset": "^4.4|^5.0",
"symfony/cache": "^4.4|^5.0",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/deprecation-contracts": "^2.0",
"symfony/event-dispatcher": "^4.4|^5.0",
"symfony/filesystem": "^4.4|^5.0",
"symfony/form": "^4.4|^5.0",
"symfony/framework-bundle": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/http-kernel": "^4.4|^5.0",
"symfony/intl": "^4.4|^5.0",
"symfony/polyfill-php73": "^1.13",
"symfony/property-access": "^4.4|^5.0",
"symfony/security-bundle": "^4.4|^5.0",
"symfony/string": "^5.0",
"symfony/translation": "^4.4|^5.0",
"symfony/twig-bundle": "^4.4|^5.0",
"symfony/uid": "^5.1"
},
"conflict": {
"doctrine/dbal": "<2.10"
},
"require-dev": {
"dama/doctrine-test-bundle": "^6.4",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"psr/log": "~1.0",
"symfony/browser-kit": "^4.4|^5.0",
"symfony/css-selector": "^4.4|^5.0",
"symfony/dom-crawler": "^4.4|^5.0",
"symfony/phpunit-bridge": "^4.4|^5.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"autoload": {
"psr-4": {
"EasyCorp\\Bundle\\EasyAdminBundle\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Project Contributors",
"homepage": "https://github.com/EasyCorp/EasyAdminBundle/graphs/contributors"
}
],
"description": "Admin generator for Symfony applications",
"homepage": "https://github.com/EasyCorp/EasyAdminBundle",
"keywords": [
"admin",
"backend",
"generator"
],
"support": {
"issues": "https://github.com/EasyCorp/EasyAdminBundle/issues",
"source": "https://github.com/EasyCorp/EasyAdminBundle/tree/v3.2.7"
},
"funding": [
{
"url": "https://github.com/javiereguiluz",
"type": "github"
}
],
"time": "2021-02-16T19:28:41+00:00"
},
{
"name": "egulias/email-validator",
"version": "2.1.25",
......@@ -1839,6 +1934,62 @@
],
"time": "2020-12-14T13:15:25+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.10.4",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
},
"time": "2020-12-20T10:01:03+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.2.0",
......@@ -5391,6 +5542,85 @@
],
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-uuid",
"version": "v1.22.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-uuid.git",
"reference": "9773608c15d3fe6ba2b6456a124777a7b8ffee2a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/9773608c15d3fe6ba2b6456a124777a7b8ffee2a",
"reference": "9773608c15d3fe6ba2b6456a124777a7b8ffee2a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-uuid": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Uuid\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Pineau",
"email": "lyrixx@lyrixx.info"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for uuid functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"uuid"
],
"support": {
"source": "https://github.com/symfony/polyfill-uuid/tree/v1.22.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-01-22T09:19:47+00:00"
},
{
"name": "symfony/process",
"version": "v5.2.4",
......@@ -6598,16 +6828,16 @@
},
{
"name": "symfony/translation",
"version": "v5.2.4",
"version": "v5.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "74b0353ab34ff4cca827a2cf909e325d96815e60"
"reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/74b0353ab34ff4cca827a2cf909e325d96815e60",
"reference": "74b0353ab34ff4cca827a2cf909e325d96815e60",
"url": "https://api.github.com/repos/symfony/translation/zipball/0947ab1e3aabd22a6bef393874b2555d2bb976da",
"reference": "0947ab1e3aabd22a6bef393874b2555d2bb976da",
"shasum": ""
},
"require": {
......@@ -6671,7 +6901,7 @@
"description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/translation/tree/v5.2.4"
"source": "https://github.com/symfony/translation/tree/v5.2.5"
},
"funding": [
{
......@@ -6687,7 +6917,7 @@
"type": "tidelift"
}
],
"time": "2021-03-04T15:41:09+00:00"
"time": "2021-03-06T07:59:01+00:00"
},
{
"name": "symfony/translation-contracts",
......@@ -6974,6 +7204,76 @@
],
"time": "2021-01-27T10:15:41+00:00"
},
{
"name": "symfony/uid",
"version": "v5.2.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/uid.git",
"reference": "959f69a8c0d68a37311eeabd630a0ef0979bc1d0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/uid/zipball/959f69a8c0d68a37311eeabd630a0ef0979bc1d0",
"reference": "959f69a8c0d68a37311eeabd630a0ef0979bc1d0",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-uuid": "^1.15"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Uid\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Pineau",
"email": "lyrixx@lyrixx.info"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides an object-oriented API to generate and represent UIDs",
"homepage": "https://symfony.com",
"keywords": [
"UID",
"uuid"
],
"support": {
"source": "https://github.com/symfony/uid/tree/v5.2.4"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-01-27T20:50:00+00:00"
},
{
"name": "symfony/validator",
"version": "v5.2.4",
......@@ -7622,62 +7922,6 @@
}
],
"packages-dev": [
{
"name": "nikic/php-parser",
"version": "v4.10.4",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4"
},
"time": "2020-12-20T10:01:03+00:00"
},
{
"name": "symfony/browser-kit",
"version": "v5.2.4",
......
......@@ -13,4 +13,5 @@ return [
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true],
];
framework:
default_locale: en
default_locale: sk
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- en
fallbacks: [ "en" ]
......@@ -4,6 +4,3 @@ administration:
defaults:
template: administration/index.html.twig
articles:
resource: App\Controller\ArticleController
type: annotation
\ No newline at end of file
......@@ -4,13 +4,13 @@
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: 'en'
default_article_url: 'uvod' # URL výchozího článku
locale: 'sk'
default_article_url: 'uvod' #
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
autowire: true
autoconfigure: true
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
......
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210318165852 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE article (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, content LONGTEXT NOT NULL, url VARCHAR(255) NOT NULL, description VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE article');
}
}
<?php
namespace App\Controller\Admin;
use App\Entity\AddressLang;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
class AddressLang2CrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return AddressLang::class;
}
/*
public function configureFields(string $pageName): iterable
{
return [
IdField::new('id'),
TextField::new('title'),
TextEditorField::new('description'),
];
}
*/
}
<?php
namespace App\Controller\Admin;
use App\Entity\AddressLang;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
class AddressLangCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return AddressLang::class;
}
/*
public function configureFields(string $pageName): iterable
{
return [
IdField::new('id'),
TextField::new('title'),
TextEditorField::new('description'),
];
}