From 46d971709a7d18fcdd28e4234694c8a88d4fb06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Fr=C3=A9mont?= Date: Mon, 22 Dec 2025 17:27:07 +0100 Subject: [PATCH] Add support for Symfony 8 --- .github/workflows/ci.yaml | 38 +- app/Factory/BookFactory.php | 6 +- app/Factory/ConferenceFactory.php | 6 +- app/Factory/SpeakerFactory.php | 6 +- app/Factory/TalkFactory.php | 6 +- app/Factory/UserFactory.php | 6 +- composer.json | 66 +- config/packages/doctrine.yaml | 4 - config/reference.php | 1683 +++++++++++++++++ config/routes/framework.yaml | 2 +- config/routes/sylius_resource.yaml | 4 +- config/routes/web_profiler.yaml | 4 +- ecs.php | 6 + importmap.php | 8 + monorepo-builder.php | 2 +- phpstan-baseline.neon | 14 +- phpunit.xml.dist | 1 - src/AdminUi/composer.json | 36 +- src/AdminUi/phpunit.xml.dist | 1 - .../config/packages/doctrine.yaml | 4 - .../.application/config/reference.php | 1492 +++++++++++++++ .../.application/config/routes/framework.yaml | 2 +- .../config/routes/sylius_resource.yaml | 4 +- src/BootstrapAdminUi/composer.json | 33 +- src/BootstrapAdminUi/phpunit.xml.dist | 1 - .../config/packages/doctrine.yaml | 4 - .../.application/config/reference.php | 1552 +++++++++++++++ .../.application/config/routes/framework.yaml | 2 +- .../config/routes/sylius_resource.yaml | 4 +- src/TwigExtra/composer.json | 22 +- src/TwigExtra/phpunit.xml.dist | 1 - .../.application/config/routes/framework.yaml | 2 +- src/TwigHooks/composer.json | 34 +- src/TwigHooks/phpunit.xml.dist | 1 - .../.application/config/routes/framework.yaml | 2 +- src/UiTranslations/composer.json | 20 +- src/UiTranslations/phpunit.xml.dist | 1 - .../.application/config/routes/framework.yaml | 2 +- symfony.lock | 33 + tests/Functional/BookTest.php | 2 +- tests/Functional/ConferenceTest.php | 2 +- tests/Functional/DashboardTest.php | 2 +- tests/Functional/LegacyBookTest.php | 4 +- tests/Functional/SpeakerTest.php | 2 +- tests/Functional/TalkTest.php | 2 +- tests/Translations/FrenchTranslatedUiTest.php | 2 +- 46 files changed, 4943 insertions(+), 188 deletions(-) create mode 100644 config/reference.php create mode 100644 src/AdminUi/tests/Functional/.application/config/reference.php create mode 100644 src/BootstrapAdminUi/tests/Functional/.application/config/reference.php diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 00f7ec19e..556d88624 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,12 +14,13 @@ jobs: strategy: fail-fast: false matrix: - php: [ "8.1", "8.2", "8.3" ] + php: [ "8.2", "8.3" ] postgres: ["14.6"] - symfony: [ "^6.4", "^7.0" ] - exclude: - - php: "8.1" - symfony: "^7.0" + symfony: [ "^6.4", "^7.4" ] + include: + - php: '8.4' + postgres: "14.6" + symfony: "^8.0" name: "PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }}" env: APP_ENV: test @@ -33,7 +34,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php }}" - tools: symfony + tools: 'symfony, composer:v2, flex' coverage: none - name: Shutdown default MySQL @@ -46,10 +47,7 @@ jobs: postgresql password: "postgres" - name: "Restrict packages' versions" - run: | - composer global config --no-plugins allow-plugins.symfony/flex true - composer global require --no-progress --no-scripts --no-plugins "symfony/flex" - composer config extra.symfony.require "${{ matrix.symfony }}" + run: composer config extra.symfony.require "${{ matrix.symfony }}" - name: Get Composer cache directory id: composer-cache @@ -102,9 +100,7 @@ jobs: - name: "Restrict packages' versions (Admin Ui)" run: | - (cd src/AdminUi/ && composer global config --no-plugins allow-plugins.symfony/flex true) - (cd src/AdminUi/ && composer global config --no-plugins allow-plugins.symfony/runtime true) - (cd src/AdminUi/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex") + (cd src/AdminUi/ && composer config --no-plugins allow-plugins.symfony/runtime true) (cd src/AdminUi/ && composer config extra.symfony.require "${{ matrix.symfony }}") - name: "Install dependencies (Admin Ui)" @@ -115,9 +111,7 @@ jobs: - name: "Restrict packages' versions (Bootstrap Admin Ui)" run: | - (cd src/BootstrapAdminUi/ && composer global config --no-plugins allow-plugins.symfony/flex true) - (cd src/BootstrapAdminUi/ && composer global config --no-plugins allow-plugins.symfony/runtime true) - (cd src/BootstrapAdminUi/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex") + (cd src/BootstrapAdminUi/ && composer config --no-plugins allow-plugins.symfony/runtime true) (cd src/BootstrapAdminUi/ && composer config extra.symfony.require "${{ matrix.symfony }}") - name: "Install dependencies (Bootstrap Admin Ui)" @@ -128,9 +122,7 @@ jobs: - name: "Restrict packages' versions (Twig Hooks)" run: | - (cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/flex true) - (cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/runtime true) - (cd src/TwigHooks/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex") + (cd src/TwigHooks/ && composer config --no-plugins allow-plugins.symfony/runtime true) (cd src/TwigHooks/ && composer config extra.symfony.require "${{ matrix.symfony }}") - name: "Install dependencies (Twig Hooks)" @@ -141,9 +133,7 @@ jobs: - name: "Restrict packages' versions (Twig Extra)" run: | - (cd src/TwigExtra/ && composer global config --no-plugins allow-plugins.symfony/flex true) - (cd src/TwigExtra/ && composer global config --no-plugins allow-plugins.symfony/runtime true) - (cd src/TwigExtra/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex") + (cd src/TwigExtra/ && composer config --no-plugins allow-plugins.symfony/runtime true) (cd src/TwigExtra/ && composer config extra.symfony.require "${{ matrix.symfony }}") - name: "Install dependencies (Twig Extra)" @@ -154,9 +144,7 @@ jobs: - name: "Restrict packages' versions (Ui Translations)" run: | - (cd src/UiTranslations/ && composer global config --no-plugins allow-plugins.symfony/flex true) - (cd src/UiTranslations/ && composer global config --no-plugins allow-plugins.symfony/runtime true) - (cd src/UiTranslations/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex") + (cd src/UiTranslations/ && composer config --no-plugins allow-plugins.symfony/runtime true) (cd src/UiTranslations/ && composer config extra.symfony.require "${{ matrix.symfony }}") - name: "Install dependencies (Ui Translations)" diff --git a/app/Factory/BookFactory.php b/app/Factory/BookFactory.php index 1afe2f9e3..1a7a91f74 100644 --- a/app/Factory/BookFactory.php +++ b/app/Factory/BookFactory.php @@ -14,12 +14,12 @@ namespace App\Factory; use App\Entity\Book; -use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\PersistentObjectFactory; /** - * @extends PersistentProxyObjectFactory + * @extends PersistentObjectFactory */ -final class BookFactory extends PersistentProxyObjectFactory +final class BookFactory extends PersistentObjectFactory { public static function class(): string { diff --git a/app/Factory/ConferenceFactory.php b/app/Factory/ConferenceFactory.php index c425f6e49..df919a849 100644 --- a/app/Factory/ConferenceFactory.php +++ b/app/Factory/ConferenceFactory.php @@ -14,12 +14,12 @@ namespace App\Factory; use App\Entity\Conference; -use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\PersistentObjectFactory; /** - * @extends PersistentProxyObjectFactory + * @extends PersistentObjectFactory */ -final class ConferenceFactory extends PersistentProxyObjectFactory +final class ConferenceFactory extends PersistentObjectFactory { public static function class(): string { diff --git a/app/Factory/SpeakerFactory.php b/app/Factory/SpeakerFactory.php index bc82edf47..b1fd53c31 100644 --- a/app/Factory/SpeakerFactory.php +++ b/app/Factory/SpeakerFactory.php @@ -17,12 +17,12 @@ use App\Entity\SpeakerAvatar; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\File\UploadedFile; -use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\PersistentObjectFactory; /** - * @extends PersistentProxyObjectFactory + * @extends PersistentObjectFactory */ -final class SpeakerFactory extends PersistentProxyObjectFactory +final class SpeakerFactory extends PersistentObjectFactory { public static function class(): string { diff --git a/app/Factory/TalkFactory.php b/app/Factory/TalkFactory.php index fe068ee7b..51b849670 100644 --- a/app/Factory/TalkFactory.php +++ b/app/Factory/TalkFactory.php @@ -19,13 +19,13 @@ use App\Enum\Track; use function Zenstruck\Foundry\lazy; use Zenstruck\Foundry\Persistence\Exception\NotEnoughObjects; -use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\PersistentObjectFactory; use Zenstruck\Foundry\Persistence\Proxy; /** - * @extends PersistentProxyObjectFactory + * @extends PersistentObjectFactory */ -final class TalkFactory extends PersistentProxyObjectFactory +final class TalkFactory extends PersistentObjectFactory { public static function class(): string { diff --git a/app/Factory/UserFactory.php b/app/Factory/UserFactory.php index 7f182fa2d..bc3b093e0 100644 --- a/app/Factory/UserFactory.php +++ b/app/Factory/UserFactory.php @@ -15,12 +15,12 @@ use App\Entity\User; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; -use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory; +use Zenstruck\Foundry\Persistence\PersistentObjectFactory; /** - * @extends PersistentProxyObjectFactory + * @extends PersistentObjectFactory */ -final class UserFactory extends PersistentProxyObjectFactory +final class UserFactory extends PersistentObjectFactory { public function __construct( private UserPasswordHasherInterface $userPasswordHasher, diff --git a/composer.json b/composer.json index deac5a7ac..9ba8be378 100644 --- a/composer.json +++ b/composer.json @@ -15,27 +15,27 @@ ], "require": { "php": "^8.1", - "doctrine/dbal": "^3", - "doctrine/doctrine-bundle": "^2.12", - "doctrine/orm": "^2.0", + "doctrine/dbal": "^3 || ^4", + "doctrine/doctrine-bundle": "^2.13 || ^3.0 || ^4.0", + "doctrine/orm": "^3.3 || ^4.0", "knplabs/knp-menu-bundle": "^3.0", "laminas/laminas-stdlib": "^3.18", "pagerfanta/doctrine-orm-adapter": "^4.6", "pagerfanta/twig": "^4.6", - "sylius/grid-bundle": "^1.13", - "sylius/resource-bundle": "^1.11", - "symfony/asset": "^6.4 || ^7.0", - "symfony/asset-mapper": "^6.4 || ^7.0", - "symfony/config": "^6.4 || ^7.0", - "symfony/dependency-injection": "^6.4 || ^7.0", - "symfony/expression-language": "^6.4 || ^7.0", - "symfony/filesystem": "^6.4 || ^7.0", - "symfony/http-client": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/security-bundle": "^6.4 || ^7.0", - "symfony/security-http": "^6.4 || ^7.0", - "symfony/stopwatch": "^6.4 || ^7.0", - "symfony/twig-bundle": "^6.4 || ^7.0", + "sylius/grid-bundle": "^1.13 || ^1.15@alpha", + "sylius/resource-bundle": "dev-symfony-8 as 1.14.0", + "symfony/asset": "^6.4 || ^7.4 || ^8.0", + "symfony/asset-mapper": "^6.4 || ^7.4 || ^8.0", + "symfony/config": "^6.4 || ^7.4 || ^8.0", + "symfony/dependency-injection": "^6.4 || ^7.4 || ^8.0", + "symfony/expression-language": "^6.4 || ^7.4 || ^8.0", + "symfony/filesystem": "^6.4 || ^7.4 || ^8.0", + "symfony/http-client": "^6.4 || ^7.4 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.4 || ^8.0", + "symfony/security-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/security-http": "^6.4 || ^7.4 || ^8.0", + "symfony/stopwatch": "^6.4 || ^7.4 || ^8.0", + "symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0", "symfony/ux-autocomplete": "^2.17", "symfony/ux-icons": "^2.20", "symfony/ux-live-component": "^2.17", @@ -44,26 +44,26 @@ "webmozart/assert": "^1.9" }, "require-dev": { - "doctrine/doctrine-fixtures-bundle": "^3.6", - "matthiasnoback/symfony-config-test": "^5.1", - "matthiasnoback/symfony-dependency-injection-test": "^5.1", + "doctrine/doctrine-fixtures-bundle": "^4.3", + "matthiasnoback/symfony-config-test": "^6.1", + "matthiasnoback/symfony-dependency-injection-test": "^6.1.0", "phpstan/phpstan": "^1.10", "phpstan/phpstan-symfony": "^1.3", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "^10.5", "sylius-labs/coding-standard": "^4.0", - "symfony/browser-kit": "^6.4 || ^7.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/css-selector": "^6.4 || ^7.0", - "symfony/debug-bundle": "^6.4 || ^7.0", - "symfony/dom-crawler": "^6.4 || ^7.0", - "symfony/dotenv": "^6.4 || ^7.0", + "symfony/browser-kit": "^6.4 || ^7.4 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.4 || ^8.0", + "symfony/debug-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/dom-crawler": "^6.4 || ^7.4 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.4 || ^8.0", "symfony/flex": "^2.4", - "symfony/framework-bundle": "^6.4 || ^7.0", + "symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0", "symfony/maker-bundle": "^1.61", - "symfony/runtime": "^6.4 || ^7.0", - "symfony/translation": "^6.4 || ^7.0", - "symfony/web-profiler-bundle": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0", + "symfony/runtime": "^6.4 || ^7.4 || ^8.0", + "symfony/translation": "^6.4 || ^7.4 || ^8.0", + "symfony/web-profiler-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0", "symplify/monorepo-builder": "11.2.*", "vich/uploader-bundle": "^2.4", "zenstruck/foundry": "^2.0" @@ -109,7 +109,7 @@ }, "extra": { "symfony": { - "require": "7.1.*" + "require": "8.0.*" } }, "scripts": { diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index 2942e16f8..cb21798e6 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -7,11 +7,7 @@ doctrine: #server_version: '16' profiling_collect_backtrace: '%kernel.debug%' - use_savepoints: true 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 diff --git a/config/reference.php b/config/reference.php new file mode 100644 index 000000000..f557441ed --- /dev/null +++ b/config/reference.php @@ -0,0 +1,1683 @@ + [ + * 'App\\' => [ + * 'resource' => '../src/', + * ], + * ], + * ]); + * ``` + * + * @psalm-type ImportsConfig = list + * @psalm-type ParametersConfig = array|null>|null> + * @psalm-type ArgumentsType = list|array + * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} + * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key + * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator|ExpressionConfigurator + * @psalm-type DeprecationType = array{package: string, version: string, message?: string} + * @psalm-type DefaultsType = array{ + * public?: bool, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * } + * @psalm-type InstanceofType = array{ + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type DefinitionType = array{ + * class?: string, + * file?: string, + * parent?: string, + * shared?: bool, + * synthetic?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * configurator?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * decorates?: string, + * decoration_inner_name?: string, + * decoration_priority?: int, + * decoration_on_invalid?: 'exception'|'ignore'|null, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * from_callable?: CallbackType, + * } + * @psalm-type AliasType = string|array{ + * alias: string, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type PrototypeType = array{ + * resource: string, + * namespace?: string, + * exclude?: string|list, + * parent?: string, + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type StackType = array{ + * stack: list>, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type ServicesConfig = array{ + * _defaults?: DefaultsType, + * _instanceof?: InstanceofType, + * ... + * } + * @psalm-type ExtensionType = array + * @psalm-type FrameworkConfig = array{ + * secret?: scalar|null, + * http_method_override?: bool, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false + * allowed_http_method_override?: list|null, + * trust_x_sendfile_type_header?: scalar|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|null, // Default: "%env(default::SYMFONY_IDE)%" + * test?: bool, + * default_locale?: scalar|null, // Default: "en" + * set_locale_from_accept_language?: bool, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false + * set_content_language_from_locale?: bool, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false + * enabled_locales?: list, + * trusted_hosts?: list, + * trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"] + * trusted_headers?: list, + * error_controller?: scalar|null, // Default: "error_controller" + * handle_all_throwables?: bool, // HttpKernel will handle all kinds of \Throwable. // Default: true + * csrf_protection?: bool|array{ + * enabled?: scalar|null, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" + * }, + * form?: bool|array{ // Form configuration + * enabled?: bool, // Default: true + * csrf_protection?: array{ + * enabled?: scalar|null, // Default: null + * token_id?: scalar|null, // Default: null + * field_name?: scalar|null, // Default: "_token" + * field_attr?: array, + * }, + * }, + * http_cache?: bool|array{ // HTTP cache configuration + * enabled?: bool, // Default: false + * debug?: bool, // Default: "%kernel.debug%" + * trace_level?: "none"|"short"|"full", + * trace_header?: scalar|null, + * default_ttl?: int, + * private_headers?: list, + * skip_response_headers?: list, + * allow_reload?: bool, + * allow_revalidate?: bool, + * stale_while_revalidate?: int, + * stale_if_error?: int, + * terminate_on_cache_hit?: bool, + * }, + * esi?: bool|array{ // ESI configuration + * enabled?: bool, // Default: false + * }, + * ssi?: bool|array{ // SSI configuration + * enabled?: bool, // Default: false + * }, + * fragments?: bool|array{ // Fragments configuration + * enabled?: bool, // Default: false + * hinclude_default_template?: scalar|null, // Default: null + * path?: scalar|null, // Default: "/_fragment" + * }, + * profiler?: bool|array{ // Profiler configuration + * enabled?: bool, // Default: false + * collect?: bool, // Default: true + * collect_parameter?: scalar|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null + * only_exceptions?: bool, // Default: false + * only_main_requests?: bool, // Default: false + * dsn?: scalar|null, // Default: "file:%kernel.cache_dir%/profiler" + * collect_serializer_data?: true, // Default: true + * }, + * workflows?: bool|array{ + * enabled?: bool, // Default: false + * workflows?: array, + * definition_validators?: list, + * support_strategy?: scalar|null, + * initial_marking?: list, + * events_to_dispatch?: list|null, + * places?: list, + * }>, + * transitions: list, + * to?: list, + * weight?: int, // Default: 1 + * metadata?: list, + * }>, + * metadata?: list, + * }>, + * }, + * router?: bool|array{ // Router configuration + * enabled?: bool, // Default: false + * resource: scalar|null, + * type?: scalar|null, + * default_uri?: scalar|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null + * http_port?: scalar|null, // Default: 80 + * https_port?: scalar|null, // Default: 443 + * strict_requirements?: scalar|null, // set to true to throw an exception when a parameter does not match the requirements set to false to disable exceptions when a parameter does not match the requirements (and return null instead) set to null to disable parameter checks against requirements 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production // Default: true + * utf8?: bool, // Default: true + * }, + * session?: bool|array{ // Session configuration + * enabled?: bool, // Default: false + * storage_factory_id?: scalar|null, // Default: "session.storage.factory.native" + * handler_id?: scalar|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * name?: scalar|null, + * cookie_lifetime?: scalar|null, + * cookie_path?: scalar|null, + * cookie_domain?: scalar|null, + * cookie_secure?: true|false|"auto", // Default: "auto" + * cookie_httponly?: bool, // Default: true + * cookie_samesite?: null|"lax"|"strict"|"none", // Default: "lax" + * use_cookies?: bool, + * gc_divisor?: scalar|null, + * gc_probability?: scalar|null, + * gc_maxlifetime?: scalar|null, + * save_path?: scalar|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. + * metadata_update_threshold?: int, // Seconds to wait between 2 session metadata updates. // Default: 0 + * }, + * request?: bool|array{ // Request configuration + * enabled?: bool, // Default: false + * formats?: array>, + * }, + * assets?: bool|array{ // Assets configuration + * enabled?: bool, // Default: true + * strict_mode?: bool, // Throw an exception if an entry is missing from the manifest.json. // Default: false + * version_strategy?: scalar|null, // Default: null + * version?: scalar|null, // Default: null + * version_format?: scalar|null, // Default: "%%s?%%s" + * json_manifest_path?: scalar|null, // Default: null + * base_path?: scalar|null, // Default: "" + * base_urls?: list, + * packages?: array, + * }>, + * }, + * asset_mapper?: bool|array{ // Asset Mapper configuration + * enabled?: bool, // Default: true + * paths?: array, + * excluded_patterns?: list, + * exclude_dotfiles?: bool, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true + * server?: bool, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true + * public_prefix?: scalar|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/" + * missing_import_mode?: "strict"|"warn"|"ignore", // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn" + * extensions?: array, + * importmap_path?: scalar|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" + * importmap_script_attributes?: array, + * vendor_dir?: scalar|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor" + * precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip. + * enabled?: bool, // Default: false + * formats?: list, + * extensions?: list, + * }, + * }, + * translator?: bool|array{ // Translator configuration + * enabled?: bool, // Default: true + * fallbacks?: list, + * logging?: bool, // Default: false + * formatter?: scalar|null, // Default: "translator.formatter.default" + * cache_dir?: scalar|null, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" + * paths?: list, + * pseudo_localization?: bool|array{ + * enabled?: bool, // Default: false + * accents?: bool, // Default: true + * expansion_factor?: float, // Default: 1.0 + * brackets?: bool, // Default: true + * parse_html?: bool, // Default: false + * localizable_html_attributes?: list, + * }, + * providers?: array, + * locales?: list, + * }>, + * globals?: array, + * domain?: string, + * }>, + * }, + * validation?: bool|array{ // Validation configuration + * enabled?: bool, // Default: true + * enable_attributes?: bool, // Default: true + * static_method?: list, + * translation_domain?: scalar|null, // Default: "validators" + * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict", // Default: "html5" + * mapping?: array{ + * paths?: list, + * }, + * not_compromised_password?: bool|array{ + * enabled?: bool, // When disabled, compromised passwords will be accepted as valid. // Default: true + * endpoint?: scalar|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null + * }, + * disable_translation?: bool, // Default: false + * auto_mapping?: array, + * }>, + * }, + * serializer?: bool|array{ // Serializer configuration + * enabled?: bool, // Default: false + * enable_attributes?: bool, // Default: true + * name_converter?: scalar|null, + * circular_reference_handler?: scalar|null, + * max_depth_handler?: scalar|null, + * mapping?: array{ + * paths?: list, + * }, + * default_context?: list, + * named_serializers?: array, + * include_built_in_normalizers?: bool, // Whether to include the built-in normalizers // Default: true + * include_built_in_encoders?: bool, // Whether to include the built-in encoders // Default: true + * }>, + * }, + * property_access?: bool|array{ // Property access configuration + * enabled?: bool, // Default: true + * magic_call?: bool, // Default: false + * magic_get?: bool, // Default: true + * magic_set?: bool, // Default: true + * throw_exception_on_invalid_index?: bool, // Default: false + * throw_exception_on_invalid_property_path?: bool, // Default: true + * }, + * type_info?: bool|array{ // Type info configuration + * enabled?: bool, // Default: true + * aliases?: array, + * }, + * property_info?: bool|array{ // Property info configuration + * enabled?: bool, // Default: true + * with_constructor_extractor?: bool, // Registers the constructor extractor. // Default: true + * }, + * cache?: array{ // Cache configuration + * prefix_seed?: scalar|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|null, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|null, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|null, + * default_redis_provider?: scalar|null, // Default: "redis://localhost" + * default_valkey_provider?: scalar|null, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|null, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|null, // Default: "database_connection" + * default_pdo_provider?: scalar|null, // Default: null + * pools?: array, + * tags?: scalar|null, // Default: null + * public?: bool, // Default: false + * default_lifetime?: scalar|null, // Default lifetime of the pool. + * provider?: scalar|null, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|null, + * clearer?: scalar|null, + * }>, + * }, + * php_errors?: array{ // PHP errors handling configuration + * log?: mixed, // Use the application logger instead of the PHP logger for logging PHP errors. // Default: true + * throw?: bool, // Throw PHP errors as \ErrorException instances. // Default: true + * }, + * exceptions?: array, + * web_link?: bool|array{ // Web links configuration + * enabled?: bool, // Default: false + * }, + * lock?: bool|string|array{ // Lock configuration + * enabled?: bool, // Default: false + * resources?: array>, + * }, + * semaphore?: bool|string|array{ // Semaphore configuration + * enabled?: bool, // Default: false + * resources?: array, + * }, + * messenger?: bool|array{ // Messenger configuration + * enabled?: bool, // Default: false + * routing?: array, + * }>, + * serializer?: array{ + * default_serializer?: scalar|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * symfony_serializer?: array{ + * format?: scalar|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" + * context?: array, + * }, + * }, + * transports?: array, + * failure_transport?: scalar|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * retry_strategy?: string|array{ + * service?: scalar|null, // Service id to override the retry strategy entirely. // Default: null + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 + * }, + * rate_limiter?: scalar|null, // Rate limiter name to use when processing messages. // Default: null + * }>, + * failure_transport?: scalar|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|null, // Default: null + * buses?: array, + * }>, + * }>, + * }, + * scheduler?: bool|array{ // Scheduler configuration + * enabled?: bool, // Default: false + * }, + * disallow_search_engine_index?: bool, // Enabled by default when debug is enabled. // Default: true + * http_client?: bool|array{ // HTTP Client configuration + * enabled?: bool, // Default: true + * max_host_connections?: int, // The maximum number of connections to a single host. + * default_options?: array{ + * headers?: array, + * vars?: array, + * max_redirects?: int, // The maximum number of redirects to follow. + * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|null, // A certificate authority file. + * capath?: scalar|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null, // A PEM formatted certificate file. + * local_pk?: scalar|null, // A private key file. + * passphrase?: scalar|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool, // Default: false + * cache_pool?: string, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool, // Default: false + * retry_strategy?: scalar|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }, + * mock_response_factory?: scalar|null, // The id of the service that should generate mock responses. It should be either an invokable or an iterable. + * scoped_clients?: array, + * headers?: array, + * max_redirects?: int, // The maximum number of redirects to follow. + * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|null, // A certificate authority file. + * capath?: scalar|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null, // A PEM formatted certificate file. + * local_pk?: scalar|null, // A private key file. + * passphrase?: scalar|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool, // Default: false + * cache_pool?: string, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool, // Default: false + * retry_strategy?: scalar|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }>, + * }, + * mailer?: bool|array{ // Mailer configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|null, // Default: null + * transports?: array, + * envelope?: array{ // Mailer Envelope configuration + * sender?: scalar|null, + * recipients?: list, + * allowed_recipients?: list, + * }, + * headers?: array, + * dkim_signer?: bool|array{ // DKIM signer configuration + * enabled?: bool, // Default: false + * key?: scalar|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|null, // Default: "" + * select?: scalar|null, // Default: "" + * passphrase?: scalar|null, // The private key passphrase // Default: "" + * options?: array, + * }, + * smime_signer?: bool|array{ // S/MIME signer configuration + * enabled?: bool, // Default: false + * key?: scalar|null, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|null, // The private key passphrase // Default: null + * extra_certificates?: scalar|null, // Default: null + * sign_options?: int, // Default: null + * }, + * smime_encrypter?: bool|array{ // S/MIME encrypter configuration + * enabled?: bool, // Default: false + * repository?: scalar|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" + * cipher?: int, // A set of algorithms used to encrypt the message // Default: null + * }, + * }, + * secrets?: bool|array{ + * enabled?: bool, // Default: true + * vault_directory?: scalar|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|null, // Default: "%kernel.project_dir%/.env.%kernel.runtime_environment%.local" + * decryption_env_var?: scalar|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" + * }, + * notifier?: bool|array{ // Notifier configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * chatter_transports?: array, + * texter_transports?: array, + * notification_on_failed_messages?: bool, // Default: false + * channel_policy?: array>, + * admin_recipients?: list, + * }, + * rate_limiter?: bool|array{ // Rate limiter configuration + * enabled?: bool, // Default: false + * limiters?: array, + * limit?: int, // The maximum allowed hits in a fixed interval or burst. + * interval?: scalar|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". + * interval?: scalar|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * amount?: int, // Amount of tokens to add each interval. // Default: 1 + * }, + * }>, + * }, + * uid?: bool|array{ // Uid configuration + * enabled?: bool, // Default: false + * default_uuid_version?: 7|6|4|1, // Default: 7 + * name_based_uuid_version?: 5|3, // Default: 5 + * name_based_uuid_namespace?: scalar|null, + * time_based_uuid_version?: 7|6|1, // Default: 7 + * time_based_uuid_node?: scalar|null, + * }, + * html_sanitizer?: bool|array{ // HtmlSanitizer configuration + * enabled?: bool, // Default: false + * sanitizers?: array, + * block_elements?: list, + * drop_elements?: list, + * allow_attributes?: array, + * drop_attributes?: array, + * force_attributes?: array>, + * force_https_urls?: bool, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false + * allowed_link_schemes?: list, + * allowed_link_hosts?: list|null, + * allow_relative_links?: bool, // Allows relative URLs to be used in links href attributes. // Default: false + * allowed_media_schemes?: list, + * allowed_media_hosts?: list|null, + * allow_relative_medias?: bool, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false + * with_attribute_sanitizers?: list, + * without_attribute_sanitizers?: list, + * max_input_length?: int, // The maximum length allowed for the sanitized input. // Default: 0 + * }>, + * }, + * webhook?: bool|array{ // Webhook configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. // Default: "messenger.default_bus" + * routing?: array, + * }, + * remote-event?: bool|array{ // RemoteEvent configuration + * enabled?: bool, // Default: false + * }, + * json_streamer?: bool|array{ // JSON streamer configuration + * enabled?: bool, // Default: false + * }, + * } + * @psalm-type TwigConfig = array{ + * form_themes?: list, + * globals?: array, + * autoescape_service?: scalar|null, // Default: null + * autoescape_service_method?: scalar|null, // Default: null + * cache?: scalar|null, // Default: true + * charset?: scalar|null, // Default: "%kernel.charset%" + * debug?: bool, // Default: "%kernel.debug%" + * strict_variables?: bool, // Default: "%kernel.debug%" + * auto_reload?: scalar|null, + * optimizations?: int, + * default_path?: scalar|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" + * file_name_pattern?: list, + * paths?: array, + * date?: array{ // The default format options used by the date filter. + * format?: scalar|null, // Default: "F j, Y H:i" + * interval_format?: scalar|null, // Default: "%d days" + * timezone?: scalar|null, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null + * }, + * number_format?: array{ // The default format options for the number_format filter. + * decimals?: int, // Default: 0 + * decimal_point?: scalar|null, // Default: "." + * thousands_separator?: scalar|null, // Default: "," + * }, + * mailer?: array{ + * html_to_text_converter?: scalar|null, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null + * }, + * } + * @psalm-type TwigComponentConfig = array{ + * defaults?: array, + * anonymous_template_directory?: scalar|null, // Defaults to `components` + * profiler?: bool, // Enables the profiler for Twig Component (in debug mode) // Default: "%kernel.debug%" + * controllers_json?: scalar|null, // Deprecated: The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0. // Default: null + * } + * @psalm-type SyliusTwigHooksConfig = array{ + * enable_autoprefixing?: bool, // Default: false + * hook_name_section_separator?: scalar|null, // Default: false + * supported_hookable_types?: array, + * hooks?: array, + * props?: array, + * configuration?: array, + * priority?: int, // Default: null + * }>>, + * } + * @psalm-type SyliusTwigExtraConfig = array{ + * twig_ux?: array{ + * anonymous_component_template_prefixes?: array, + * }, + * } + * @psalm-type SyliusAdminUiConfig = array{ + * routing?: array, + * } + * @psalm-type SyliusUiTranslationsConfig = array + * @psalm-type SyliusBootstrapAdminUiConfig = array + * @psalm-type WebProfilerConfig = array{ + * toolbar?: bool|array{ // Profiler toolbar configuration + * enabled?: bool, // Default: false + * ajax_replace?: bool, // Replace toolbar on AJAX requests // Default: false + * }, + * intercept_redirects?: bool, // Default: false + * excluded_ajax_paths?: scalar|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt" + * } + * @psalm-type DebugConfig = array{ + * max_items?: int, // Max number of displayed items past the first level, -1 means no limit. // Default: 2500 + * min_depth?: int, // Minimum tree depth to clone all the items, 1 is default. // Default: 1 + * max_string_length?: int, // Max length of displayed strings, -1 means no limit. // Default: -1 + * dump_destination?: scalar|null, // A stream URL where dumps should be written to. // Default: null + * theme?: "dark"|"light", // Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light". // Default: "dark" + * } + * @psalm-type LiveComponentConfig = array{ + * secret?: scalar|null, // The secret used to compute fingerprints and checksums // Default: "%kernel.secret%" + * } + * @psalm-type StimulusConfig = array{ + * controller_paths?: list, + * controllers_json?: scalar|null, // Default: "%kernel.project_dir%/assets/controllers.json" + * } + * @psalm-type DoctrineConfig = array{ + * dbal?: array{ + * default_connection?: scalar|null, + * types?: array, + * driver_schemes?: array, + * connections?: array, + * mapping_types?: array, + * default_table_options?: array, + * schema_manager_factory?: scalar|null, // Default: "doctrine.dbal.default_schema_manager_factory" + * result_cache?: scalar|null, + * replicas?: array, + * }>, + * }, + * orm?: array{ + * default_entity_manager?: scalar|null, + * enable_native_lazy_objects?: bool, // Deprecated: The "enable_native_lazy_objects" option is deprecated and will be removed in DoctrineBundle 4.0, as native lazy objects are now always enabled. // Default: true + * controller_resolver?: bool|array{ + * enabled?: bool, // Default: true + * auto_mapping?: bool, // Deprecated: The "doctrine.orm.controller_resolver.auto_mapping.auto_mapping" option is deprecated and will be removed in DoctrineBundle 4.0, as it only accepts `false` since 3.0. // Set to true to enable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: false + * evict_cache?: bool, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false + * }, + * entity_managers?: array, + * }>, + * }>, + * }, + * connection?: scalar|null, + * class_metadata_factory_name?: scalar|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" + * default_repository_class?: scalar|null, // Default: "Doctrine\\ORM\\EntityRepository" + * auto_mapping?: scalar|null, // Default: false + * naming_strategy?: scalar|null, // Default: "doctrine.orm.naming_strategy.default" + * quote_strategy?: scalar|null, // Default: "doctrine.orm.quote_strategy.default" + * typed_field_mapper?: scalar|null, // Default: "doctrine.orm.typed_field_mapper.default" + * entity_listener_resolver?: scalar|null, // Default: null + * fetch_mode_subselect_batch_size?: scalar|null, + * repository_factory?: scalar|null, // Default: "doctrine.orm.container_repository_factory" + * schema_ignore_classes?: list, + * validate_xml_mapping?: bool, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728. // Default: false + * second_level_cache?: array{ + * region_cache_driver?: string|array{ + * type?: scalar|null, // Default: null + * id?: scalar|null, + * pool?: scalar|null, + * }, + * region_lock_lifetime?: scalar|null, // Default: 60 + * log_enabled?: bool, // Default: true + * region_lifetime?: scalar|null, // Default: 3600 + * enabled?: bool, // Default: true + * factory?: scalar|null, + * regions?: array, + * loggers?: array, + * }, + * hydrators?: array, + * mappings?: array, + * dql?: array{ + * string_functions?: array, + * numeric_functions?: array, + * datetime_functions?: array, + * }, + * filters?: array, + * }>, + * identity_generation_preferences?: array, + * }>, + * resolve_target_entities?: array, + * }, + * } + * @psalm-type BabdevPagerfantaConfig = array{ + * default_view?: scalar|null, // Default: "default" + * default_twig_template?: scalar|null, // Default: "@BabDevPagerfanta/default.html.twig" + * exceptions_strategy?: array{ + * out_of_range_page?: "to_http_not_found"|"custom", // Default: "to_http_not_found" + * not_valid_current_page?: "to_http_not_found"|"custom", // Default: "to_http_not_found" + * }, + * } + * @psalm-type SyliusResourceConfig = array{ + * resources?: array, + * settings?: array{ + * paginate?: mixed, // Default: null + * limit?: mixed, // Default: null + * allowed_paginate?: list, + * default_page_size?: int, // Default: 10 + * default_templates_dir?: scalar|null, // Default: null + * sortable?: bool, // Default: false + * sorting?: mixed, // Default: null + * filterable?: bool, // Default: false + * criteria?: mixed, // Default: null + * state_machine_component?: scalar|null, // Default: null + * }, + * translation?: bool|array{ + * enabled?: bool, // Default: true + * locale_provider?: scalar|null, // Default: "sylius.translation_locale_provider.immutable" + * }, + * drivers?: list<"doctrine/orm"|"doctrine/mongodb-odm"|"doctrine/phpcr-odm">, + * mapping?: array{ + * imports?: list, + * paths?: list, + * }, + * authorization_checker?: scalar|null, // Default: "sylius.resource_controller.authorization_checker.disabled" + * routing_path_bc_layer?: bool, + * path_segment_name_generator?: scalar|null, // Specify a path name generator to use. // Default: "sylius.metadata.path_segment_name_generator.dash" + * } + * @psalm-type ZenstruckFoundryConfig = array{ + * auto_refresh_proxies?: bool|null, // Deprecated: Since 2.0 auto_refresh_proxies defaults to true and this configuration has no effect. // Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh) // Default: null + * enable_auto_refresh_with_lazy_objects?: bool|null, // Enable auto-refresh using PHP 8.4 lazy objects (cannot be enabled if PHP < 8.4). // Default: null + * faker?: array{ // Configure the faker used by your factories. + * locale?: scalar|null, // The default locale to use for faker. // Default: null + * seed?: scalar|null, // Deprecated: The "faker.seed" configuration is deprecated and will be removed in 3.0. Use environment variable "FOUNDRY_FAKER_SEED" instead. // Random number generator seed to produce the same fake values every run. // Default: null + * service?: scalar|null, // Service id for custom faker instance. // Default: null + * }, + * instantiator?: array{ // Configure the default instantiator used by your object factories. + * use_constructor?: bool, // Use the constructor to instantiate objects. // Default: true + * allow_extra_attributes?: bool, // Whether or not to skip attributes that do not correspond to properties. // Default: false + * always_force_properties?: bool, // Whether or not to skip setters and force set object properties (public/private/protected) directly. // Default: false + * service?: scalar|null, // Service id of your custom instantiator. // Default: null + * }, + * global_state?: list, + * persistence?: array{ + * flush_once?: bool, // Flush only once per call of `PersistentObjectFactory::create()` in userland. // Default: false + * }, + * orm?: array{ + * auto_persist?: bool, // Deprecated: Since 2.4 auto_persist defaults to true and this configuration has no effect. // Automatically persist entities when created. // Default: true + * reset?: array{ + * connections?: list, + * entity_managers?: list, + * mode?: \Zenstruck\Foundry\ORM\ResetDatabase\ResetDatabaseMode::SCHEMA|\Zenstruck\Foundry\ORM\ResetDatabase\ResetDatabaseMode::MIGRATE, // Reset mode to use with ResetDatabase trait // Default: "schema" + * migrations?: array{ + * configurations?: list, + * }, + * }, + * }, + * mongo?: array{ + * auto_persist?: bool, // Deprecated: Since 2.4 auto_persist defaults to true and this configuration has no effect. // Automatically persist documents when created. // Default: true + * reset?: array{ + * document_managers?: list, + * }, + * }, + * make_factory?: array{ + * default_namespace?: scalar|null, // Default namespace where factories will be created by maker. // Default: "Factory" + * add_hints?: bool, // Add "beginner" hints in the created factory. // Default: true + * }, + * make_story?: array{ + * default_namespace?: scalar|null, // Default namespace where stories will be created by maker. // Default: "Story" + * }, + * } + * @psalm-type KnpMenuConfig = array{ + * providers?: array{ + * builder_alias?: bool, // Default: true + * }, + * twig?: array{ + * template?: scalar|null, // Default: "@KnpMenu/menu.html.twig" + * }, + * templating?: bool, // Default: false + * default_renderer?: scalar|null, // Default: "twig" + * } + * @psalm-type SyliusGridConfig = array{ + * drivers?: list<"doctrine/orm"|"doctrine/phpcr-odm">, + * templates?: array{ + * filter?: array, + * action?: array, + * bulk_action?: array, + * }, + * grids?: array, + * }, + * sorting?: array, + * limits?: list, + * fields?: array, + * }>, + * filters?: array, + * form_options?: list, + * default_value?: mixed, + * }>, + * actions?: array, + * }>>, + * removals?: array, + * }>, + * } + * @psalm-type VichUploaderConfig = array{ + * default_filename_attribute_suffix?: scalar|null, // Default: "_name" + * db_driver: scalar|null, + * storage?: scalar|null, // Default: "file_system" + * use_flysystem_to_resolve_uri?: bool, // Default: false + * twig?: scalar|null, // twig requires templating // Default: true + * form?: scalar|null, // Default: true + * metadata?: array{ + * cache?: scalar|null, // Default: "file" + * type?: scalar|null, // Default: "attribute" + * file_cache?: array{ + * dir?: scalar|null, // Default: "%kernel.cache_dir%/vich_uploader" + * }, + * auto_detection?: bool, // Default: true + * directories?: list, + * }, + * mappings?: array, + * } + * @psalm-type MakerConfig = array{ + * root_namespace?: scalar|null, // Default: "App" + * generate_final_classes?: bool, // Default: true + * generate_final_entities?: bool, // Default: false + * } + * @psalm-type SecurityConfig = array{ + * access_denied_url?: scalar|null, // Default: null + * session_fixation_strategy?: "none"|"migrate"|"invalidate", // Default: "migrate" + * expose_security_errors?: \Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::None|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::AccountStatus|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::All, // Default: "none" + * erase_credentials?: bool, // Default: true + * access_decision_manager?: array{ + * strategy?: "affirmative"|"consensus"|"unanimous"|"priority", + * service?: scalar|null, + * strategy_service?: scalar|null, + * allow_if_all_abstain?: bool, // Default: false + * allow_if_equal_granted_denied?: bool, // Default: true + * }, + * password_hashers?: array, + * hash_algorithm?: scalar|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512" + * key_length?: scalar|null, // Default: 40 + * ignore_case?: bool, // Default: false + * encode_as_base64?: bool, // Default: true + * iterations?: scalar|null, // Default: 5000 + * cost?: int, // Default: null + * memory_cost?: scalar|null, // Default: null + * time_cost?: scalar|null, // Default: null + * id?: scalar|null, + * }>, + * providers?: array, + * }, + * entity?: array{ + * class: scalar|null, // The full entity class name of your user class. + * property?: scalar|null, // Default: null + * manager_name?: scalar|null, // Default: null + * }, + * memory?: array{ + * users?: array, + * }>, + * }, + * ldap?: array{ + * service: scalar|null, + * base_dn: scalar|null, + * search_dn?: scalar|null, // Default: null + * search_password?: scalar|null, // Default: null + * extra_fields?: list, + * default_roles?: list, + * role_fetcher?: scalar|null, // Default: null + * uid_key?: scalar|null, // Default: "sAMAccountName" + * filter?: scalar|null, // Default: "({uid_key}={user_identifier})" + * password_attribute?: scalar|null, // Default: null + * }, + * }>, + * firewalls: array, + * security?: bool, // Default: true + * user_checker?: scalar|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker" + * request_matcher?: scalar|null, + * access_denied_url?: scalar|null, + * access_denied_handler?: scalar|null, + * entry_point?: scalar|null, // An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface". + * provider?: scalar|null, + * stateless?: bool, // Default: false + * lazy?: bool, // Default: false + * context?: scalar|null, + * logout?: array{ + * enable_csrf?: bool|null, // Default: null + * csrf_token_id?: scalar|null, // Default: "logout" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_manager?: scalar|null, + * path?: scalar|null, // Default: "/logout" + * target?: scalar|null, // Default: "/" + * invalidate_session?: bool, // Default: true + * clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts">, + * delete_cookies?: array, + * }, + * switch_user?: array{ + * provider?: scalar|null, + * parameter?: scalar|null, // Default: "_switch_user" + * role?: scalar|null, // Default: "ROLE_ALLOWED_TO_SWITCH" + * target_route?: scalar|null, // Default: null + * }, + * required_badges?: list, + * custom_authenticators?: list, + * login_throttling?: array{ + * limiter?: scalar|null, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface". + * max_attempts?: int, // Default: 5 + * interval?: scalar|null, // Default: "1 minute" + * lock_factory?: scalar|null, // The service ID of the lock factory used by the login rate limiter (or null to disable locking). // Default: null + * cache_pool?: string, // The cache pool to use for storing the limiter state // Default: "cache.rate_limiter" + * storage_service?: string, // The service ID of a custom storage implementation, this precedes any configured "cache_pool" // Default: null + * }, + * x509?: array{ + * provider?: scalar|null, + * user?: scalar|null, // Default: "SSL_CLIENT_S_DN_Email" + * credentials?: scalar|null, // Default: "SSL_CLIENT_S_DN" + * user_identifier?: scalar|null, // Default: "emailAddress" + * }, + * remote_user?: array{ + * provider?: scalar|null, + * user?: scalar|null, // Default: "REMOTE_USER" + * }, + * login_link?: array{ + * check_route: scalar|null, // Route that will validate the login link - e.g. "app_login_link_verify". + * check_post_only?: scalar|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false + * signature_properties: list, + * lifetime?: int, // The lifetime of the login link in seconds. // Default: 600 + * max_uses?: int, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null + * used_link_cache?: scalar|null, // Cache service id used to expired links of max_uses is set. + * success_handler?: scalar|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface. + * failure_handler?: scalar|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface. + * provider?: scalar|null, // The user provider to load users from. + * secret?: scalar|null, // Default: "%kernel.secret%" + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * login_path?: scalar|null, // Default: "/login" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * }, + * form_login?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_parameter?: scalar|null, // Default: "_username" + * password_parameter?: scalar|null, // Default: "_password" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|null, // Default: "authenticate" + * enable_csrf?: bool, // Default: false + * post_only?: bool, // Default: true + * form_only?: bool, // Default: false + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * }, + * form_login_ldap?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_parameter?: scalar|null, // Default: "_username" + * password_parameter?: scalar|null, // Default: "_password" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|null, // Default: "authenticate" + * enable_csrf?: bool, // Default: false + * post_only?: bool, // Default: true + * form_only?: bool, // Default: false + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * json_login?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_path?: scalar|null, // Default: "username" + * password_path?: scalar|null, // Default: "password" + * }, + * json_login_ldap?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_path?: scalar|null, // Default: "username" + * password_path?: scalar|null, // Default: "password" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * access_token?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * realm?: scalar|null, // Default: null + * token_extractors?: list, + * token_handler: string|array{ + * id?: scalar|null, + * oidc_user_info?: string|array{ + * base_uri: scalar|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). + * discovery?: array{ // Enable the OIDC discovery. + * cache?: array{ + * id: scalar|null, // Cache service id to use to cache the OIDC discovery configuration. + * }, + * }, + * claim?: scalar|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" + * client?: scalar|null, // HttpClient service id to use to call the OIDC server. + * }, + * oidc?: array{ + * discovery?: array{ // Enable the OIDC discovery. + * base_uri: list, + * cache?: array{ + * id: scalar|null, // Cache service id to use to cache the OIDC discovery configuration. + * }, + * }, + * claim?: scalar|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" + * audience: scalar|null, // Audience set in the token, for validation purpose. + * issuers: list, + * algorithms: list, + * keyset?: scalar|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). + * encryption?: bool|array{ + * enabled?: bool, // Default: false + * enforce?: bool, // When enabled, the token shall be encrypted. // Default: false + * algorithms: list, + * keyset: scalar|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). + * }, + * }, + * cas?: array{ + * validation_url: scalar|null, // CAS server validation URL + * prefix?: scalar|null, // CAS prefix // Default: "cas" + * http_client?: scalar|null, // HTTP Client service // Default: null + * }, + * oauth2?: scalar|null, + * }, + * }, + * http_basic?: array{ + * provider?: scalar|null, + * realm?: scalar|null, // Default: "Secured Area" + * }, + * http_basic_ldap?: array{ + * provider?: scalar|null, + * realm?: scalar|null, // Default: "Secured Area" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * remember_me?: array{ + * secret?: scalar|null, // Default: "%kernel.secret%" + * service?: scalar|null, + * user_providers?: list, + * catch_exceptions?: bool, // Default: true + * signature_properties?: list, + * token_provider?: string|array{ + * service?: scalar|null, // The service ID of a custom remember-me token provider. + * doctrine?: bool|array{ + * enabled?: bool, // Default: false + * connection?: scalar|null, // Default: null + * }, + * }, + * token_verifier?: scalar|null, // The service ID of a custom rememberme token verifier. + * name?: scalar|null, // Default: "REMEMBERME" + * lifetime?: int, // Default: 31536000 + * path?: scalar|null, // Default: "/" + * domain?: scalar|null, // Default: null + * secure?: true|false|"auto", // Default: null + * httponly?: bool, // Default: true + * samesite?: null|"lax"|"strict"|"none", // Default: "lax" + * always_remember_me?: bool, // Default: false + * remember_me_parameter?: scalar|null, // Default: "_remember_me" + * }, + * }>, + * access_control?: list, + * attributes?: array, + * route?: scalar|null, // Default: null + * methods?: list, + * allow_if?: scalar|null, // Default: null + * roles?: list, + * }>, + * role_hierarchy?: array>, + * } + * @psalm-type UxIconsConfig = array{ + * icon_dir?: scalar|null, // The local directory where icons are stored. // Default: "%kernel.project_dir%/assets/icons" + * default_icon_attributes?: mixed, // Default attributes to add to all icons. // Default: {"fill":"currentColor"} + * icon_sets?: array, + * }>, + * aliases?: list, + * iconify?: bool|array{ // Configuration for the remote icon service. + * enabled?: bool, // Default: true + * on_demand?: bool, // Whether to download icons "on demand". // Default: true + * endpoint?: scalar|null, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design" + * }, + * ignore_not_found?: bool, // Ignore error when an icon is not found. Set to 'true' to fail silently. // Default: false + * } + * @psalm-type WhiteOctoberPagerfantaConfig = array{ // Deprecated: The "white_october_pagerfanta" configuration node is deprecated, migrate your configuration to the "babdev_pagerfanta" configuration node. + * exceptions_strategy?: array{ + * out_of_range_page?: scalar|null, // Default: "to_http_not_found" + * not_valid_current_page?: scalar|null, // Default: "to_http_not_found" + * }, + * default_view?: scalar|null, // Default: "default" + * } + * @psalm-type ConfigType = array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_ui_translations?: SyliusUiTranslationsConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * live_component?: LiveComponentConfig, + * stimulus?: StimulusConfig, + * doctrine?: DoctrineConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_resource?: SyliusResourceConfig, + * knp_menu?: KnpMenuConfig, + * sylius_grid?: SyliusGridConfig, + * vich_uploader?: VichUploaderConfig, + * security?: SecurityConfig, + * ux_icons?: UxIconsConfig, + * white_october_pagerfanta?: WhiteOctoberPagerfantaConfig, + * "when@dev"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_ui_translations?: SyliusUiTranslationsConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * web_profiler?: WebProfilerConfig, + * debug?: DebugConfig, + * live_component?: LiveComponentConfig, + * stimulus?: StimulusConfig, + * doctrine?: DoctrineConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_resource?: SyliusResourceConfig, + * zenstruck_foundry?: ZenstruckFoundryConfig, + * knp_menu?: KnpMenuConfig, + * sylius_grid?: SyliusGridConfig, + * vich_uploader?: VichUploaderConfig, + * maker?: MakerConfig, + * security?: SecurityConfig, + * ux_icons?: UxIconsConfig, + * }, + * "when@prod"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_ui_translations?: SyliusUiTranslationsConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * live_component?: LiveComponentConfig, + * stimulus?: StimulusConfig, + * doctrine?: DoctrineConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_resource?: SyliusResourceConfig, + * knp_menu?: KnpMenuConfig, + * sylius_grid?: SyliusGridConfig, + * vich_uploader?: VichUploaderConfig, + * security?: SecurityConfig, + * ux_icons?: UxIconsConfig, + * }, + * "when@test"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_ui_translations?: SyliusUiTranslationsConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * web_profiler?: WebProfilerConfig, + * live_component?: LiveComponentConfig, + * stimulus?: StimulusConfig, + * doctrine?: DoctrineConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_resource?: SyliusResourceConfig, + * zenstruck_foundry?: ZenstruckFoundryConfig, + * knp_menu?: KnpMenuConfig, + * sylius_grid?: SyliusGridConfig, + * vich_uploader?: VichUploaderConfig, + * security?: SecurityConfig, + * ux_icons?: UxIconsConfig, + * }, + * ..., + * }> + * } + */ +final class App +{ + /** + * @param ConfigType $config + * + * @psalm-return ConfigType + */ + public static function config(array $config): array + { + return AppReference::config($config); + } +} + +namespace Symfony\Component\Routing\Loader\Configurator; + +/** + * This class provides array-shapes for configuring the routes of an application. + * + * Example: + * + * ```php + * // config/routes.php + * namespace Symfony\Component\Routing\Loader\Configurator; + * + * return Routes::config([ + * 'controllers' => [ + * 'resource' => 'routing.controllers', + * ], + * ]); + * ``` + * + * @psalm-type RouteConfig = array{ + * path: string|array, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type ImportConfig = array{ + * resource: string, + * type?: string, + * exclude?: string|list, + * prefix?: string|array, + * name_prefix?: string, + * trailing_slash_on_root?: bool, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type AliasConfig = array{ + * alias: string, + * deprecated?: array{package:string, version:string, message?:string}, + * } + * @psalm-type RoutesConfig = array{ + * "when@dev"?: array, + * "when@prod"?: array, + * "when@test"?: array, + * ... + * } + */ +final class Routes +{ + /** + * @param RoutesConfig $config + * + * @psalm-return RoutesConfig + */ + public static function config(array $config): array + { + return $config; + } +} diff --git a/config/routes/framework.yaml b/config/routes/framework.yaml index 0fc74bbac..bc1feace1 100644 --- a/config/routes/framework.yaml +++ b/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.php' prefix: /_error diff --git a/config/routes/sylius_resource.yaml b/config/routes/sylius_resource.yaml index 0c8ade2c2..e4c326435 100644 --- a/config/routes/sylius_resource.yaml +++ b/config/routes/sylius_resource.yaml @@ -2,6 +2,6 @@ sylius_crud_routes: resource: 'sylius.routing.loader.crud_routes_attributes' type: service -sylius_routes: - resource: 'sylius.routing.loader.routes_attributes' +sylius_resource_routes: + resource: 'sylius.symfony.routing.loader.resource' type: service diff --git a/config/routes/web_profiler.yaml b/config/routes/web_profiler.yaml index 8d85319fd..b3b7b4b0e 100644 --- a/config/routes/web_profiler.yaml +++ b/config/routes/web_profiler.yaml @@ -1,8 +1,8 @@ when@dev: web_profiler_wdt: - resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' + resource: '@WebProfilerBundle/Resources/config/routing/wdt.php' prefix: /_wdt web_profiler_profiler: - resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' + resource: '@WebProfilerBundle/Resources/config/routing/profiler.php' prefix: /_profiler diff --git a/ecs.php b/ecs.php index f05b3cb3d..e95ce5c4a 100644 --- a/ecs.php +++ b/ecs.php @@ -11,6 +11,12 @@ __DIR__ . '/src', ]); + $ecsConfig->skip([ + __DIR__ . '/config/reference.php', + __DIR__ . '/src/AdminUi/tests/Functional/.application/config/reference.php', + __DIR__ . '/src/BootstrapAdminUi/tests/Functional/.application/config/reference.php', + ]); + $ecsConfig->import('vendor/sylius-labs/coding-standard/ecs.php'); $ecsConfig->ruleWithConfiguration(HeaderCommentFixer::class, [ diff --git a/importmap.php b/importmap.php index 3b49af095..ea1cce89e 100644 --- a/importmap.php +++ b/importmap.php @@ -45,4 +45,12 @@ '@symfony/ux-live-component' => [ 'path' => './vendor/symfony/ux-live-component/assets/dist/live_controller.js', ], + 'tom-select/dist/css/tom-select.bootstrap4.css' => [ + 'version' => '2.4.3', + 'type' => 'css', + ], + 'tom-select/dist/css/tom-select.bootstrap5.css' => [ + 'version' => '2.4.3', + 'type' => 'css', + ], ]; diff --git a/monorepo-builder.php b/monorepo-builder.php index 98505c2cd..3298891c6 100644 --- a/monorepo-builder.php +++ b/monorepo-builder.php @@ -22,7 +22,7 @@ ComposerJsonSection::REQUIRE_DEV => [ 'phpstan/phpstan' => '^1.10', 'phpstan/phpstan-symfony' => '^1.3', - 'symfony/debug-bundle' => '^6.4 || ^7.0', + 'symfony/debug-bundle' => '^6.4 || ^7.4 || ^8.0', 'symfony/flex' => '^2.4', 'symplify/monorepo-builder' => '11.2.*', ], diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 33f9b132a..8b23813b6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,6 +1,16 @@ parameters: ignoreErrors: - - message: "#^Unsafe usage of new static\\(\\)\\.$#" + message: "#^Call to method arrayNode\\(\\) on an unknown class Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeBuilder\\\\.$#" count: 1 - path: src/TwigHooks/src/Hookable/AbstractHookable.php + path: src/TwigExtra/src/Symfony/DependencyInjection/Configuration.php + + - + message: "#^Call to method arrayNode\\(\\) on an unknown class Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeBuilder\\\\.$#" + count: 2 + path: src/TwigHooks/src/DependencyInjection/Configuration.php + + - + message: "#^Call to method booleanNode\\(\\) on an unknown class Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeBuilder\\\\.$#" + count: 1 + path: src/TwigHooks/src/DependencyInjection/Configuration.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 57dd47cab..03391d70c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,7 +6,6 @@ backupGlobals="false" colors="true" bootstrap="tests/bootstrap.php" - convertDeprecationsToExceptions="false" > diff --git a/src/AdminUi/composer.json b/src/AdminUi/composer.json index cab1dfcf5..827665315 100644 --- a/src/AdminUi/composer.json +++ b/src/AdminUi/composer.json @@ -6,27 +6,27 @@ "php": "^8.1", "knplabs/knp-menu-bundle": "^3.0", "sylius/twig-hooks": "^0.10", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/security-bundle": "^6.4 || ^7.0", - "symfony/security-http": "^6.4 || ^7.0", - "symfony/twig-bundle": "^6.4 || ^7.0", - "sylius/resource-bundle": "^1.11", + "symfony/http-kernel": "^6.4 || ^7.4 || ^8.0", + "symfony/security-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/security-http": "^6.4 || ^7.4 || ^8.0", + "symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0", + "sylius/resource-bundle": "dev-symfony-8 as 1.14.0", "twig/twig": "^2.15 || ^3.0" }, "require-dev": { - "doctrine/doctrine-bundle": "^2.12", - "doctrine/orm": "^2.0", - "matthiasnoback/symfony-dependency-injection-test": "^5.1", - "phpunit/phpunit": "^9.6", - "sylius/grid-bundle": "^1.13", - "symfony/browser-kit": "^6.4 || ^7.0", - "symfony/config": "^6.4 || ^7.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/css-selector": "^6.4 || ^7.0", - "symfony/dotenv": "^6.4 || ^7.0", - "symfony/framework-bundle": "^6.4 || ^7.0", - "symfony/runtime": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0" + "doctrine/doctrine-bundle": "^2.13 || ^3.0 || ^4.0", + "doctrine/orm": "^3.3 || ^4.0", + "matthiasnoback/symfony-dependency-injection-test": "^6.1.0", + "phpunit/phpunit": "^10.5", + "sylius/grid-bundle": "^1.13 || ^1.15@alpha", + "symfony/browser-kit": "^6.4 || ^7.4 || ^8.0", + "symfony/config": "^6.4 || ^7.4 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.4 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.4 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/runtime": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0" }, "suggest": { "sylius/bootstrap-admin-ui": "^0.5" diff --git a/src/AdminUi/phpunit.xml.dist b/src/AdminUi/phpunit.xml.dist index 324062d0e..b82c87ad6 100644 --- a/src/AdminUi/phpunit.xml.dist +++ b/src/AdminUi/phpunit.xml.dist @@ -5,7 +5,6 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" colors="true" bootstrap="tests/Functional/.application/config/bootstrap.php" - convertDeprecationsToExceptions="true" > diff --git a/src/AdminUi/tests/Functional/.application/config/packages/doctrine.yaml b/src/AdminUi/tests/Functional/.application/config/packages/doctrine.yaml index d42c52d6d..171cd6588 100644 --- a/src/AdminUi/tests/Functional/.application/config/packages/doctrine.yaml +++ b/src/AdminUi/tests/Functional/.application/config/packages/doctrine.yaml @@ -7,11 +7,7 @@ doctrine: #server_version: '16' profiling_collect_backtrace: '%kernel.debug%' - use_savepoints: true 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 diff --git a/src/AdminUi/tests/Functional/.application/config/reference.php b/src/AdminUi/tests/Functional/.application/config/reference.php new file mode 100644 index 000000000..3e0f5f1b7 --- /dev/null +++ b/src/AdminUi/tests/Functional/.application/config/reference.php @@ -0,0 +1,1492 @@ + [ + * 'App\\' => [ + * 'resource' => '../src/', + * ], + * ], + * ]); + * ``` + * + * @psalm-type ImportsConfig = list + * @psalm-type ParametersConfig = array|null>|null> + * @psalm-type ArgumentsType = list|array + * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} + * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key + * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator|ExpressionConfigurator + * @psalm-type DeprecationType = array{package: string, version: string, message?: string} + * @psalm-type DefaultsType = array{ + * public?: bool, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * } + * @psalm-type InstanceofType = array{ + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type DefinitionType = array{ + * class?: string, + * file?: string, + * parent?: string, + * shared?: bool, + * synthetic?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * configurator?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * decorates?: string, + * decoration_inner_name?: string, + * decoration_priority?: int, + * decoration_on_invalid?: 'exception'|'ignore'|null, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * from_callable?: CallbackType, + * } + * @psalm-type AliasType = string|array{ + * alias: string, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type PrototypeType = array{ + * resource: string, + * namespace?: string, + * exclude?: string|list, + * parent?: string, + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type StackType = array{ + * stack: list>, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type ServicesConfig = array{ + * _defaults?: DefaultsType, + * _instanceof?: InstanceofType, + * ... + * } + * @psalm-type ExtensionType = array + * @psalm-type FrameworkConfig = array{ + * secret?: scalar|null, + * http_method_override?: bool, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false + * allowed_http_method_override?: list|null, + * trust_x_sendfile_type_header?: scalar|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|null, // Default: "%env(default::SYMFONY_IDE)%" + * test?: bool, + * default_locale?: scalar|null, // Default: "en" + * set_locale_from_accept_language?: bool, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false + * set_content_language_from_locale?: bool, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false + * enabled_locales?: list, + * trusted_hosts?: list, + * trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"] + * trusted_headers?: list, + * error_controller?: scalar|null, // Default: "error_controller" + * handle_all_throwables?: bool, // HttpKernel will handle all kinds of \Throwable. // Default: true + * csrf_protection?: bool|array{ + * enabled?: scalar|null, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" + * }, + * form?: bool|array{ // Form configuration + * enabled?: bool, // Default: true + * csrf_protection?: array{ + * enabled?: scalar|null, // Default: null + * token_id?: scalar|null, // Default: null + * field_name?: scalar|null, // Default: "_token" + * field_attr?: array, + * }, + * }, + * http_cache?: bool|array{ // HTTP cache configuration + * enabled?: bool, // Default: false + * debug?: bool, // Default: "%kernel.debug%" + * trace_level?: "none"|"short"|"full", + * trace_header?: scalar|null, + * default_ttl?: int, + * private_headers?: list, + * skip_response_headers?: list, + * allow_reload?: bool, + * allow_revalidate?: bool, + * stale_while_revalidate?: int, + * stale_if_error?: int, + * terminate_on_cache_hit?: bool, + * }, + * esi?: bool|array{ // ESI configuration + * enabled?: bool, // Default: false + * }, + * ssi?: bool|array{ // SSI configuration + * enabled?: bool, // Default: false + * }, + * fragments?: bool|array{ // Fragments configuration + * enabled?: bool, // Default: false + * hinclude_default_template?: scalar|null, // Default: null + * path?: scalar|null, // Default: "/_fragment" + * }, + * profiler?: bool|array{ // Profiler configuration + * enabled?: bool, // Default: false + * collect?: bool, // Default: true + * collect_parameter?: scalar|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null + * only_exceptions?: bool, // Default: false + * only_main_requests?: bool, // Default: false + * dsn?: scalar|null, // Default: "file:%kernel.cache_dir%/profiler" + * collect_serializer_data?: true, // Default: true + * }, + * workflows?: bool|array{ + * enabled?: bool, // Default: false + * workflows?: array, + * definition_validators?: list, + * support_strategy?: scalar|null, + * initial_marking?: list, + * events_to_dispatch?: list|null, + * places?: list, + * }>, + * transitions: list, + * to?: list, + * weight?: int, // Default: 1 + * metadata?: list, + * }>, + * metadata?: list, + * }>, + * }, + * router?: bool|array{ // Router configuration + * enabled?: bool, // Default: false + * resource: scalar|null, + * type?: scalar|null, + * default_uri?: scalar|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null + * http_port?: scalar|null, // Default: 80 + * https_port?: scalar|null, // Default: 443 + * strict_requirements?: scalar|null, // set to true to throw an exception when a parameter does not match the requirements set to false to disable exceptions when a parameter does not match the requirements (and return null instead) set to null to disable parameter checks against requirements 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production // Default: true + * utf8?: bool, // Default: true + * }, + * session?: bool|array{ // Session configuration + * enabled?: bool, // Default: false + * storage_factory_id?: scalar|null, // Default: "session.storage.factory.native" + * handler_id?: scalar|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * name?: scalar|null, + * cookie_lifetime?: scalar|null, + * cookie_path?: scalar|null, + * cookie_domain?: scalar|null, + * cookie_secure?: true|false|"auto", // Default: "auto" + * cookie_httponly?: bool, // Default: true + * cookie_samesite?: null|"lax"|"strict"|"none", // Default: "lax" + * use_cookies?: bool, + * gc_divisor?: scalar|null, + * gc_probability?: scalar|null, + * gc_maxlifetime?: scalar|null, + * save_path?: scalar|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. + * metadata_update_threshold?: int, // Seconds to wait between 2 session metadata updates. // Default: 0 + * }, + * request?: bool|array{ // Request configuration + * enabled?: bool, // Default: false + * formats?: array>, + * }, + * assets?: bool|array{ // Assets configuration + * enabled?: bool, // Default: true + * strict_mode?: bool, // Throw an exception if an entry is missing from the manifest.json. // Default: false + * version_strategy?: scalar|null, // Default: null + * version?: scalar|null, // Default: null + * version_format?: scalar|null, // Default: "%%s?%%s" + * json_manifest_path?: scalar|null, // Default: null + * base_path?: scalar|null, // Default: "" + * base_urls?: list, + * packages?: array, + * }>, + * }, + * asset_mapper?: bool|array{ // Asset Mapper configuration + * enabled?: bool, // Default: true + * paths?: array, + * excluded_patterns?: list, + * exclude_dotfiles?: bool, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true + * server?: bool, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true + * public_prefix?: scalar|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/" + * missing_import_mode?: "strict"|"warn"|"ignore", // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn" + * extensions?: array, + * importmap_path?: scalar|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" + * importmap_script_attributes?: array, + * vendor_dir?: scalar|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor" + * precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip. + * enabled?: bool, // Default: false + * formats?: list, + * extensions?: list, + * }, + * }, + * translator?: bool|array{ // Translator configuration + * enabled?: bool, // Default: true + * fallbacks?: list, + * logging?: bool, // Default: false + * formatter?: scalar|null, // Default: "translator.formatter.default" + * cache_dir?: scalar|null, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" + * paths?: list, + * pseudo_localization?: bool|array{ + * enabled?: bool, // Default: false + * accents?: bool, // Default: true + * expansion_factor?: float, // Default: 1.0 + * brackets?: bool, // Default: true + * parse_html?: bool, // Default: false + * localizable_html_attributes?: list, + * }, + * providers?: array, + * locales?: list, + * }>, + * globals?: array, + * domain?: string, + * }>, + * }, + * validation?: bool|array{ // Validation configuration + * enabled?: bool, // Default: true + * enable_attributes?: bool, // Default: true + * static_method?: list, + * translation_domain?: scalar|null, // Default: "validators" + * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict", // Default: "html5" + * mapping?: array{ + * paths?: list, + * }, + * not_compromised_password?: bool|array{ + * enabled?: bool, // When disabled, compromised passwords will be accepted as valid. // Default: true + * endpoint?: scalar|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null + * }, + * disable_translation?: bool, // Default: false + * auto_mapping?: array, + * }>, + * }, + * serializer?: bool|array{ // Serializer configuration + * enabled?: bool, // Default: false + * enable_attributes?: bool, // Default: true + * name_converter?: scalar|null, + * circular_reference_handler?: scalar|null, + * max_depth_handler?: scalar|null, + * mapping?: array{ + * paths?: list, + * }, + * default_context?: list, + * named_serializers?: array, + * include_built_in_normalizers?: bool, // Whether to include the built-in normalizers // Default: true + * include_built_in_encoders?: bool, // Whether to include the built-in encoders // Default: true + * }>, + * }, + * property_access?: bool|array{ // Property access configuration + * enabled?: bool, // Default: true + * magic_call?: bool, // Default: false + * magic_get?: bool, // Default: true + * magic_set?: bool, // Default: true + * throw_exception_on_invalid_index?: bool, // Default: false + * throw_exception_on_invalid_property_path?: bool, // Default: true + * }, + * type_info?: bool|array{ // Type info configuration + * enabled?: bool, // Default: true + * aliases?: array, + * }, + * property_info?: bool|array{ // Property info configuration + * enabled?: bool, // Default: true + * with_constructor_extractor?: bool, // Registers the constructor extractor. // Default: true + * }, + * cache?: array{ // Cache configuration + * prefix_seed?: scalar|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|null, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|null, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|null, + * default_redis_provider?: scalar|null, // Default: "redis://localhost" + * default_valkey_provider?: scalar|null, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|null, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|null, // Default: "database_connection" + * default_pdo_provider?: scalar|null, // Default: null + * pools?: array, + * tags?: scalar|null, // Default: null + * public?: bool, // Default: false + * default_lifetime?: scalar|null, // Default lifetime of the pool. + * provider?: scalar|null, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|null, + * clearer?: scalar|null, + * }>, + * }, + * php_errors?: array{ // PHP errors handling configuration + * log?: mixed, // Use the application logger instead of the PHP logger for logging PHP errors. // Default: true + * throw?: bool, // Throw PHP errors as \ErrorException instances. // Default: true + * }, + * exceptions?: array, + * web_link?: bool|array{ // Web links configuration + * enabled?: bool, // Default: false + * }, + * lock?: bool|string|array{ // Lock configuration + * enabled?: bool, // Default: false + * resources?: array>, + * }, + * semaphore?: bool|string|array{ // Semaphore configuration + * enabled?: bool, // Default: false + * resources?: array, + * }, + * messenger?: bool|array{ // Messenger configuration + * enabled?: bool, // Default: false + * routing?: array, + * }>, + * serializer?: array{ + * default_serializer?: scalar|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * symfony_serializer?: array{ + * format?: scalar|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" + * context?: array, + * }, + * }, + * transports?: array, + * failure_transport?: scalar|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * retry_strategy?: string|array{ + * service?: scalar|null, // Service id to override the retry strategy entirely. // Default: null + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 + * }, + * rate_limiter?: scalar|null, // Rate limiter name to use when processing messages. // Default: null + * }>, + * failure_transport?: scalar|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|null, // Default: null + * buses?: array, + * }>, + * }>, + * }, + * scheduler?: bool|array{ // Scheduler configuration + * enabled?: bool, // Default: false + * }, + * disallow_search_engine_index?: bool, // Enabled by default when debug is enabled. // Default: true + * http_client?: bool|array{ // HTTP Client configuration + * enabled?: bool, // Default: true + * max_host_connections?: int, // The maximum number of connections to a single host. + * default_options?: array{ + * headers?: array, + * vars?: array, + * max_redirects?: int, // The maximum number of redirects to follow. + * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|null, // A certificate authority file. + * capath?: scalar|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null, // A PEM formatted certificate file. + * local_pk?: scalar|null, // A private key file. + * passphrase?: scalar|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool, // Default: false + * cache_pool?: string, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool, // Default: false + * retry_strategy?: scalar|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }, + * mock_response_factory?: scalar|null, // The id of the service that should generate mock responses. It should be either an invokable or an iterable. + * scoped_clients?: array, + * headers?: array, + * max_redirects?: int, // The maximum number of redirects to follow. + * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|null, // A certificate authority file. + * capath?: scalar|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null, // A PEM formatted certificate file. + * local_pk?: scalar|null, // A private key file. + * passphrase?: scalar|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool, // Default: false + * cache_pool?: string, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool, // Default: false + * retry_strategy?: scalar|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }>, + * }, + * mailer?: bool|array{ // Mailer configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|null, // Default: null + * transports?: array, + * envelope?: array{ // Mailer Envelope configuration + * sender?: scalar|null, + * recipients?: list, + * allowed_recipients?: list, + * }, + * headers?: array, + * dkim_signer?: bool|array{ // DKIM signer configuration + * enabled?: bool, // Default: false + * key?: scalar|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|null, // Default: "" + * select?: scalar|null, // Default: "" + * passphrase?: scalar|null, // The private key passphrase // Default: "" + * options?: array, + * }, + * smime_signer?: bool|array{ // S/MIME signer configuration + * enabled?: bool, // Default: false + * key?: scalar|null, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|null, // The private key passphrase // Default: null + * extra_certificates?: scalar|null, // Default: null + * sign_options?: int, // Default: null + * }, + * smime_encrypter?: bool|array{ // S/MIME encrypter configuration + * enabled?: bool, // Default: false + * repository?: scalar|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" + * cipher?: int, // A set of algorithms used to encrypt the message // Default: null + * }, + * }, + * secrets?: bool|array{ + * enabled?: bool, // Default: true + * vault_directory?: scalar|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|null, // Default: "%kernel.project_dir%/.env.%kernel.runtime_environment%.local" + * decryption_env_var?: scalar|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" + * }, + * notifier?: bool|array{ // Notifier configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * chatter_transports?: array, + * texter_transports?: array, + * notification_on_failed_messages?: bool, // Default: false + * channel_policy?: array>, + * admin_recipients?: list, + * }, + * rate_limiter?: bool|array{ // Rate limiter configuration + * enabled?: bool, // Default: false + * limiters?: array, + * limit?: int, // The maximum allowed hits in a fixed interval or burst. + * interval?: scalar|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". + * interval?: scalar|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * amount?: int, // Amount of tokens to add each interval. // Default: 1 + * }, + * }>, + * }, + * uid?: bool|array{ // Uid configuration + * enabled?: bool, // Default: false + * default_uuid_version?: 7|6|4|1, // Default: 7 + * name_based_uuid_version?: 5|3, // Default: 5 + * name_based_uuid_namespace?: scalar|null, + * time_based_uuid_version?: 7|6|1, // Default: 7 + * time_based_uuid_node?: scalar|null, + * }, + * html_sanitizer?: bool|array{ // HtmlSanitizer configuration + * enabled?: bool, // Default: false + * sanitizers?: array, + * block_elements?: list, + * drop_elements?: list, + * allow_attributes?: array, + * drop_attributes?: array, + * force_attributes?: array>, + * force_https_urls?: bool, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false + * allowed_link_schemes?: list, + * allowed_link_hosts?: list|null, + * allow_relative_links?: bool, // Allows relative URLs to be used in links href attributes. // Default: false + * allowed_media_schemes?: list, + * allowed_media_hosts?: list|null, + * allow_relative_medias?: bool, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false + * with_attribute_sanitizers?: list, + * without_attribute_sanitizers?: list, + * max_input_length?: int, // The maximum length allowed for the sanitized input. // Default: 0 + * }>, + * }, + * webhook?: bool|array{ // Webhook configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. // Default: "messenger.default_bus" + * routing?: array, + * }, + * remote-event?: bool|array{ // RemoteEvent configuration + * enabled?: bool, // Default: false + * }, + * json_streamer?: bool|array{ // JSON streamer configuration + * enabled?: bool, // Default: false + * }, + * } + * @psalm-type TwigConfig = array{ + * form_themes?: list, + * globals?: array, + * autoescape_service?: scalar|null, // Default: null + * autoescape_service_method?: scalar|null, // Default: null + * cache?: scalar|null, // Default: true + * charset?: scalar|null, // Default: "%kernel.charset%" + * debug?: bool, // Default: "%kernel.debug%" + * strict_variables?: bool, // Default: "%kernel.debug%" + * auto_reload?: scalar|null, + * optimizations?: int, + * default_path?: scalar|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" + * file_name_pattern?: list, + * paths?: array, + * date?: array{ // The default format options used by the date filter. + * format?: scalar|null, // Default: "F j, Y H:i" + * interval_format?: scalar|null, // Default: "%d days" + * timezone?: scalar|null, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null + * }, + * number_format?: array{ // The default format options for the number_format filter. + * decimals?: int, // Default: 0 + * decimal_point?: scalar|null, // Default: "." + * thousands_separator?: scalar|null, // Default: "," + * }, + * mailer?: array{ + * html_to_text_converter?: scalar|null, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null + * }, + * } + * @psalm-type SecurityConfig = array{ + * access_denied_url?: scalar|null, // Default: null + * session_fixation_strategy?: "none"|"migrate"|"invalidate", // Default: "migrate" + * expose_security_errors?: \Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::None|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::AccountStatus|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::All, // Default: "none" + * erase_credentials?: bool, // Default: true + * access_decision_manager?: array{ + * strategy?: "affirmative"|"consensus"|"unanimous"|"priority", + * service?: scalar|null, + * strategy_service?: scalar|null, + * allow_if_all_abstain?: bool, // Default: false + * allow_if_equal_granted_denied?: bool, // Default: true + * }, + * password_hashers?: array, + * hash_algorithm?: scalar|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512" + * key_length?: scalar|null, // Default: 40 + * ignore_case?: bool, // Default: false + * encode_as_base64?: bool, // Default: true + * iterations?: scalar|null, // Default: 5000 + * cost?: int, // Default: null + * memory_cost?: scalar|null, // Default: null + * time_cost?: scalar|null, // Default: null + * id?: scalar|null, + * }>, + * providers?: array, + * }, + * memory?: array{ + * users?: array, + * }>, + * }, + * ldap?: array{ + * service: scalar|null, + * base_dn: scalar|null, + * search_dn?: scalar|null, // Default: null + * search_password?: scalar|null, // Default: null + * extra_fields?: list, + * default_roles?: list, + * role_fetcher?: scalar|null, // Default: null + * uid_key?: scalar|null, // Default: "sAMAccountName" + * filter?: scalar|null, // Default: "({uid_key}={user_identifier})" + * password_attribute?: scalar|null, // Default: null + * }, + * entity?: array{ + * class: scalar|null, // The full entity class name of your user class. + * property?: scalar|null, // Default: null + * manager_name?: scalar|null, // Default: null + * }, + * }>, + * firewalls: array, + * security?: bool, // Default: true + * user_checker?: scalar|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker" + * request_matcher?: scalar|null, + * access_denied_url?: scalar|null, + * access_denied_handler?: scalar|null, + * entry_point?: scalar|null, // An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface". + * provider?: scalar|null, + * stateless?: bool, // Default: false + * lazy?: bool, // Default: false + * context?: scalar|null, + * logout?: array{ + * enable_csrf?: bool|null, // Default: null + * csrf_token_id?: scalar|null, // Default: "logout" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_manager?: scalar|null, + * path?: scalar|null, // Default: "/logout" + * target?: scalar|null, // Default: "/" + * invalidate_session?: bool, // Default: true + * clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts">, + * delete_cookies?: array, + * }, + * switch_user?: array{ + * provider?: scalar|null, + * parameter?: scalar|null, // Default: "_switch_user" + * role?: scalar|null, // Default: "ROLE_ALLOWED_TO_SWITCH" + * target_route?: scalar|null, // Default: null + * }, + * required_badges?: list, + * custom_authenticators?: list, + * login_throttling?: array{ + * limiter?: scalar|null, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface". + * max_attempts?: int, // Default: 5 + * interval?: scalar|null, // Default: "1 minute" + * lock_factory?: scalar|null, // The service ID of the lock factory used by the login rate limiter (or null to disable locking). // Default: null + * cache_pool?: string, // The cache pool to use for storing the limiter state // Default: "cache.rate_limiter" + * storage_service?: string, // The service ID of a custom storage implementation, this precedes any configured "cache_pool" // Default: null + * }, + * x509?: array{ + * provider?: scalar|null, + * user?: scalar|null, // Default: "SSL_CLIENT_S_DN_Email" + * credentials?: scalar|null, // Default: "SSL_CLIENT_S_DN" + * user_identifier?: scalar|null, // Default: "emailAddress" + * }, + * remote_user?: array{ + * provider?: scalar|null, + * user?: scalar|null, // Default: "REMOTE_USER" + * }, + * login_link?: array{ + * check_route: scalar|null, // Route that will validate the login link - e.g. "app_login_link_verify". + * check_post_only?: scalar|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false + * signature_properties: list, + * lifetime?: int, // The lifetime of the login link in seconds. // Default: 600 + * max_uses?: int, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null + * used_link_cache?: scalar|null, // Cache service id used to expired links of max_uses is set. + * success_handler?: scalar|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface. + * failure_handler?: scalar|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface. + * provider?: scalar|null, // The user provider to load users from. + * secret?: scalar|null, // Default: "%kernel.secret%" + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * login_path?: scalar|null, // Default: "/login" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * }, + * form_login?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_parameter?: scalar|null, // Default: "_username" + * password_parameter?: scalar|null, // Default: "_password" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|null, // Default: "authenticate" + * enable_csrf?: bool, // Default: false + * post_only?: bool, // Default: true + * form_only?: bool, // Default: false + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * }, + * form_login_ldap?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_parameter?: scalar|null, // Default: "_username" + * password_parameter?: scalar|null, // Default: "_password" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|null, // Default: "authenticate" + * enable_csrf?: bool, // Default: false + * post_only?: bool, // Default: true + * form_only?: bool, // Default: false + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * json_login?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_path?: scalar|null, // Default: "username" + * password_path?: scalar|null, // Default: "password" + * }, + * json_login_ldap?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_path?: scalar|null, // Default: "username" + * password_path?: scalar|null, // Default: "password" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * access_token?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * realm?: scalar|null, // Default: null + * token_extractors?: list, + * token_handler: string|array{ + * id?: scalar|null, + * oidc_user_info?: string|array{ + * base_uri: scalar|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). + * discovery?: array{ // Enable the OIDC discovery. + * cache?: array{ + * id: scalar|null, // Cache service id to use to cache the OIDC discovery configuration. + * }, + * }, + * claim?: scalar|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" + * client?: scalar|null, // HttpClient service id to use to call the OIDC server. + * }, + * oidc?: array{ + * discovery?: array{ // Enable the OIDC discovery. + * base_uri: list, + * cache?: array{ + * id: scalar|null, // Cache service id to use to cache the OIDC discovery configuration. + * }, + * }, + * claim?: scalar|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" + * audience: scalar|null, // Audience set in the token, for validation purpose. + * issuers: list, + * algorithms: list, + * keyset?: scalar|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). + * encryption?: bool|array{ + * enabled?: bool, // Default: false + * enforce?: bool, // When enabled, the token shall be encrypted. // Default: false + * algorithms: list, + * keyset: scalar|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). + * }, + * }, + * cas?: array{ + * validation_url: scalar|null, // CAS server validation URL + * prefix?: scalar|null, // CAS prefix // Default: "cas" + * http_client?: scalar|null, // HTTP Client service // Default: null + * }, + * oauth2?: scalar|null, + * }, + * }, + * http_basic?: array{ + * provider?: scalar|null, + * realm?: scalar|null, // Default: "Secured Area" + * }, + * http_basic_ldap?: array{ + * provider?: scalar|null, + * realm?: scalar|null, // Default: "Secured Area" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * remember_me?: array{ + * secret?: scalar|null, // Default: "%kernel.secret%" + * service?: scalar|null, + * user_providers?: list, + * catch_exceptions?: bool, // Default: true + * signature_properties?: list, + * token_provider?: string|array{ + * service?: scalar|null, // The service ID of a custom remember-me token provider. + * doctrine?: bool|array{ + * enabled?: bool, // Default: false + * connection?: scalar|null, // Default: null + * }, + * }, + * token_verifier?: scalar|null, // The service ID of a custom rememberme token verifier. + * name?: scalar|null, // Default: "REMEMBERME" + * lifetime?: int, // Default: 31536000 + * path?: scalar|null, // Default: "/" + * domain?: scalar|null, // Default: null + * secure?: true|false|"auto", // Default: null + * httponly?: bool, // Default: true + * samesite?: null|"lax"|"strict"|"none", // Default: "lax" + * always_remember_me?: bool, // Default: false + * remember_me_parameter?: scalar|null, // Default: "_remember_me" + * }, + * }>, + * access_control?: list, + * attributes?: array, + * route?: scalar|null, // Default: null + * methods?: list, + * allow_if?: scalar|null, // Default: null + * roles?: list, + * }>, + * role_hierarchy?: array>, + * } + * @psalm-type TwigComponentConfig = array{ + * defaults?: array, + * anonymous_template_directory?: scalar|null, // Defaults to `components` + * profiler?: bool, // Enables the profiler for Twig Component (in debug mode) // Default: "%kernel.debug%" + * controllers_json?: scalar|null, // Deprecated: The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0. // Default: null + * } + * @psalm-type SyliusTwigHooksConfig = array{ + * enable_autoprefixing?: bool, // Default: false + * hook_name_section_separator?: scalar|null, // Default: false + * supported_hookable_types?: array, + * hooks?: array, + * props?: array, + * configuration?: array, + * priority?: int, // Default: null + * }>>, + * } + * @psalm-type SyliusResourceConfig = array{ + * resources?: array, + * settings?: array{ + * paginate?: mixed, // Default: null + * limit?: mixed, // Default: null + * allowed_paginate?: list, + * default_page_size?: int, // Default: 10 + * default_templates_dir?: scalar|null, // Default: null + * sortable?: bool, // Default: false + * sorting?: mixed, // Default: null + * filterable?: bool, // Default: false + * criteria?: mixed, // Default: null + * state_machine_component?: scalar|null, // Default: null + * }, + * translation?: bool|array{ + * enabled?: bool, // Default: true + * locale_provider?: scalar|null, // Default: "sylius.translation_locale_provider.immutable" + * }, + * drivers?: list<"doctrine/orm"|"doctrine/mongodb-odm"|"doctrine/phpcr-odm">, + * mapping?: array{ + * imports?: list, + * paths?: list, + * }, + * authorization_checker?: scalar|null, // Default: "sylius.resource_controller.authorization_checker.disabled" + * routing_path_bc_layer?: bool, + * path_segment_name_generator?: scalar|null, // Specify a path name generator to use. // Default: "sylius.metadata.path_segment_name_generator.dash" + * } + * @psalm-type SyliusAdminUiConfig = array{ + * routing?: array, + * } + * @psalm-type SyliusGridConfig = array{ + * drivers?: list<"doctrine/orm"|"doctrine/phpcr-odm">, + * templates?: array{ + * filter?: array, + * action?: array, + * bulk_action?: array, + * }, + * grids?: array, + * }, + * sorting?: array, + * limits?: list, + * fields?: array, + * }>, + * filters?: array, + * form_options?: list, + * default_value?: mixed, + * }>, + * actions?: array, + * }>>, + * removals?: array, + * }>, + * } + * @psalm-type DoctrineConfig = array{ + * dbal?: array{ + * default_connection?: scalar|null, + * types?: array, + * driver_schemes?: array, + * connections?: array, + * mapping_types?: array, + * default_table_options?: array, + * schema_manager_factory?: scalar|null, // Default: "doctrine.dbal.default_schema_manager_factory" + * result_cache?: scalar|null, + * replicas?: array, + * }>, + * }, + * orm?: array{ + * default_entity_manager?: scalar|null, + * enable_native_lazy_objects?: bool, // Deprecated: The "enable_native_lazy_objects" option is deprecated and will be removed in DoctrineBundle 4.0, as native lazy objects are now always enabled. // Default: true + * controller_resolver?: bool|array{ + * enabled?: bool, // Default: true + * auto_mapping?: bool, // Deprecated: The "doctrine.orm.controller_resolver.auto_mapping.auto_mapping" option is deprecated and will be removed in DoctrineBundle 4.0, as it only accepts `false` since 3.0. // Set to true to enable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: false + * evict_cache?: bool, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false + * }, + * entity_managers?: array, + * }>, + * }>, + * }, + * connection?: scalar|null, + * class_metadata_factory_name?: scalar|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" + * default_repository_class?: scalar|null, // Default: "Doctrine\\ORM\\EntityRepository" + * auto_mapping?: scalar|null, // Default: false + * naming_strategy?: scalar|null, // Default: "doctrine.orm.naming_strategy.default" + * quote_strategy?: scalar|null, // Default: "doctrine.orm.quote_strategy.default" + * typed_field_mapper?: scalar|null, // Default: "doctrine.orm.typed_field_mapper.default" + * entity_listener_resolver?: scalar|null, // Default: null + * fetch_mode_subselect_batch_size?: scalar|null, + * repository_factory?: scalar|null, // Default: "doctrine.orm.container_repository_factory" + * schema_ignore_classes?: list, + * validate_xml_mapping?: bool, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728. // Default: false + * second_level_cache?: array{ + * region_cache_driver?: string|array{ + * type?: scalar|null, // Default: null + * id?: scalar|null, + * pool?: scalar|null, + * }, + * region_lock_lifetime?: scalar|null, // Default: 60 + * log_enabled?: bool, // Default: true + * region_lifetime?: scalar|null, // Default: 3600 + * enabled?: bool, // Default: true + * factory?: scalar|null, + * regions?: array, + * loggers?: array, + * }, + * hydrators?: array, + * mappings?: array, + * dql?: array{ + * string_functions?: array, + * numeric_functions?: array, + * datetime_functions?: array, + * }, + * filters?: array, + * }>, + * identity_generation_preferences?: array, + * }>, + * resolve_target_entities?: array, + * }, + * } + * @psalm-type WhiteOctoberPagerfantaConfig = array{ // Deprecated: The "white_october_pagerfanta" configuration node is deprecated, migrate your configuration to the "babdev_pagerfanta" configuration node. + * exceptions_strategy?: array{ + * out_of_range_page?: scalar|null, // Default: "to_http_not_found" + * not_valid_current_page?: scalar|null, // Default: "to_http_not_found" + * }, + * default_view?: scalar|null, // Default: "default" + * } + * @psalm-type ConfigType = array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * doctrine?: DoctrineConfig, + * white_october_pagerfanta?: WhiteOctoberPagerfantaConfig, + * "when@dev"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * doctrine?: DoctrineConfig, + * }, + * "when@prod"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * doctrine?: DoctrineConfig, + * }, + * "when@test"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * doctrine?: DoctrineConfig, + * }, + * ..., + * }> + * } + */ +final class App +{ + /** + * @param ConfigType $config + * + * @psalm-return ConfigType + */ + public static function config(array $config): array + { + return AppReference::config($config); + } +} + +namespace Symfony\Component\Routing\Loader\Configurator; + +/** + * This class provides array-shapes for configuring the routes of an application. + * + * Example: + * + * ```php + * // config/routes.php + * namespace Symfony\Component\Routing\Loader\Configurator; + * + * return Routes::config([ + * 'controllers' => [ + * 'resource' => 'routing.controllers', + * ], + * ]); + * ``` + * + * @psalm-type RouteConfig = array{ + * path: string|array, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type ImportConfig = array{ + * resource: string, + * type?: string, + * exclude?: string|list, + * prefix?: string|array, + * name_prefix?: string, + * trailing_slash_on_root?: bool, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type AliasConfig = array{ + * alias: string, + * deprecated?: array{package:string, version:string, message?:string}, + * } + * @psalm-type RoutesConfig = array{ + * "when@dev"?: array, + * "when@prod"?: array, + * "when@test"?: array, + * ... + * } + */ +final class Routes +{ + /** + * @param RoutesConfig $config + * + * @psalm-return RoutesConfig + */ + public static function config(array $config): array + { + return $config; + } +} diff --git a/src/AdminUi/tests/Functional/.application/config/routes/framework.yaml b/src/AdminUi/tests/Functional/.application/config/routes/framework.yaml index 0fc74bbac..bc1feace1 100644 --- a/src/AdminUi/tests/Functional/.application/config/routes/framework.yaml +++ b/src/AdminUi/tests/Functional/.application/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.php' prefix: /_error diff --git a/src/AdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml b/src/AdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml index 0c8ade2c2..e4c326435 100644 --- a/src/AdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml +++ b/src/AdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml @@ -2,6 +2,6 @@ sylius_crud_routes: resource: 'sylius.routing.loader.crud_routes_attributes' type: service -sylius_routes: - resource: 'sylius.routing.loader.routes_attributes' +sylius_resource_routes: + resource: 'sylius.symfony.routing.loader.resource' type: service diff --git a/src/BootstrapAdminUi/composer.json b/src/BootstrapAdminUi/composer.json index fbb805357..0b7bdbbc1 100644 --- a/src/BootstrapAdminUi/composer.json +++ b/src/BootstrapAdminUi/composer.json @@ -6,29 +6,29 @@ "php": "^8.1", "pagerfanta/twig": "^4.6", "sylius/admin-ui": "^0.10", - "sylius/grid-bundle": "^1.13", - "sylius/resource-bundle": "^1.11", + "sylius/grid-bundle": "^1.13 || ^1.15@alpha", + "sylius/resource-bundle": "dev-symfony-8 as 1.14.0", "sylius/twig-extra": "^0.10", "sylius/twig-hooks": "^0.10", - "symfony/asset": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/http-client": "^6.4 || ^7.0", - "symfony/security-bundle": "^6.4 || ^7.0", + "symfony/asset": "^6.4 || ^7.4 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.4 || ^8.0", + "symfony/http-client": "^6.4 || ^7.4 || ^8.0", + "symfony/security-bundle": "^6.4 || ^7.4 || ^8.0", "symfony/ux-autocomplete": "^2.17", "symfony/ux-icons": "^2.20", "symfony/ux-live-component": "^2.17" }, "require-dev": { - "doctrine/doctrine-bundle": "^2.12", - "doctrine/orm": "^2.0", - "phpunit/phpunit": "^9.6", - "symfony/browser-kit": "^6.4 || ^7.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/css-selector": "^6.4 || ^7.0", - "symfony/dotenv": "^6.4 || ^7.0", - "symfony/framework-bundle": "^6.4 || ^7.0", - "symfony/runtime": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0" + "doctrine/doctrine-bundle": "^2.13 || ^3.0 || ^4.0", + "doctrine/orm": "^3.3 || ^4.0", + "phpunit/phpunit": "^10.5", + "symfony/browser-kit": "^6.4 || ^7.4 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.4 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.4 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/runtime": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0" }, "autoload": { "psr-4": { @@ -53,6 +53,7 @@ "type": "path", "url": "../**" } + ], "extra": { "symfony": { diff --git a/src/BootstrapAdminUi/phpunit.xml.dist b/src/BootstrapAdminUi/phpunit.xml.dist index 5e1e6bf28..682d7a860 100644 --- a/src/BootstrapAdminUi/phpunit.xml.dist +++ b/src/BootstrapAdminUi/phpunit.xml.dist @@ -5,7 +5,6 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" colors="true" bootstrap="tests/Functional/.application/config/bootstrap.php" - convertDeprecationsToExceptions="true" > diff --git a/src/BootstrapAdminUi/tests/Functional/.application/config/packages/doctrine.yaml b/src/BootstrapAdminUi/tests/Functional/.application/config/packages/doctrine.yaml index d42c52d6d..171cd6588 100644 --- a/src/BootstrapAdminUi/tests/Functional/.application/config/packages/doctrine.yaml +++ b/src/BootstrapAdminUi/tests/Functional/.application/config/packages/doctrine.yaml @@ -7,11 +7,7 @@ doctrine: #server_version: '16' profiling_collect_backtrace: '%kernel.debug%' - use_savepoints: true 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 diff --git a/src/BootstrapAdminUi/tests/Functional/.application/config/reference.php b/src/BootstrapAdminUi/tests/Functional/.application/config/reference.php new file mode 100644 index 000000000..6f5c20aa9 --- /dev/null +++ b/src/BootstrapAdminUi/tests/Functional/.application/config/reference.php @@ -0,0 +1,1552 @@ + [ + * 'App\\' => [ + * 'resource' => '../src/', + * ], + * ], + * ]); + * ``` + * + * @psalm-type ImportsConfig = list + * @psalm-type ParametersConfig = array|null>|null> + * @psalm-type ArgumentsType = list|array + * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} + * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key + * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator|ExpressionConfigurator + * @psalm-type DeprecationType = array{package: string, version: string, message?: string} + * @psalm-type DefaultsType = array{ + * public?: bool, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * } + * @psalm-type InstanceofType = array{ + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type DefinitionType = array{ + * class?: string, + * file?: string, + * parent?: string, + * shared?: bool, + * synthetic?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * configurator?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * decorates?: string, + * decoration_inner_name?: string, + * decoration_priority?: int, + * decoration_on_invalid?: 'exception'|'ignore'|null, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * from_callable?: CallbackType, + * } + * @psalm-type AliasType = string|array{ + * alias: string, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type PrototypeType = array{ + * resource: string, + * namespace?: string, + * exclude?: string|list, + * parent?: string, + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type StackType = array{ + * stack: list>, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type ServicesConfig = array{ + * _defaults?: DefaultsType, + * _instanceof?: InstanceofType, + * ... + * } + * @psalm-type ExtensionType = array + * @psalm-type DoctrineConfig = array{ + * dbal?: array{ + * default_connection?: scalar|null, + * types?: array, + * driver_schemes?: array, + * connections?: array, + * mapping_types?: array, + * default_table_options?: array, + * schema_manager_factory?: scalar|null, // Default: "doctrine.dbal.default_schema_manager_factory" + * result_cache?: scalar|null, + * replicas?: array, + * }>, + * }, + * orm?: array{ + * default_entity_manager?: scalar|null, + * enable_native_lazy_objects?: bool, // Deprecated: The "enable_native_lazy_objects" option is deprecated and will be removed in DoctrineBundle 4.0, as native lazy objects are now always enabled. // Default: true + * controller_resolver?: bool|array{ + * enabled?: bool, // Default: true + * auto_mapping?: bool, // Deprecated: The "doctrine.orm.controller_resolver.auto_mapping.auto_mapping" option is deprecated and will be removed in DoctrineBundle 4.0, as it only accepts `false` since 3.0. // Set to true to enable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: false + * evict_cache?: bool, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false + * }, + * entity_managers?: array, + * }>, + * }>, + * }, + * connection?: scalar|null, + * class_metadata_factory_name?: scalar|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" + * default_repository_class?: scalar|null, // Default: "Doctrine\\ORM\\EntityRepository" + * auto_mapping?: scalar|null, // Default: false + * naming_strategy?: scalar|null, // Default: "doctrine.orm.naming_strategy.default" + * quote_strategy?: scalar|null, // Default: "doctrine.orm.quote_strategy.default" + * typed_field_mapper?: scalar|null, // Default: "doctrine.orm.typed_field_mapper.default" + * entity_listener_resolver?: scalar|null, // Default: null + * fetch_mode_subselect_batch_size?: scalar|null, + * repository_factory?: scalar|null, // Default: "doctrine.orm.container_repository_factory" + * schema_ignore_classes?: list, + * validate_xml_mapping?: bool, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728. // Default: false + * second_level_cache?: array{ + * region_cache_driver?: string|array{ + * type?: scalar|null, // Default: null + * id?: scalar|null, + * pool?: scalar|null, + * }, + * region_lock_lifetime?: scalar|null, // Default: 60 + * log_enabled?: bool, // Default: true + * region_lifetime?: scalar|null, // Default: 3600 + * enabled?: bool, // Default: true + * factory?: scalar|null, + * regions?: array, + * loggers?: array, + * }, + * hydrators?: array, + * mappings?: array, + * dql?: array{ + * string_functions?: array, + * numeric_functions?: array, + * datetime_functions?: array, + * }, + * filters?: array, + * }>, + * identity_generation_preferences?: array, + * }>, + * resolve_target_entities?: array, + * }, + * } + * @psalm-type FrameworkConfig = array{ + * secret?: scalar|null, + * http_method_override?: bool, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false + * allowed_http_method_override?: list|null, + * trust_x_sendfile_type_header?: scalar|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|null, // Default: "%env(default::SYMFONY_IDE)%" + * test?: bool, + * default_locale?: scalar|null, // Default: "en" + * set_locale_from_accept_language?: bool, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false + * set_content_language_from_locale?: bool, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false + * enabled_locales?: list, + * trusted_hosts?: list, + * trusted_proxies?: mixed, // Default: ["%env(default::SYMFONY_TRUSTED_PROXIES)%"] + * trusted_headers?: list, + * error_controller?: scalar|null, // Default: "error_controller" + * handle_all_throwables?: bool, // HttpKernel will handle all kinds of \Throwable. // Default: true + * csrf_protection?: bool|array{ + * enabled?: scalar|null, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" + * }, + * form?: bool|array{ // Form configuration + * enabled?: bool, // Default: true + * csrf_protection?: array{ + * enabled?: scalar|null, // Default: null + * token_id?: scalar|null, // Default: null + * field_name?: scalar|null, // Default: "_token" + * field_attr?: array, + * }, + * }, + * http_cache?: bool|array{ // HTTP cache configuration + * enabled?: bool, // Default: false + * debug?: bool, // Default: "%kernel.debug%" + * trace_level?: "none"|"short"|"full", + * trace_header?: scalar|null, + * default_ttl?: int, + * private_headers?: list, + * skip_response_headers?: list, + * allow_reload?: bool, + * allow_revalidate?: bool, + * stale_while_revalidate?: int, + * stale_if_error?: int, + * terminate_on_cache_hit?: bool, + * }, + * esi?: bool|array{ // ESI configuration + * enabled?: bool, // Default: false + * }, + * ssi?: bool|array{ // SSI configuration + * enabled?: bool, // Default: false + * }, + * fragments?: bool|array{ // Fragments configuration + * enabled?: bool, // Default: false + * hinclude_default_template?: scalar|null, // Default: null + * path?: scalar|null, // Default: "/_fragment" + * }, + * profiler?: bool|array{ // Profiler configuration + * enabled?: bool, // Default: false + * collect?: bool, // Default: true + * collect_parameter?: scalar|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null + * only_exceptions?: bool, // Default: false + * only_main_requests?: bool, // Default: false + * dsn?: scalar|null, // Default: "file:%kernel.cache_dir%/profiler" + * collect_serializer_data?: true, // Default: true + * }, + * workflows?: bool|array{ + * enabled?: bool, // Default: false + * workflows?: array, + * definition_validators?: list, + * support_strategy?: scalar|null, + * initial_marking?: list, + * events_to_dispatch?: list|null, + * places?: list, + * }>, + * transitions: list, + * to?: list, + * weight?: int, // Default: 1 + * metadata?: list, + * }>, + * metadata?: list, + * }>, + * }, + * router?: bool|array{ // Router configuration + * enabled?: bool, // Default: false + * resource: scalar|null, + * type?: scalar|null, + * default_uri?: scalar|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null + * http_port?: scalar|null, // Default: 80 + * https_port?: scalar|null, // Default: 443 + * strict_requirements?: scalar|null, // set to true to throw an exception when a parameter does not match the requirements set to false to disable exceptions when a parameter does not match the requirements (and return null instead) set to null to disable parameter checks against requirements 'true' is the preferred configuration in development mode, while 'false' or 'null' might be preferred in production // Default: true + * utf8?: bool, // Default: true + * }, + * session?: bool|array{ // Session configuration + * enabled?: bool, // Default: false + * storage_factory_id?: scalar|null, // Default: "session.storage.factory.native" + * handler_id?: scalar|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * name?: scalar|null, + * cookie_lifetime?: scalar|null, + * cookie_path?: scalar|null, + * cookie_domain?: scalar|null, + * cookie_secure?: true|false|"auto", // Default: "auto" + * cookie_httponly?: bool, // Default: true + * cookie_samesite?: null|"lax"|"strict"|"none", // Default: "lax" + * use_cookies?: bool, + * gc_divisor?: scalar|null, + * gc_probability?: scalar|null, + * gc_maxlifetime?: scalar|null, + * save_path?: scalar|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. + * metadata_update_threshold?: int, // Seconds to wait between 2 session metadata updates. // Default: 0 + * }, + * request?: bool|array{ // Request configuration + * enabled?: bool, // Default: false + * formats?: array>, + * }, + * assets?: bool|array{ // Assets configuration + * enabled?: bool, // Default: true + * strict_mode?: bool, // Throw an exception if an entry is missing from the manifest.json. // Default: false + * version_strategy?: scalar|null, // Default: null + * version?: scalar|null, // Default: null + * version_format?: scalar|null, // Default: "%%s?%%s" + * json_manifest_path?: scalar|null, // Default: null + * base_path?: scalar|null, // Default: "" + * base_urls?: list, + * packages?: array, + * }>, + * }, + * asset_mapper?: bool|array{ // Asset Mapper configuration + * enabled?: bool, // Default: true + * paths?: array, + * excluded_patterns?: list, + * exclude_dotfiles?: bool, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true + * server?: bool, // If true, a "dev server" will return the assets from the public directory (true in "debug" mode only by default). // Default: true + * public_prefix?: scalar|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/" + * missing_import_mode?: "strict"|"warn"|"ignore", // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn" + * extensions?: array, + * importmap_path?: scalar|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" + * importmap_script_attributes?: array, + * vendor_dir?: scalar|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor" + * precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip. + * enabled?: bool, // Default: false + * formats?: list, + * extensions?: list, + * }, + * }, + * translator?: bool|array{ // Translator configuration + * enabled?: bool, // Default: true + * fallbacks?: list, + * logging?: bool, // Default: false + * formatter?: scalar|null, // Default: "translator.formatter.default" + * cache_dir?: scalar|null, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" + * paths?: list, + * pseudo_localization?: bool|array{ + * enabled?: bool, // Default: false + * accents?: bool, // Default: true + * expansion_factor?: float, // Default: 1.0 + * brackets?: bool, // Default: true + * parse_html?: bool, // Default: false + * localizable_html_attributes?: list, + * }, + * providers?: array, + * locales?: list, + * }>, + * globals?: array, + * domain?: string, + * }>, + * }, + * validation?: bool|array{ // Validation configuration + * enabled?: bool, // Default: true + * enable_attributes?: bool, // Default: true + * static_method?: list, + * translation_domain?: scalar|null, // Default: "validators" + * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict", // Default: "html5" + * mapping?: array{ + * paths?: list, + * }, + * not_compromised_password?: bool|array{ + * enabled?: bool, // When disabled, compromised passwords will be accepted as valid. // Default: true + * endpoint?: scalar|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null + * }, + * disable_translation?: bool, // Default: false + * auto_mapping?: array, + * }>, + * }, + * serializer?: bool|array{ // Serializer configuration + * enabled?: bool, // Default: false + * enable_attributes?: bool, // Default: true + * name_converter?: scalar|null, + * circular_reference_handler?: scalar|null, + * max_depth_handler?: scalar|null, + * mapping?: array{ + * paths?: list, + * }, + * default_context?: list, + * named_serializers?: array, + * include_built_in_normalizers?: bool, // Whether to include the built-in normalizers // Default: true + * include_built_in_encoders?: bool, // Whether to include the built-in encoders // Default: true + * }>, + * }, + * property_access?: bool|array{ // Property access configuration + * enabled?: bool, // Default: true + * magic_call?: bool, // Default: false + * magic_get?: bool, // Default: true + * magic_set?: bool, // Default: true + * throw_exception_on_invalid_index?: bool, // Default: false + * throw_exception_on_invalid_property_path?: bool, // Default: true + * }, + * type_info?: bool|array{ // Type info configuration + * enabled?: bool, // Default: true + * aliases?: array, + * }, + * property_info?: bool|array{ // Property info configuration + * enabled?: bool, // Default: true + * with_constructor_extractor?: bool, // Registers the constructor extractor. // Default: true + * }, + * cache?: array{ // Cache configuration + * prefix_seed?: scalar|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|null, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|null, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|null, + * default_redis_provider?: scalar|null, // Default: "redis://localhost" + * default_valkey_provider?: scalar|null, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|null, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|null, // Default: "database_connection" + * default_pdo_provider?: scalar|null, // Default: null + * pools?: array, + * tags?: scalar|null, // Default: null + * public?: bool, // Default: false + * default_lifetime?: scalar|null, // Default lifetime of the pool. + * provider?: scalar|null, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|null, + * clearer?: scalar|null, + * }>, + * }, + * php_errors?: array{ // PHP errors handling configuration + * log?: mixed, // Use the application logger instead of the PHP logger for logging PHP errors. // Default: true + * throw?: bool, // Throw PHP errors as \ErrorException instances. // Default: true + * }, + * exceptions?: array, + * web_link?: bool|array{ // Web links configuration + * enabled?: bool, // Default: false + * }, + * lock?: bool|string|array{ // Lock configuration + * enabled?: bool, // Default: false + * resources?: array>, + * }, + * semaphore?: bool|string|array{ // Semaphore configuration + * enabled?: bool, // Default: false + * resources?: array, + * }, + * messenger?: bool|array{ // Messenger configuration + * enabled?: bool, // Default: false + * routing?: array, + * }>, + * serializer?: array{ + * default_serializer?: scalar|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * symfony_serializer?: array{ + * format?: scalar|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" + * context?: array, + * }, + * }, + * transports?: array, + * failure_transport?: scalar|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * retry_strategy?: string|array{ + * service?: scalar|null, // Service id to override the retry strategy entirely. // Default: null + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 + * }, + * rate_limiter?: scalar|null, // Rate limiter name to use when processing messages. // Default: null + * }>, + * failure_transport?: scalar|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|null, // Default: null + * buses?: array, + * }>, + * }>, + * }, + * scheduler?: bool|array{ // Scheduler configuration + * enabled?: bool, // Default: false + * }, + * disallow_search_engine_index?: bool, // Enabled by default when debug is enabled. // Default: true + * http_client?: bool|array{ // HTTP Client configuration + * enabled?: bool, // Default: true + * max_host_connections?: int, // The maximum number of connections to a single host. + * default_options?: array{ + * headers?: array, + * vars?: array, + * max_redirects?: int, // The maximum number of redirects to follow. + * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|null, // A certificate authority file. + * capath?: scalar|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null, // A PEM formatted certificate file. + * local_pk?: scalar|null, // A private key file. + * passphrase?: scalar|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool, // Default: false + * cache_pool?: string, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool, // Default: false + * retry_strategy?: scalar|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }, + * mock_response_factory?: scalar|null, // The id of the service that should generate mock responses. It should be either an invokable or an iterable. + * scoped_clients?: array, + * headers?: array, + * max_redirects?: int, // The maximum number of redirects to follow. + * http_version?: scalar|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|null, // A certificate authority file. + * capath?: scalar|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null, // A PEM formatted certificate file. + * local_pk?: scalar|null, // A private key file. + * passphrase?: scalar|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool, // Default: false + * cache_pool?: string, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool, // Default: false + * retry_strategy?: scalar|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int, // Default: 3 + * delay?: int, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }>, + * }, + * mailer?: bool|array{ // Mailer configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|null, // Default: null + * transports?: array, + * envelope?: array{ // Mailer Envelope configuration + * sender?: scalar|null, + * recipients?: list, + * allowed_recipients?: list, + * }, + * headers?: array, + * dkim_signer?: bool|array{ // DKIM signer configuration + * enabled?: bool, // Default: false + * key?: scalar|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|null, // Default: "" + * select?: scalar|null, // Default: "" + * passphrase?: scalar|null, // The private key passphrase // Default: "" + * options?: array, + * }, + * smime_signer?: bool|array{ // S/MIME signer configuration + * enabled?: bool, // Default: false + * key?: scalar|null, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|null, // The private key passphrase // Default: null + * extra_certificates?: scalar|null, // Default: null + * sign_options?: int, // Default: null + * }, + * smime_encrypter?: bool|array{ // S/MIME encrypter configuration + * enabled?: bool, // Default: false + * repository?: scalar|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" + * cipher?: int, // A set of algorithms used to encrypt the message // Default: null + * }, + * }, + * secrets?: bool|array{ + * enabled?: bool, // Default: true + * vault_directory?: scalar|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|null, // Default: "%kernel.project_dir%/.env.%kernel.runtime_environment%.local" + * decryption_env_var?: scalar|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" + * }, + * notifier?: bool|array{ // Notifier configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * chatter_transports?: array, + * texter_transports?: array, + * notification_on_failed_messages?: bool, // Default: false + * channel_policy?: array>, + * admin_recipients?: list, + * }, + * rate_limiter?: bool|array{ // Rate limiter configuration + * enabled?: bool, // Default: false + * limiters?: array, + * limit?: int, // The maximum allowed hits in a fixed interval or burst. + * interval?: scalar|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". + * interval?: scalar|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * amount?: int, // Amount of tokens to add each interval. // Default: 1 + * }, + * }>, + * }, + * uid?: bool|array{ // Uid configuration + * enabled?: bool, // Default: false + * default_uuid_version?: 7|6|4|1, // Default: 7 + * name_based_uuid_version?: 5|3, // Default: 5 + * name_based_uuid_namespace?: scalar|null, + * time_based_uuid_version?: 7|6|1, // Default: 7 + * time_based_uuid_node?: scalar|null, + * }, + * html_sanitizer?: bool|array{ // HtmlSanitizer configuration + * enabled?: bool, // Default: false + * sanitizers?: array, + * block_elements?: list, + * drop_elements?: list, + * allow_attributes?: array, + * drop_attributes?: array, + * force_attributes?: array>, + * force_https_urls?: bool, // Transforms URLs using the HTTP scheme to use the HTTPS scheme instead. // Default: false + * allowed_link_schemes?: list, + * allowed_link_hosts?: list|null, + * allow_relative_links?: bool, // Allows relative URLs to be used in links href attributes. // Default: false + * allowed_media_schemes?: list, + * allowed_media_hosts?: list|null, + * allow_relative_medias?: bool, // Allows relative URLs to be used in media source attributes (img, audio, video, ...). // Default: false + * with_attribute_sanitizers?: list, + * without_attribute_sanitizers?: list, + * max_input_length?: int, // The maximum length allowed for the sanitized input. // Default: 0 + * }>, + * }, + * webhook?: bool|array{ // Webhook configuration + * enabled?: bool, // Default: false + * message_bus?: scalar|null, // The message bus to use. // Default: "messenger.default_bus" + * routing?: array, + * }, + * remote-event?: bool|array{ // RemoteEvent configuration + * enabled?: bool, // Default: false + * }, + * json_streamer?: bool|array{ // JSON streamer configuration + * enabled?: bool, // Default: false + * }, + * } + * @psalm-type TwigConfig = array{ + * form_themes?: list, + * globals?: array, + * autoescape_service?: scalar|null, // Default: null + * autoescape_service_method?: scalar|null, // Default: null + * cache?: scalar|null, // Default: true + * charset?: scalar|null, // Default: "%kernel.charset%" + * debug?: bool, // Default: "%kernel.debug%" + * strict_variables?: bool, // Default: "%kernel.debug%" + * auto_reload?: scalar|null, + * optimizations?: int, + * default_path?: scalar|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" + * file_name_pattern?: list, + * paths?: array, + * date?: array{ // The default format options used by the date filter. + * format?: scalar|null, // Default: "F j, Y H:i" + * interval_format?: scalar|null, // Default: "%d days" + * timezone?: scalar|null, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null + * }, + * number_format?: array{ // The default format options for the number_format filter. + * decimals?: int, // Default: 0 + * decimal_point?: scalar|null, // Default: "." + * thousands_separator?: scalar|null, // Default: "," + * }, + * mailer?: array{ + * html_to_text_converter?: scalar|null, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null + * }, + * } + * @psalm-type SecurityConfig = array{ + * access_denied_url?: scalar|null, // Default: null + * session_fixation_strategy?: "none"|"migrate"|"invalidate", // Default: "migrate" + * expose_security_errors?: \Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::None|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::AccountStatus|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::All, // Default: "none" + * erase_credentials?: bool, // Default: true + * access_decision_manager?: array{ + * strategy?: "affirmative"|"consensus"|"unanimous"|"priority", + * service?: scalar|null, + * strategy_service?: scalar|null, + * allow_if_all_abstain?: bool, // Default: false + * allow_if_equal_granted_denied?: bool, // Default: true + * }, + * password_hashers?: array, + * hash_algorithm?: scalar|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512" + * key_length?: scalar|null, // Default: 40 + * ignore_case?: bool, // Default: false + * encode_as_base64?: bool, // Default: true + * iterations?: scalar|null, // Default: 5000 + * cost?: int, // Default: null + * memory_cost?: scalar|null, // Default: null + * time_cost?: scalar|null, // Default: null + * id?: scalar|null, + * }>, + * providers?: array, + * }, + * entity?: array{ + * class: scalar|null, // The full entity class name of your user class. + * property?: scalar|null, // Default: null + * manager_name?: scalar|null, // Default: null + * }, + * memory?: array{ + * users?: array, + * }>, + * }, + * ldap?: array{ + * service: scalar|null, + * base_dn: scalar|null, + * search_dn?: scalar|null, // Default: null + * search_password?: scalar|null, // Default: null + * extra_fields?: list, + * default_roles?: list, + * role_fetcher?: scalar|null, // Default: null + * uid_key?: scalar|null, // Default: "sAMAccountName" + * filter?: scalar|null, // Default: "({uid_key}={user_identifier})" + * password_attribute?: scalar|null, // Default: null + * }, + * }>, + * firewalls: array, + * security?: bool, // Default: true + * user_checker?: scalar|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker" + * request_matcher?: scalar|null, + * access_denied_url?: scalar|null, + * access_denied_handler?: scalar|null, + * entry_point?: scalar|null, // An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface". + * provider?: scalar|null, + * stateless?: bool, // Default: false + * lazy?: bool, // Default: false + * context?: scalar|null, + * logout?: array{ + * enable_csrf?: bool|null, // Default: null + * csrf_token_id?: scalar|null, // Default: "logout" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_manager?: scalar|null, + * path?: scalar|null, // Default: "/logout" + * target?: scalar|null, // Default: "/" + * invalidate_session?: bool, // Default: true + * clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts">, + * delete_cookies?: array, + * }, + * switch_user?: array{ + * provider?: scalar|null, + * parameter?: scalar|null, // Default: "_switch_user" + * role?: scalar|null, // Default: "ROLE_ALLOWED_TO_SWITCH" + * target_route?: scalar|null, // Default: null + * }, + * required_badges?: list, + * custom_authenticators?: list, + * login_throttling?: array{ + * limiter?: scalar|null, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface". + * max_attempts?: int, // Default: 5 + * interval?: scalar|null, // Default: "1 minute" + * lock_factory?: scalar|null, // The service ID of the lock factory used by the login rate limiter (or null to disable locking). // Default: null + * cache_pool?: string, // The cache pool to use for storing the limiter state // Default: "cache.rate_limiter" + * storage_service?: string, // The service ID of a custom storage implementation, this precedes any configured "cache_pool" // Default: null + * }, + * x509?: array{ + * provider?: scalar|null, + * user?: scalar|null, // Default: "SSL_CLIENT_S_DN_Email" + * credentials?: scalar|null, // Default: "SSL_CLIENT_S_DN" + * user_identifier?: scalar|null, // Default: "emailAddress" + * }, + * remote_user?: array{ + * provider?: scalar|null, + * user?: scalar|null, // Default: "REMOTE_USER" + * }, + * login_link?: array{ + * check_route: scalar|null, // Route that will validate the login link - e.g. "app_login_link_verify". + * check_post_only?: scalar|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false + * signature_properties: list, + * lifetime?: int, // The lifetime of the login link in seconds. // Default: 600 + * max_uses?: int, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null + * used_link_cache?: scalar|null, // Cache service id used to expired links of max_uses is set. + * success_handler?: scalar|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface. + * failure_handler?: scalar|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface. + * provider?: scalar|null, // The user provider to load users from. + * secret?: scalar|null, // Default: "%kernel.secret%" + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * login_path?: scalar|null, // Default: "/login" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * }, + * form_login?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_parameter?: scalar|null, // Default: "_username" + * password_parameter?: scalar|null, // Default: "_password" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|null, // Default: "authenticate" + * enable_csrf?: bool, // Default: false + * post_only?: bool, // Default: true + * form_only?: bool, // Default: false + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * }, + * form_login_ldap?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_parameter?: scalar|null, // Default: "_username" + * password_parameter?: scalar|null, // Default: "_password" + * csrf_parameter?: scalar|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|null, // Default: "authenticate" + * enable_csrf?: bool, // Default: false + * post_only?: bool, // Default: true + * form_only?: bool, // Default: false + * always_use_default_target_path?: bool, // Default: false + * default_target_path?: scalar|null, // Default: "/" + * target_path_parameter?: scalar|null, // Default: "_target_path" + * use_referer?: bool, // Default: false + * failure_path?: scalar|null, // Default: null + * failure_forward?: bool, // Default: false + * failure_path_parameter?: scalar|null, // Default: "_failure_path" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * json_login?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_path?: scalar|null, // Default: "username" + * password_path?: scalar|null, // Default: "password" + * }, + * json_login_ldap?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * check_path?: scalar|null, // Default: "/login_check" + * use_forward?: bool, // Default: false + * login_path?: scalar|null, // Default: "/login" + * username_path?: scalar|null, // Default: "username" + * password_path?: scalar|null, // Default: "password" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * access_token?: array{ + * provider?: scalar|null, + * remember_me?: bool, // Default: true + * success_handler?: scalar|null, + * failure_handler?: scalar|null, + * realm?: scalar|null, // Default: null + * token_extractors?: list, + * token_handler: string|array{ + * id?: scalar|null, + * oidc_user_info?: string|array{ + * base_uri: scalar|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). + * discovery?: array{ // Enable the OIDC discovery. + * cache?: array{ + * id: scalar|null, // Cache service id to use to cache the OIDC discovery configuration. + * }, + * }, + * claim?: scalar|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" + * client?: scalar|null, // HttpClient service id to use to call the OIDC server. + * }, + * oidc?: array{ + * discovery?: array{ // Enable the OIDC discovery. + * base_uri: list, + * cache?: array{ + * id: scalar|null, // Cache service id to use to cache the OIDC discovery configuration. + * }, + * }, + * claim?: scalar|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" + * audience: scalar|null, // Audience set in the token, for validation purpose. + * issuers: list, + * algorithms: list, + * keyset?: scalar|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). + * encryption?: bool|array{ + * enabled?: bool, // Default: false + * enforce?: bool, // When enabled, the token shall be encrypted. // Default: false + * algorithms: list, + * keyset: scalar|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). + * }, + * }, + * cas?: array{ + * validation_url: scalar|null, // CAS server validation URL + * prefix?: scalar|null, // CAS prefix // Default: "cas" + * http_client?: scalar|null, // HTTP Client service // Default: null + * }, + * oauth2?: scalar|null, + * }, + * }, + * http_basic?: array{ + * provider?: scalar|null, + * realm?: scalar|null, // Default: "Secured Area" + * }, + * http_basic_ldap?: array{ + * provider?: scalar|null, + * realm?: scalar|null, // Default: "Secured Area" + * service?: scalar|null, // Default: "ldap" + * dn_string?: scalar|null, // Default: "{user_identifier}" + * query_string?: scalar|null, + * search_dn?: scalar|null, // Default: "" + * search_password?: scalar|null, // Default: "" + * }, + * remember_me?: array{ + * secret?: scalar|null, // Default: "%kernel.secret%" + * service?: scalar|null, + * user_providers?: list, + * catch_exceptions?: bool, // Default: true + * signature_properties?: list, + * token_provider?: string|array{ + * service?: scalar|null, // The service ID of a custom remember-me token provider. + * doctrine?: bool|array{ + * enabled?: bool, // Default: false + * connection?: scalar|null, // Default: null + * }, + * }, + * token_verifier?: scalar|null, // The service ID of a custom rememberme token verifier. + * name?: scalar|null, // Default: "REMEMBERME" + * lifetime?: int, // Default: 31536000 + * path?: scalar|null, // Default: "/" + * domain?: scalar|null, // Default: null + * secure?: true|false|"auto", // Default: null + * httponly?: bool, // Default: true + * samesite?: null|"lax"|"strict"|"none", // Default: "lax" + * always_remember_me?: bool, // Default: false + * remember_me_parameter?: scalar|null, // Default: "_remember_me" + * }, + * }>, + * access_control?: list, + * attributes?: array, + * route?: scalar|null, // Default: null + * methods?: list, + * allow_if?: scalar|null, // Default: null + * roles?: list, + * }>, + * role_hierarchy?: array>, + * } + * @psalm-type TwigComponentConfig = array{ + * defaults?: array, + * anonymous_template_directory?: scalar|null, // Defaults to `components` + * profiler?: bool, // Enables the profiler for Twig Component (in debug mode) // Default: "%kernel.debug%" + * controllers_json?: scalar|null, // Deprecated: The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0. // Default: null + * } + * @psalm-type SyliusTwigHooksConfig = array{ + * enable_autoprefixing?: bool, // Default: false + * hook_name_section_separator?: scalar|null, // Default: false + * supported_hookable_types?: array, + * hooks?: array, + * props?: array, + * configuration?: array, + * priority?: int, // Default: null + * }>>, + * } + * @psalm-type SyliusBootstrapAdminUiConfig = array + * @psalm-type SyliusGridConfig = array{ + * drivers?: list<"doctrine/orm"|"doctrine/phpcr-odm">, + * templates?: array{ + * filter?: array, + * action?: array, + * bulk_action?: array, + * }, + * grids?: array, + * }, + * sorting?: array, + * limits?: list, + * fields?: array, + * }>, + * filters?: array, + * form_options?: list, + * default_value?: mixed, + * }>, + * actions?: array, + * }>>, + * removals?: array, + * }>, + * } + * @psalm-type SyliusResourceConfig = array{ + * resources?: array, + * settings?: array{ + * paginate?: mixed, // Default: null + * limit?: mixed, // Default: null + * allowed_paginate?: list, + * default_page_size?: int, // Default: 10 + * default_templates_dir?: scalar|null, // Default: null + * sortable?: bool, // Default: false + * sorting?: mixed, // Default: null + * filterable?: bool, // Default: false + * criteria?: mixed, // Default: null + * state_machine_component?: scalar|null, // Default: null + * }, + * translation?: bool|array{ + * enabled?: bool, // Default: true + * locale_provider?: scalar|null, // Default: "sylius.translation_locale_provider.immutable" + * }, + * drivers?: list<"doctrine/orm"|"doctrine/mongodb-odm"|"doctrine/phpcr-odm">, + * mapping?: array{ + * imports?: list, + * paths?: list, + * }, + * authorization_checker?: scalar|null, // Default: "sylius.resource_controller.authorization_checker.disabled" + * routing_path_bc_layer?: bool, + * path_segment_name_generator?: scalar|null, // Specify a path name generator to use. // Default: "sylius.metadata.path_segment_name_generator.dash" + * } + * @psalm-type SyliusTwigExtraConfig = array{ + * twig_ux?: array{ + * anonymous_component_template_prefixes?: array, + * }, + * } + * @psalm-type KnpMenuConfig = array{ + * providers?: array{ + * builder_alias?: bool, // Default: true + * }, + * twig?: array{ + * template?: scalar|null, // Default: "@KnpMenu/menu.html.twig" + * }, + * templating?: bool, // Default: false + * default_renderer?: scalar|null, // Default: "twig" + * } + * @psalm-type BabdevPagerfantaConfig = array{ + * default_view?: scalar|null, // Default: "default" + * default_twig_template?: scalar|null, // Default: "@BabDevPagerfanta/default.html.twig" + * exceptions_strategy?: array{ + * out_of_range_page?: "to_http_not_found"|"custom", // Default: "to_http_not_found" + * not_valid_current_page?: "to_http_not_found"|"custom", // Default: "to_http_not_found" + * }, + * } + * @psalm-type SyliusAdminUiConfig = array{ + * routing?: array, + * } + * @psalm-type UxIconsConfig = array{ + * icon_dir?: scalar|null, // The local directory where icons are stored. // Default: "%kernel.project_dir%/assets/icons" + * default_icon_attributes?: mixed, // Default attributes to add to all icons. // Default: {"fill":"currentColor"} + * icon_sets?: array, + * }>, + * aliases?: list, + * iconify?: bool|array{ // Configuration for the remote icon service. + * enabled?: bool, // Default: true + * on_demand?: bool, // Whether to download icons "on demand". // Default: true + * endpoint?: scalar|null, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design" + * }, + * ignore_not_found?: bool, // Ignore error when an icon is not found. Set to 'true' to fail silently. // Default: false + * } + * @psalm-type WhiteOctoberPagerfantaConfig = array{ // Deprecated: The "white_october_pagerfanta" configuration node is deprecated, migrate your configuration to the "babdev_pagerfanta" configuration node. + * exceptions_strategy?: array{ + * out_of_range_page?: scalar|null, // Default: "to_http_not_found" + * not_valid_current_page?: scalar|null, // Default: "to_http_not_found" + * }, + * default_view?: scalar|null, // Default: "default" + * } + * @psalm-type ConfigType = array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * doctrine?: DoctrineConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * knp_menu?: KnpMenuConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * ux_icons?: UxIconsConfig, + * white_october_pagerfanta?: WhiteOctoberPagerfantaConfig, + * "when@dev"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * doctrine?: DoctrineConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * knp_menu?: KnpMenuConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * ux_icons?: UxIconsConfig, + * }, + * "when@prod"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * doctrine?: DoctrineConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * knp_menu?: KnpMenuConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * ux_icons?: UxIconsConfig, + * }, + * "when@test"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * doctrine?: DoctrineConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * security?: SecurityConfig, + * twig_component?: TwigComponentConfig, + * sylius_twig_hooks?: SyliusTwigHooksConfig, + * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, + * sylius_grid?: SyliusGridConfig, + * sylius_resource?: SyliusResourceConfig, + * sylius_twig_extra?: SyliusTwigExtraConfig, + * knp_menu?: KnpMenuConfig, + * babdev_pagerfanta?: BabdevPagerfantaConfig, + * sylius_admin_ui?: SyliusAdminUiConfig, + * ux_icons?: UxIconsConfig, + * }, + * ..., + * }> + * } + */ +final class App +{ + /** + * @param ConfigType $config + * + * @psalm-return ConfigType + */ + public static function config(array $config): array + { + return AppReference::config($config); + } +} + +namespace Symfony\Component\Routing\Loader\Configurator; + +/** + * This class provides array-shapes for configuring the routes of an application. + * + * Example: + * + * ```php + * // config/routes.php + * namespace Symfony\Component\Routing\Loader\Configurator; + * + * return Routes::config([ + * 'controllers' => [ + * 'resource' => 'routing.controllers', + * ], + * ]); + * ``` + * + * @psalm-type RouteConfig = array{ + * path: string|array, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type ImportConfig = array{ + * resource: string, + * type?: string, + * exclude?: string|list, + * prefix?: string|array, + * name_prefix?: string, + * trailing_slash_on_root?: bool, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type AliasConfig = array{ + * alias: string, + * deprecated?: array{package:string, version:string, message?:string}, + * } + * @psalm-type RoutesConfig = array{ + * "when@dev"?: array, + * "when@prod"?: array, + * "when@test"?: array, + * ... + * } + */ +final class Routes +{ + /** + * @param RoutesConfig $config + * + * @psalm-return RoutesConfig + */ + public static function config(array $config): array + { + return $config; + } +} diff --git a/src/BootstrapAdminUi/tests/Functional/.application/config/routes/framework.yaml b/src/BootstrapAdminUi/tests/Functional/.application/config/routes/framework.yaml index 0fc74bbac..bc1feace1 100644 --- a/src/BootstrapAdminUi/tests/Functional/.application/config/routes/framework.yaml +++ b/src/BootstrapAdminUi/tests/Functional/.application/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.php' prefix: /_error diff --git a/src/BootstrapAdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml b/src/BootstrapAdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml index 0c8ade2c2..e4c326435 100644 --- a/src/BootstrapAdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml +++ b/src/BootstrapAdminUi/tests/Functional/.application/config/routes/sylius_resource.yaml @@ -2,6 +2,6 @@ sylius_crud_routes: resource: 'sylius.routing.loader.crud_routes_attributes' type: service -sylius_routes: - resource: 'sylius.routing.loader.routes_attributes' +sylius_resource_routes: + resource: 'sylius.symfony.routing.loader.resource' type: service diff --git a/src/TwigExtra/composer.json b/src/TwigExtra/composer.json index 4f0878396..c027642ce 100644 --- a/src/TwigExtra/composer.json +++ b/src/TwigExtra/composer.json @@ -15,20 +15,20 @@ ], "require": { "php": "^8.1", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/twig-bundle": "^6.4 || ^7.0", + "symfony/http-kernel": "^6.4 || ^7.4 || ^8.0", + "symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0", "symfony/ux-twig-component": "^2.17" }, "require-dev": { - "matthiasnoback/symfony-dependency-injection-test": "^5.1", - "phpunit/phpunit": "^9.6", - "symfony/browser-kit": "^6.4 || ^7.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/css-selector": "^6.4 || ^7.0", - "symfony/dotenv": "^6.4 || ^7.0", - "symfony/framework-bundle": "^6.4 || ^7.0", - "symfony/runtime": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0" + "matthiasnoback/symfony-dependency-injection-test": "^6.1.0", + "phpunit/phpunit": "^10.5", + "symfony/browser-kit": "^6.4 || ^7.4 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.4 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.4 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/runtime": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0" }, "conflict": { "sylius/ui-bundle": "<2.0" diff --git a/src/TwigExtra/phpunit.xml.dist b/src/TwigExtra/phpunit.xml.dist index 3e90732a4..99f913916 100644 --- a/src/TwigExtra/phpunit.xml.dist +++ b/src/TwigExtra/phpunit.xml.dist @@ -5,7 +5,6 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" colors="true" bootstrap="tests/Functional/.application/config/bootstrap.php" - convertDeprecationsToExceptions="true" > diff --git a/src/TwigExtra/tests/Functional/.application/config/routes/framework.yaml b/src/TwigExtra/tests/Functional/.application/config/routes/framework.yaml index 0fc74bbac..bc1feace1 100644 --- a/src/TwigExtra/tests/Functional/.application/config/routes/framework.yaml +++ b/src/TwigExtra/tests/Functional/.application/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.php' prefix: /_error diff --git a/src/TwigHooks/composer.json b/src/TwigHooks/composer.json index f617c945a..d3cb26cc0 100644 --- a/src/TwigHooks/composer.json +++ b/src/TwigHooks/composer.json @@ -16,29 +16,29 @@ "require": { "php": "^8.1", "laminas/laminas-stdlib": "^3.18", - "symfony/config": "^6.4 || ^7.0", - "symfony/dependency-injection": "^6.4 || ^7.0", - "symfony/expression-language": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/stopwatch": "^6.4 || ^7.0", + "symfony/config": "^6.4 || ^7.4 || ^8.0", + "symfony/dependency-injection": "^6.4 || ^7.4 || ^8.0", + "symfony/expression-language": "^6.4 || ^7.4 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.4 || ^8.0", + "symfony/stopwatch": "^6.4 || ^7.4 || ^8.0", "symfony/ux-live-component": "^2.17", "symfony/ux-twig-component": "^2.17", - "symfony/twig-bundle": "^6.4 || ^7.0", + "symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0", "twig/twig": "^2.15 || ^3.0", "webmozart/assert": "^1.9" }, "require-dev": { - "symfony/console": "^6.4 || ^7.0", - "symfony/dom-crawler": "^6.4 || ^7.0", - "symfony/dotenv": "^6.4 || ^7.0", - "symfony/framework-bundle": "^6.4 || ^7.0", - "symfony/runtime": "^6.4 || ^7.0", - "symfony/twig-bundle": "^6.4 || ^7.0", - "symfony/web-profiler-bundle": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0", - "matthiasnoback/symfony-config-test": "^5.1", - "matthiasnoback/symfony-dependency-injection-test": "^5.1", - "phpunit/phpunit": "^9.6" + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/dom-crawler": "^6.4 || ^7.4 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.4 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/runtime": "^6.4 || ^7.4 || ^8.0", + "symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/web-profiler-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0", + "matthiasnoback/symfony-config-test": "^6.1", + "matthiasnoback/symfony-dependency-injection-test": "^6.1.0", + "phpunit/phpunit": "^10.5" }, "suggest": { "symfony/ux-twig-component": "Symfony's package providing Twig components." diff --git a/src/TwigHooks/phpunit.xml.dist b/src/TwigHooks/phpunit.xml.dist index 56f25d259..85acf3881 100644 --- a/src/TwigHooks/phpunit.xml.dist +++ b/src/TwigHooks/phpunit.xml.dist @@ -5,7 +5,6 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" colors="true" bootstrap="tests/Functional/.application/config/bootstrap.php" - convertDeprecationsToExceptions="true" > diff --git a/src/TwigHooks/tests/Functional/.application/config/routes/framework.yaml b/src/TwigHooks/tests/Functional/.application/config/routes/framework.yaml index 0fc74bbac..bc1feace1 100644 --- a/src/TwigHooks/tests/Functional/.application/config/routes/framework.yaml +++ b/src/TwigHooks/tests/Functional/.application/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.php' prefix: /_error diff --git a/src/UiTranslations/composer.json b/src/UiTranslations/composer.json index d44e05a9e..e4a065e5d 100644 --- a/src/UiTranslations/composer.json +++ b/src/UiTranslations/composer.json @@ -4,18 +4,18 @@ "type": "library", "require": { "php": "^8.1", - "symfony/translation": "^6.4 || ^7.0", - "symfony/yaml": "^6.4 || ^7.0" + "symfony/translation": "^6.4 || ^7.4 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6", - "symfony/browser-kit": "^6.4 || ^7.0", - "symfony/console": "^6.4 || ^7.0", - "symfony/css-selector": "^6.4 || ^7.0", - "symfony/dotenv": "^6.4 || ^7.0", - "symfony/framework-bundle": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony/twig-bundle": "^6.4 || ^7.0", + "phpunit/phpunit": "^10.5", + "symfony/browser-kit": "^6.4 || ^7.4 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/css-selector": "^6.4 || ^7.4 || ^8.0", + "symfony/dotenv": "^6.4 || ^7.4 || ^8.0", + "symfony/framework-bundle": "^6.4 || ^7.4 || ^8.0", + "symfony/http-kernel": "^6.4 || ^7.4 || ^8.0", + "symfony/twig-bundle": "^6.4 || ^7.4 || ^8.0", "twig/twig": "^2.15 || ^3.0" }, "autoload": { diff --git a/src/UiTranslations/phpunit.xml.dist b/src/UiTranslations/phpunit.xml.dist index 575581fe1..abb6d8437 100644 --- a/src/UiTranslations/phpunit.xml.dist +++ b/src/UiTranslations/phpunit.xml.dist @@ -5,7 +5,6 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" colors="true" bootstrap="tests/Functional/.application/config/bootstrap.php" - convertDeprecationsToExceptions="true" > diff --git a/src/UiTranslations/tests/Functional/.application/config/routes/framework.yaml b/src/UiTranslations/tests/Functional/.application/config/routes/framework.yaml index 0fc74bbac..bc1feace1 100644 --- a/src/UiTranslations/tests/Functional/.application/config/routes/framework.yaml +++ b/src/UiTranslations/tests/Functional/.application/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.php' prefix: /_error diff --git a/symfony.lock b/symfony.lock index 5ecd19b46..1ef480154 100644 --- a/symfony.lock +++ b/symfony.lock @@ -11,6 +11,15 @@ "ref": "64d8583af5ea57b7afa4aba4b159907f3a148b05" } }, + "doctrine/deprecations": { + "version": "1.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "1.0", + "ref": "87424683adc81d7dc305eefec1fced883084aab9" + } + }, "doctrine/doctrine-bundle": { "version": "2.12", "recipe": { @@ -142,6 +151,18 @@ ".env" ] }, + "symfony/form": { + "version": "7.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.2", + "ref": "7d86a6723f4a623f59e2bf966b6aad2fc461d36b" + }, + "files": [ + "config/packages/csrf.yaml" + ] + }, "symfony/framework-bundle": { "version": "5.4", "recipe": { @@ -170,6 +191,18 @@ "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" } }, + "symfony/property-info": { + "version": "7.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.3", + "ref": "dae70df71978ae9226ae915ffd5fad817f5ca1f7" + }, + "files": [ + "config/packages/property_info.yaml" + ] + }, "symfony/routing": { "version": "5.4", "recipe": { diff --git a/tests/Functional/BookTest.php b/tests/Functional/BookTest.php index 576365dc8..2edf8a13c 100644 --- a/tests/Functional/BookTest.php +++ b/tests/Functional/BookTest.php @@ -30,7 +30,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testShowingBook(): void diff --git a/tests/Functional/ConferenceTest.php b/tests/Functional/ConferenceTest.php index 1b02aaa04..d00bf1f69 100644 --- a/tests/Functional/ConferenceTest.php +++ b/tests/Functional/ConferenceTest.php @@ -28,7 +28,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testBrowsingConferences(): void diff --git a/tests/Functional/DashboardTest.php b/tests/Functional/DashboardTest.php index 374d21f92..a59873beb 100644 --- a/tests/Functional/DashboardTest.php +++ b/tests/Functional/DashboardTest.php @@ -26,7 +26,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testDashboard(): void diff --git a/tests/Functional/LegacyBookTest.php b/tests/Functional/LegacyBookTest.php index 21bb10ef4..148194c82 100644 --- a/tests/Functional/LegacyBookTest.php +++ b/tests/Functional/LegacyBookTest.php @@ -27,7 +27,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testBrowsingBooks(): void @@ -44,7 +44,7 @@ public function testBrowsingBooks(): void ->create() ; - $this->client->request('GET', '/admin/legacy/books/'); + $this->client->request('GET', '/admin/legacy/books'); self::assertResponseIsSuccessful(); } diff --git a/tests/Functional/SpeakerTest.php b/tests/Functional/SpeakerTest.php index a3dbe15e8..2f515124f 100644 --- a/tests/Functional/SpeakerTest.php +++ b/tests/Functional/SpeakerTest.php @@ -28,7 +28,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testBrowsingSpeakers(): void diff --git a/tests/Functional/TalkTest.php b/tests/Functional/TalkTest.php index e9d4403e2..9e764e8db 100644 --- a/tests/Functional/TalkTest.php +++ b/tests/Functional/TalkTest.php @@ -31,7 +31,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testBrowsingTalks(): void diff --git a/tests/Translations/FrenchTranslatedUiTest.php b/tests/Translations/FrenchTranslatedUiTest.php index 8a84810cd..7030a4d7b 100644 --- a/tests/Translations/FrenchTranslatedUiTest.php +++ b/tests/Translations/FrenchTranslatedUiTest.php @@ -32,7 +32,7 @@ protected function setUp(): void ->create() ; - $this->client->loginUser($user->_real()); + $this->client->loginUser($user); } public function testShowItem(): void