#1: Switch Config to PHP
Some checks are pending
Quality Check / Check (push) Waiting to run
Some checks are pending
Quality Check / Check (push) Waiting to run
This commit is contained in:
parent
a5f1725109
commit
a9f6e950fc
38 changed files with 1270 additions and 1056 deletions
2
app/.env
2
app/.env
|
@ -6,3 +6,5 @@ APP_SECRET=3a451032bf2c8c9a639dfb642ce825d0
|
||||||
###> doctrine/doctrine-bundle ###
|
###> doctrine/doctrine-bundle ###
|
||||||
DATABASE_URL="mysql://root:empty@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
DATABASE_URL="mysql://root:empty@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
||||||
###< doctrine/doctrine-bundle ###
|
###< doctrine/doctrine-bundle ###
|
||||||
|
|
||||||
|
TEST_TOKEN=
|
|
@ -10,23 +10,24 @@
|
||||||
"doctrine/doctrine-bundle": "^2.12",
|
"doctrine/doctrine-bundle": "^2.12",
|
||||||
"doctrine/doctrine-migrations-bundle": "^3.3",
|
"doctrine/doctrine-migrations-bundle": "^3.3",
|
||||||
"doctrine/orm": "^3.0",
|
"doctrine/orm": "^3.0",
|
||||||
"symfony/asset": "6.3.*",
|
"symfony/asset": "6.4.*",
|
||||||
"symfony/console": "6.3.*",
|
"symfony/console": "6.4.*",
|
||||||
"symfony/dotenv": "6.3.*",
|
"symfony/dotenv": "6.4.*",
|
||||||
"symfony/flex": "^2",
|
"symfony/flex": "^2",
|
||||||
"symfony/form": "6.3.*",
|
"symfony/form": "6.4.*",
|
||||||
"symfony/framework-bundle": "6.3.*",
|
"symfony/framework-bundle": "6.4.*",
|
||||||
"symfony/monolog-bundle": "^3.10",
|
"symfony/monolog-bundle": "^3.10",
|
||||||
"symfony/runtime": "6.3.*",
|
"symfony/runtime": "6.4.*",
|
||||||
"symfony/stimulus-bundle": "^2.12",
|
"symfony/stimulus-bundle": "^2.12",
|
||||||
"symfony/stopwatch": "6.3.*",
|
"symfony/stopwatch": "6.4.*",
|
||||||
"symfony/twig-bundle": "6.3.*",
|
"symfony/twig-bundle": "6.4.*",
|
||||||
"symfony/uid": "6.3.*",
|
"symfony/uid": "6.4.*",
|
||||||
"symfony/validator": "6.3.*",
|
"symfony/validator": "6.4.*",
|
||||||
"symfony/webpack-encore-bundle": "^2.1",
|
"symfony/webpack-encore-bundle": "^2.1",
|
||||||
"symfony/yaml": "6.3.*",
|
"symfony/yaml": "6.4.*",
|
||||||
"twig/extra-bundle": "^2.12|^3.0",
|
"twig/extra-bundle": "^2.12|^3.0",
|
||||||
"twig/twig": "^2.12|^3.0"
|
"twig/twig": "^2.12|^3.0",
|
||||||
|
"webmozart/assert": "*"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
|
@ -44,7 +45,8 @@
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\Tests\\": "tests/"
|
"App\\Tests\\": "tests/",
|
||||||
|
"DoctrineFixtures\\": "fixtures/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
|
@ -74,7 +76,7 @@
|
||||||
"extra": {
|
"extra": {
|
||||||
"symfony": {
|
"symfony": {
|
||||||
"allow-contrib": false,
|
"allow-contrib": false,
|
||||||
"require": "6.3.*"
|
"require": "6.4.*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
@ -85,11 +87,11 @@
|
||||||
"phpstan/phpstan": "^1.10",
|
"phpstan/phpstan": "^1.10",
|
||||||
"phpstan/phpstan-phpunit": "^1.3",
|
"phpstan/phpstan-phpunit": "^1.3",
|
||||||
"phpunit/phpunit": "^9.6",
|
"phpunit/phpunit": "^9.6",
|
||||||
"symfony/browser-kit": "6.3.*",
|
"symfony/browser-kit": "6.4.*",
|
||||||
"symfony/css-selector": "6.3.*",
|
"symfony/css-selector": "6.4.*",
|
||||||
"symfony/debug-bundle": "6.3.*",
|
"symfony/debug-bundle": "6.4.*",
|
||||||
"symfony/phpunit-bridge": "^7.0",
|
"symfony/phpunit-bridge": "^7.0",
|
||||||
"symfony/web-profiler-bundle": "6.3.*",
|
"symfony/web-profiler-bundle": "6.4.*",
|
||||||
"vincentlanglet/twig-cs-fixer": "^2.4"
|
"vincentlanglet/twig-cs-fixer": "^2.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1653
app/composer.lock
generated
1653
app/composer.lock
generated
File diff suppressed because it is too large
Load diff
11
app/config/packages/cache.php
Normal file
11
app/config/packages/cache.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'cache' => null,
|
||||||
|
]);
|
||||||
|
};
|
|
@ -1,2 +0,0 @@
|
||||||
framework:
|
|
||||||
cache:
|
|
15
app/config/packages/dama_doctrine_test_bundle.php
Normal file
15
app/config/packages/dama_doctrine_test_bundle.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('dama_doctrine_test', [
|
||||||
|
'enable_static_connection' => true,
|
||||||
|
'enable_static_meta_data_cache' => true,
|
||||||
|
'enable_static_query_cache' => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,5 +0,0 @@
|
||||||
when@test:
|
|
||||||
dama_doctrine_test:
|
|
||||||
enable_static_connection: true
|
|
||||||
enable_static_meta_data_cache: true
|
|
||||||
enable_static_query_cache: true
|
|
13
app/config/packages/debug.php
Normal file
13
app/config/packages/debug.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
if ($containerConfigurator->env() === 'dev') {
|
||||||
|
$containerConfigurator->extension('debug', [
|
||||||
|
'dump_destination' => 'tcp://%env(VAR_DUMPER_SERVER)%',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,3 +0,0 @@
|
||||||
when@dev:
|
|
||||||
debug:
|
|
||||||
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
|
|
71
app/config/packages/doctrine.php
Normal file
71
app/config/packages/doctrine.php
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('doctrine', [
|
||||||
|
'dbal' => [
|
||||||
|
'url' => '%env(resolve:DATABASE_URL)%',
|
||||||
|
'profiling_collect_backtrace' => '%kernel.debug%',
|
||||||
|
],
|
||||||
|
'orm' => [
|
||||||
|
'auto_generate_proxy_classes' => true,
|
||||||
|
'enable_lazy_ghost_objects' => true,
|
||||||
|
'report_fields_where_declared' => true,
|
||||||
|
'validate_xml_mapping' => true,
|
||||||
|
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',
|
||||||
|
'auto_mapping' => true,
|
||||||
|
'mappings' => [
|
||||||
|
'App' => [
|
||||||
|
'type' => 'attribute',
|
||||||
|
'is_bundle' => false,
|
||||||
|
'dir' => '%kernel.project_dir%/src',
|
||||||
|
'prefix' => 'App',
|
||||||
|
'alias' => 'App',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('doctrine', [
|
||||||
|
'dbal' => [
|
||||||
|
'connections' => [
|
||||||
|
'default' => [
|
||||||
|
'dbname_suffix' => '%env(TEST_TOKEN)%',
|
||||||
|
'use_savepoints' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if ($containerConfigurator->env() === 'prod') {
|
||||||
|
$containerConfigurator->extension('doctrine', [
|
||||||
|
'orm' => [
|
||||||
|
'auto_generate_proxy_classes' => false,
|
||||||
|
'proxy_dir' => '%kernel.build_dir%/doctrine/orm/Proxies',
|
||||||
|
'query_cache_driver' => [
|
||||||
|
'type' => 'pool',
|
||||||
|
'pool' => 'doctrine.system_cache_pool',
|
||||||
|
],
|
||||||
|
'result_cache_driver' => [
|
||||||
|
'type' => 'pool',
|
||||||
|
'pool' => 'doctrine.result_cache_pool',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'cache' => [
|
||||||
|
'pools' => [
|
||||||
|
'doctrine.result_cache_pool' => [
|
||||||
|
'adapter' => 'cache.app',
|
||||||
|
],
|
||||||
|
'doctrine.system_cache_pool' => [
|
||||||
|
'adapter' => 'cache.system',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,46 +0,0 @@
|
||||||
doctrine:
|
|
||||||
dbal:
|
|
||||||
url: '%env(resolve:DATABASE_URL)%'
|
|
||||||
profiling_collect_backtrace: '%kernel.debug%'
|
|
||||||
orm:
|
|
||||||
auto_generate_proxy_classes: true
|
|
||||||
enable_lazy_ghost_objects: true
|
|
||||||
report_fields_where_declared: true
|
|
||||||
validate_xml_mapping: true
|
|
||||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
|
||||||
auto_mapping: true
|
|
||||||
mappings:
|
|
||||||
App:
|
|
||||||
type: attribute
|
|
||||||
is_bundle: false
|
|
||||||
dir: '%kernel.project_dir%/src'
|
|
||||||
prefix: 'App'
|
|
||||||
alias: App
|
|
||||||
|
|
||||||
when@test:
|
|
||||||
doctrine:
|
|
||||||
dbal:
|
|
||||||
connections:
|
|
||||||
default:
|
|
||||||
dbname_suffix: '%env(TEST_TOKEN)%'
|
|
||||||
use_savepoints: true
|
|
||||||
|
|
||||||
when@prod:
|
|
||||||
doctrine:
|
|
||||||
orm:
|
|
||||||
auto_generate_proxy_classes: false
|
|
||||||
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
|
||||||
query_cache_driver:
|
|
||||||
type: pool
|
|
||||||
pool: doctrine.system_cache_pool
|
|
||||||
result_cache_driver:
|
|
||||||
type: pool
|
|
||||||
pool: doctrine.result_cache_pool
|
|
||||||
|
|
||||||
framework:
|
|
||||||
cache:
|
|
||||||
pools:
|
|
||||||
doctrine.result_cache_pool:
|
|
||||||
adapter: cache.app
|
|
||||||
doctrine.system_cache_pool:
|
|
||||||
adapter: cache.system
|
|
14
app/config/packages/doctrine_migrations.php
Normal file
14
app/config/packages/doctrine_migrations.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('doctrine_migrations', [
|
||||||
|
'migrations_paths' => [
|
||||||
|
'DoctrineMigrations' => '%kernel.project_dir%/migrations',
|
||||||
|
],
|
||||||
|
'enable_profiler' => false,
|
||||||
|
]);
|
||||||
|
};
|
|
@ -1,4 +0,0 @@
|
||||||
doctrine_migrations:
|
|
||||||
migrations_paths:
|
|
||||||
'DoctrineMigrations': '%kernel.project_dir%/migrations'
|
|
||||||
enable_profiler: false
|
|
37
app/config/packages/framework.php
Normal file
37
app/config/packages/framework.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'secret' => '%env(APP_SECRET)%',
|
||||||
|
'http_method_override' => false,
|
||||||
|
'handle_all_throwables' => true,
|
||||||
|
'session' => [
|
||||||
|
'handler_id' => null,
|
||||||
|
'cookie_secure' => 'auto',
|
||||||
|
'cookie_samesite' => 'lax',
|
||||||
|
'storage_factory_id' => 'session.storage.factory.native',
|
||||||
|
],
|
||||||
|
'php_errors' => [
|
||||||
|
'log' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'test' => true,
|
||||||
|
'session' => [
|
||||||
|
'storage_factory_id' => 'session.storage.factory.mock_file',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if ($containerConfigurator->env() === 'prod') {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'session' => [
|
||||||
|
'handler_id' => 'file://%kernel_project_dir%/var/sessions',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,24 +0,0 @@
|
||||||
framework:
|
|
||||||
secret: '%env(APP_SECRET)%'
|
|
||||||
http_method_override: false
|
|
||||||
handle_all_throwables: true
|
|
||||||
|
|
||||||
session:
|
|
||||||
handler_id: null
|
|
||||||
cookie_secure: auto
|
|
||||||
cookie_samesite: lax
|
|
||||||
storage_factory_id: session.storage.factory.native
|
|
||||||
|
|
||||||
php_errors:
|
|
||||||
log: true
|
|
||||||
|
|
||||||
when@test:
|
|
||||||
framework:
|
|
||||||
test: true
|
|
||||||
session:
|
|
||||||
storage_factory_id: session.storage.factory.mock_file
|
|
||||||
|
|
||||||
when@prod:
|
|
||||||
framework:
|
|
||||||
session:
|
|
||||||
handler_id: 'file://%kernel_project_dir%/var/sessions'
|
|
96
app/config/packages/monolog.php
Normal file
96
app/config/packages/monolog.php
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('monolog', [
|
||||||
|
'channels' => [
|
||||||
|
'deprecation',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($containerConfigurator->env() === 'dev') {
|
||||||
|
$containerConfigurator->extension('monolog', [
|
||||||
|
'handlers' => [
|
||||||
|
'main' => [
|
||||||
|
'type' => 'stream',
|
||||||
|
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||||
|
'level' => 'debug',
|
||||||
|
'channels' => [
|
||||||
|
'!event',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'console' => [
|
||||||
|
'type' => 'console',
|
||||||
|
'process_psr_3_messages' => false,
|
||||||
|
'channels' => [
|
||||||
|
'!event',
|
||||||
|
'!doctrine',
|
||||||
|
'!console',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('monolog', [
|
||||||
|
'handlers' => [
|
||||||
|
'main' => [
|
||||||
|
'type' => 'fingers_crossed',
|
||||||
|
'action_level' => 'error',
|
||||||
|
'handler' => 'nested',
|
||||||
|
'excluded_http_codes' => [
|
||||||
|
404,
|
||||||
|
405,
|
||||||
|
],
|
||||||
|
'channels' => [
|
||||||
|
'!event',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'nested' => [
|
||||||
|
'type' => 'stream',
|
||||||
|
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||||
|
'level' => 'debug',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if ($containerConfigurator->env() === 'prod') {
|
||||||
|
$containerConfigurator->extension('monolog', [
|
||||||
|
'handlers' => [
|
||||||
|
'main' => [
|
||||||
|
'type' => 'fingers_crossed',
|
||||||
|
'action_level' => 'error',
|
||||||
|
'handler' => 'nested',
|
||||||
|
'excluded_http_codes' => [
|
||||||
|
404,
|
||||||
|
405,
|
||||||
|
],
|
||||||
|
'buffer_size' => 50,
|
||||||
|
],
|
||||||
|
'nested' => [
|
||||||
|
'type' => 'stream',
|
||||||
|
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||||
|
'level' => 'debug',
|
||||||
|
'formatter' => 'monolog.formatter.json',
|
||||||
|
],
|
||||||
|
'console' => [
|
||||||
|
'type' => 'console',
|
||||||
|
'process_psr_3_messages' => false,
|
||||||
|
'channels' => [
|
||||||
|
'!event',
|
||||||
|
'!doctrine',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'deprecation' => [
|
||||||
|
'type' => 'stream',
|
||||||
|
'channels' => [
|
||||||
|
'deprecation',
|
||||||
|
],
|
||||||
|
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,53 +0,0 @@
|
||||||
monolog:
|
|
||||||
channels:
|
|
||||||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
|
||||||
|
|
||||||
when@dev:
|
|
||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
||||||
channels: ["!event"]
|
|
||||||
console:
|
|
||||||
type: console
|
|
||||||
process_psr_3_messages: false
|
|
||||||
channels: ["!event", "!doctrine", "!console"]
|
|
||||||
|
|
||||||
when@test:
|
|
||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: fingers_crossed
|
|
||||||
action_level: error
|
|
||||||
handler: nested
|
|
||||||
excluded_http_codes: [404, 405]
|
|
||||||
channels: ["!event"]
|
|
||||||
nested:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
||||||
|
|
||||||
when@prod:
|
|
||||||
monolog:
|
|
||||||
handlers:
|
|
||||||
main:
|
|
||||||
type: fingers_crossed
|
|
||||||
action_level: error
|
|
||||||
handler: nested
|
|
||||||
excluded_http_codes: [404, 405]
|
|
||||||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
|
||||||
nested:
|
|
||||||
type: stream
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
||||||
level: debug
|
|
||||||
formatter: monolog.formatter.json
|
|
||||||
console:
|
|
||||||
type: console
|
|
||||||
process_psr_3_messages: false
|
|
||||||
channels: ["!event", "!doctrine"]
|
|
||||||
deprecation:
|
|
||||||
type: stream
|
|
||||||
channels: [deprecation]
|
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
|
20
app/config/packages/routing.php
Normal file
20
app/config/packages/routing.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'router' => [
|
||||||
|
'utf8' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($containerConfigurator->env() === 'prod') {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'router' => [
|
||||||
|
'strict_requirements' => null,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,8 +0,0 @@
|
||||||
framework:
|
|
||||||
router:
|
|
||||||
utf8: true
|
|
||||||
|
|
||||||
when@prod:
|
|
||||||
framework:
|
|
||||||
router:
|
|
||||||
strict_requirements: null
|
|
16
app/config/packages/twig.php
Normal file
16
app/config/packages/twig.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('twig', [
|
||||||
|
'default_path' => '%kernel.project_dir%/templates',
|
||||||
|
]);
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('twig', [
|
||||||
|
'strict_variables' => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,6 +0,0 @@
|
||||||
twig:
|
|
||||||
default_path: '%kernel.project_dir%/templates'
|
|
||||||
|
|
||||||
when@test:
|
|
||||||
twig:
|
|
||||||
strict_variables: true
|
|
14
app/config/packages/uid.php
Normal file
14
app/config/packages/uid.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'uid' => [
|
||||||
|
'default_uuid_version' => 7,
|
||||||
|
'time_based_uuid_version' => 7,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
};
|
|
@ -1,4 +0,0 @@
|
||||||
framework:
|
|
||||||
uid:
|
|
||||||
default_uuid_version: 7
|
|
||||||
time_based_uuid_version: 7
|
|
20
app/config/packages/validator.php
Normal file
20
app/config/packages/validator.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'validation' => [
|
||||||
|
'email_validation_mode' => 'html5',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'validation' => [
|
||||||
|
'not_compromised_password' => false,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,8 +0,0 @@
|
||||||
framework:
|
|
||||||
validation:
|
|
||||||
email_validation_mode: html5
|
|
||||||
|
|
||||||
when@test:
|
|
||||||
framework:
|
|
||||||
validation:
|
|
||||||
not_compromised_password: false
|
|
31
app/config/packages/web_profiler.php
Normal file
31
app/config/packages/web_profiler.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
if ($containerConfigurator->env() === 'dev') {
|
||||||
|
$containerConfigurator->extension('web_profiler', [
|
||||||
|
'toolbar' => true,
|
||||||
|
'intercept_redirects' => false,
|
||||||
|
]);
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'profiler' => [
|
||||||
|
'only_exceptions' => false,
|
||||||
|
'collect_serializer_data' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
if ($containerConfigurator->env() === 'test') {
|
||||||
|
$containerConfigurator->extension('web_profiler', [
|
||||||
|
'toolbar' => false,
|
||||||
|
'intercept_redirects' => false,
|
||||||
|
]);
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'profiler' => [
|
||||||
|
'collect' => false,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,17 +0,0 @@
|
||||||
when@dev:
|
|
||||||
web_profiler:
|
|
||||||
toolbar: true
|
|
||||||
intercept_redirects: false
|
|
||||||
|
|
||||||
framework:
|
|
||||||
profiler:
|
|
||||||
only_exceptions: false
|
|
||||||
collect_serializer_data: true
|
|
||||||
|
|
||||||
when@test:
|
|
||||||
web_profiler:
|
|
||||||
toolbar: false
|
|
||||||
intercept_redirects: false
|
|
||||||
|
|
||||||
framework:
|
|
||||||
profiler: { collect: false }
|
|
20
app/config/packages/webpack_encore.php
Normal file
20
app/config/packages/webpack_encore.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||||
|
$containerConfigurator->extension('webpack_encore', [
|
||||||
|
'output_path' => '%kernel.project_dir%/public/build',
|
||||||
|
'script_attributes' => [
|
||||||
|
'defer' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$containerConfigurator->extension('framework', [
|
||||||
|
'assets' => [
|
||||||
|
'json_manifest_path' => '%kernel.project_dir%/public/build/manifest.json',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
};
|
|
@ -1,8 +0,0 @@
|
||||||
webpack_encore:
|
|
||||||
output_path: '%kernel.project_dir%/public/build'
|
|
||||||
script_attributes:
|
|
||||||
defer: true
|
|
||||||
|
|
||||||
framework:
|
|
||||||
assets:
|
|
||||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
if (file_exists(dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
||||||
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
require dirname(__DIR__) . '/var/cache/prod/App_KernelProdContainer.preload.php';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||||
|
|
||||||
return function (RoutingConfigurator $routes) {
|
return function (RoutingConfigurator $routes): void {
|
||||||
$routes->import('../src/*', 'attribute');
|
$routes->import('../src/*', 'attribute');
|
||||||
};
|
};
|
||||||
|
|
13
app/config/routes/framework.php
Normal file
13
app/config/routes/framework.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||||
|
|
||||||
|
return static function (RoutingConfigurator $routingConfigurator): void {
|
||||||
|
if ($routingConfigurator->env() === 'dev') {
|
||||||
|
$routingConfigurator->import('@FrameworkBundle/Resources/config/routing/errors.xml')
|
||||||
|
->prefix('/_error')
|
||||||
|
;
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,4 +0,0 @@
|
||||||
when@dev:
|
|
||||||
_errors:
|
|
||||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
|
||||||
prefix: /_error
|
|
16
app/config/routes/web_profiler.php
Normal file
16
app/config/routes/web_profiler.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||||
|
|
||||||
|
return static function (RoutingConfigurator $routingConfigurator): void {
|
||||||
|
if ($routingConfigurator->env() === 'dev') {
|
||||||
|
$routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/wdt.xml')
|
||||||
|
->prefix('/_wdt')
|
||||||
|
;
|
||||||
|
$routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/profiler.xml')
|
||||||
|
->prefix('/_profiler')
|
||||||
|
;
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,8 +0,0 @@
|
||||||
when@dev:
|
|
||||||
web_profiler_wdt:
|
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
|
||||||
prefix: /_wdt
|
|
||||||
|
|
||||||
web_profiler_profiler:
|
|
||||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
|
||||||
prefix: /_profiler
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
return function (ContainerConfigurator $container): void {
|
return function (ContainerConfigurator $container): void {
|
||||||
$services = $container->services()
|
$services = $container->services()
|
||||||
|
@ -15,4 +15,4 @@ return function (ContainerConfigurator $container): void {
|
||||||
->load('App\\', '../src/')
|
->load('App\\', '../src/')
|
||||||
->exclude('../src/{DependencyInjection,Entity,Kernel.php}')
|
->exclude('../src/{DependencyInjection,Entity,Kernel.php}')
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
return function (ContainerConfigurator $container): void {
|
return function (ContainerConfigurator $container): void {
|
||||||
$services = $container->services()
|
$services = $container->services()
|
||||||
->defaults()
|
->defaults()
|
||||||
->autowire()
|
->autowire()
|
||||||
->autoconfigure();
|
->autoconfigure()
|
||||||
|
;
|
||||||
|
|
||||||
$services->load('DoctrineFixtures\\', '../fixtures');
|
$services->load('DoctrineFixtures\\', '../fixtures');
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
|
||||||
return function (ContainerConfigurator $container): void {
|
return function (ContainerConfigurator $container): void {
|
||||||
$services = $container->services()
|
$services = $container->services()
|
||||||
->defaults()
|
->defaults()
|
||||||
->autowire()
|
->autowire()
|
||||||
->autoconfigure();
|
->autoconfigure()
|
||||||
|
;
|
||||||
|
|
||||||
$services->load('DoctrineFixtures\\', '../fixtures');
|
$services->load('DoctrineFixtures\\', '../fixtures');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue