Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions config/packages/asset_mapper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return App::config([
'framework' => [
'asset_mapper' => [
// The paths to make available to the asset mapper.
'paths' => [
'assets/',
],
'missing_import_mode' => 'strict',
],
],
'when@prod' => [
'framework' => [
'asset_mapper' => [
'missing_import_mode' => 'warn',
],
],
],
]);
11 changes: 0 additions & 11 deletions config/packages/asset_mapper.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions config/packages/cache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return App::config([
'framework' => [
'cache' => [
// Unique name of your app: used to compute stable namespaces for cache keys.
// 'prefix_seed' => 'your_vendor_name/app_name',

// The "app" cache stores to the filesystem by default.
// The data in this cache should persist between deploys.
// Other options include:

// Redis
// 'app' => 'cache.adapter.redis',
// 'default_redis_provider' => 'redis://localhost',

// APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
// 'app' => 'cache.adapter.apcu',

// Namespaced pools use the above "app" backend by default
// 'pools' => [
// 'my.dedicated.cache' => null,
// ],
],
],
]);
19 changes: 0 additions & 19 deletions config/packages/cache.yaml

This file was deleted.

21 changes: 21 additions & 0 deletions config/packages/csrf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

// Enable stateless CSRF protection for forms and logins/logouts
return App::config([
'framework' => [
'form' => [
'csrf_protection' => [
'token_id' => 'submit',
],
],
'csrf_protection' => [
'stateless_token_ids' => [
'submit',
'authenticate',
'logout',
],
],
],
]);
11 changes: 0 additions & 11 deletions config/packages/csrf.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions config/packages/dama_doctrine_test_bundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return App::config([
'when@test' => [
'dama_doctrine_test' => [
'enable_static_connection' => true,
'enable_static_meta_data_cache' => true,
'enable_static_query_cache' => true,
],
],
]);
5 changes: 0 additions & 5 deletions config/packages/dama_doctrine_test_bundle.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions config/packages/debug.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return App::config([
'when@dev' => [
'debug' => [
// Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
// See the "server:dump" command to start a new server.
'dump_destination' => 'tcp://'.env('VAR_DUMPER_SERVER'),
],
],
]);
5 changes: 0 additions & 5 deletions config/packages/debug.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions config/packages/deprecations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return App::config([
'when@prod' => [
// 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' => 'php://stderr',
// ],
// ],
// ],
],
]);
9 changes: 0 additions & 9 deletions config/packages/deprecations.yaml

This file was deleted.

74 changes: 70 additions & 4 deletions config/packages/doctrine.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,76 @@

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return static function (ContainerConfigurator $container): void {
$container->extension('doctrine', [
return App::config([
'doctrine' => [
'dbal' => [
'url' => env('DATABASE_URL')->resolve(),

// IMPORTANT: You MUST configure your server version,
// either here or in the DATABASE_URL env var (see .env file)
// 'server_version' => '16',

'profiling_collect_backtrace' => param('kernel.debug'),
'use_savepoints' => true,
],
'orm' => [
'auto_generate_proxy_classes' => true,
'report_fields_where_declared' => true,
'validate_xml_mapping' => true,
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',
'identity_generation_preferences' => [
'Doctrine\\DBAL\\Platforms\\PostgreSQLPlatform' => 'identity',
],
'auto_mapping' => true,
'mappings' => [
'App' => [
'type' => 'attribute',
'is_bundle' => false,
'dir' => param('kernel.project_dir').'/src/Entity',
'prefix' => 'App\\Entity',
'alias' => 'App',
],
],
'controller_resolver' => [
'auto_mapping' => false,
],
'enable_native_lazy_objects' => \PHP_VERSION_ID >= 80400,
],
]);
};
],
'when@test' => [
'doctrine' => [
'dbal' => [
// "TEST_TOKEN" is typically set by ParaTest
'dbname_suffix' => '_test'.env('TEST_TOKEN')->default(''),
],
],
],
'when@prod' => [
'doctrine' => [
'orm' => [
'auto_generate_proxy_classes' => false,
'proxy_dir' => param('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',
],
],
],
],
],
]);
56 changes: 0 additions & 56 deletions config/packages/doctrine.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions config/packages/doctrine_migrations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

return App::config([
'doctrine_migrations' => [
'migrations_paths' => [
// namespace is arbitrary but should be different from App\Migrations
// as migrations classes should NOT be autoloaded
'DoctrineMigrations' => param('kernel.project_dir').'/migrations',
],
'enable_profiler' => false,
],
]);
6 changes: 0 additions & 6 deletions config/packages/doctrine_migrations.yaml

This file was deleted.

35 changes: 35 additions & 0 deletions config/packages/framework.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

// see https://symfony.com/doc/current/reference/configuration/framework.html
return App::config([
'framework' => [
'secret' => env('APP_SECRET'),

// This defines the codes of the locales (languages) available in the application
// https://symfony.com/doc/current/reference/configuration/framework.html#enabled-locales
'enabled_locales' => ['ar', 'bg', 'bn', 'bs', 'ca', 'cs', 'de', 'en', 'es', 'eu', 'fr', 'hr', 'id', 'it', 'ja', 'lt', 'ne', 'nl', 'pl', 'pt_BR', 'ro', 'ru', 'sl', 'sq', 'sr_Cyrl', 'sr_Latn', 'tr', 'uk', 'vi', 'zh_CN'],

// Note that the session will be started ONLY if you read or write from it.
'session' => true,

// 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,

'property_info' => [
'with_constructor_extractor' => false,
],
],
'when@test' => [
'framework' => [
'test' => true,
'session' => [
'storage_factory_id' => 'session.storage.factory.mock_file',
],
],
],
]);
Loading
Loading