diff --git a/composer.json b/composer.json index ed0f2cbd5..f4e9f5da7 100644 --- a/composer.json +++ b/composer.json @@ -75,7 +75,8 @@ "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", - "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd" + "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 78121542a..6cbaa3761 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,8 +1,8 @@ +# see https://symfony.com/doc/current/reference/configuration/framework.html framework: secret: '%env(APP_SECRET)%' csrf_protection: true http_method_override: true - trusted_hosts: null # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support. @@ -11,17 +11,7 @@ framework: cookie_secure: auto cookie_samesite: lax - # When using the HTTP Cache, ESI allows to render page fragments separately - # and with different cache configurations for each fragment - # https://symfony.com/doc/current/http_cache/esi.html esi: true fragments: true - php_errors: log: true - - # The 'ide' option turns all of the file paths in an exception page - # into clickable links that open the given file using your favorite IDE. - # When 'ide' is set to null the file is opened in your web browser. - # See https://symfony.com/doc/current/reference/configuration/framework.html#ide - ide: null diff --git a/config/packages/prod/deprecations.yaml b/config/packages/prod/deprecations.yaml new file mode 100644 index 000000000..920a06197 --- /dev/null +++ b/config/packages/prod/deprecations.yaml @@ -0,0 +1,8 @@ +# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists +#monolog: +# channels: [deprecation] +# handlers: +# deprecation: +# type: stream +# channels: [deprecation] +# path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" diff --git a/config/packages/prod/monolog.yaml b/config/packages/prod/monolog.yaml index c8a16ec2b..bfe69c015 100644 --- a/config/packages/prod/monolog.yaml +++ b/config/packages/prod/monolog.yaml @@ -14,13 +14,3 @@ monolog: type: console process_psr_3_messages: false channels: ["!event", "!doctrine"] - - # Uncomment to log deprecations - #deprecation: - # type: stream - # path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log" - #deprecation_filter: - # type: filter - # handler: deprecation - # max_level: info - # channels: ["php"] diff --git a/config/packages/security.yaml b/config/packages/security.yaml index e8b2fd220..ea350f69b 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -52,7 +52,7 @@ security: # The name of the route to redirect to after logging out target: homepage - # Used to restrict access for large sections of your site + # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used access_control: # this is a catch-all for the admin area diff --git a/config/preload.php b/config/preload.php new file mode 100644 index 000000000..5ebcdb215 --- /dev/null +++ b/config/preload.php @@ -0,0 +1,5 @@ +import('../config/{packages}/*.yaml'); $container->import('../config/{packages}/'.$this->environment.'/*.yaml'); - $container->import('../config/{services}.yaml'); - $container->import('../config/{services}_'.$this->environment.'.yaml'); + + if (is_file(\dirname(__DIR__).'/config/services.yaml')) { + $container->import('../config/services.yaml'); + $container->import('../config/{services}_'.$this->environment.'.yaml'); + } elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) { + (require $path)($container->withPath($path), $this); + } } protected function configureRoutes(RoutingConfigurator $routes): void { $routes->import('../config/{routes}/'.$this->environment.'/*.yaml'); $routes->import('../config/{routes}/*.yaml'); - $routes->import('../config/{routes}.yaml'); + + if (is_file(\dirname(__DIR__).'/config/routes.yaml')) { + $routes->import('../config/routes.yaml'); + } elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) { + (require $path)($routes->withPath($path), $this); + } } } diff --git a/symfony.lock b/symfony.lock index 34a9017d3..3398f7953 100644 --- a/symfony.lock +++ b/symfony.lock @@ -68,23 +68,23 @@ "repo": "github.com/symfony/recipes", "branch": "master", "version": "3.0", - "ref": "fc52d86631a6dfd9fdf3381d0b7e3df2069e51b3" + "ref": "e5b542d4ef47d8a003c91beb35650c76907f7e53" }, "files": [ "src/DataFixtures/AppFixtures.php" ] }, "doctrine/doctrine-migrations-bundle": { - "version": "1.2", + "version": "2.2", "recipe": { "repo": "github.com/symfony/recipes", "branch": "master", - "version": "1.2", - "ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1" + "version": "2.2", + "ref": "baaa439e3e3179e69e3da84b671f0a3e4a2f56ad" }, "files": [ "config/packages/doctrine_migrations.yaml", - "src/Migrations/.gitignore" + "migrations/.gitignore" ] }, "doctrine/event-manager": { @@ -285,12 +285,13 @@ "repo": "github.com/symfony/recipes", "branch": "master", "version": "5.1", - "ref": "37b4ec59eda3eb89705f21a0da7231862495ce0a" + "ref": "6ee1194b036378b21884e7f57b6a2ac721167f16" }, "files": [ "config/packages/cache.yaml", "config/packages/framework.yaml", "config/packages/test/framework.yaml", + "config/preload.php", "config/routes/dev/framework.yaml", "config/services.yaml", "public/index.php", @@ -343,10 +344,11 @@ "repo": "github.com/symfony/recipes", "branch": "master", "version": "3.3", - "ref": "a89f4cd8a232563707418eea6c2da36acd36a917" + "ref": "d7249f7d560f6736115eee1851d02a65826f0a56" }, "files": [ "config/packages/dev/monolog.yaml", + "config/packages/prod/deprecations.yaml", "config/packages/prod/monolog.yaml", "config/packages/test/monolog.yaml" ] @@ -420,12 +422,12 @@ ] }, "symfony/security-bundle": { - "version": "4.4", + "version": "5.1", "recipe": { "repo": "github.com/symfony/recipes", "branch": "master", - "version": "4.4", - "ref": "7b4408dc203049666fe23fabed23cbadc6d8440f" + "version": "5.1", + "ref": "0a4bae19389d3b9cba1ca0102e3b2bccea724603" }, "files": [ "config/packages/security.yaml"