From 5b29031b4e0c9dfbe5ed02cc77790e3a79c4b0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Gon=C3=A7alves?= Date: Mon, 2 Feb 2026 18:50:22 +0000 Subject: [PATCH 1/4] Bump kununu/data-fixtures to v14.0 - Bump kununu/data-fixtures - Bump phpunit to ^12.5 and fix notices --- .github/workflows/continuous-integration.yml | 1 + .gitignore | 1 + composer.json | 34 +- phpunit.xml.dist | 5 +- .../Compiler/HttpClientCompilerPass.php | 4 +- .../SchemaCopy/Copier/SchemaCopier.php | 2 +- tests/App/.env | 1 + tests/App/config/packages/parameters.yaml | 1 + tests/App/config/reference.php | 1102 +++++++++++++++++ tests/App/config/services.yaml | 2 +- .../Compiler/BaseCompilerPassTestCase.php | 4 +- .../Compiler/CachePoolCompilerPassTest.php | 4 +- .../Compiler/ConnectionCompilerPassTest.php | 2 + ...onnectionSchemaCommandCompilerPassTest.php | 2 + .../Compiler/DynamoDbCompilerPassTest.php | 2 + .../ElasticsearchCompilerPassTest.php | 2 + .../Compiler/HttpClientCompilerPassTest.php | 2 + ...ransactionalConnectionCompilerPassTest.php | 2 + .../Compiler/OpenSearchCompilerPassTest.php | 2 + tests/Unit/KununuTestingBundleTest.php | 6 +- tests/Unit/Service/OrchestratorTest.php | 4 +- .../SchemaCopy/Adapter/MySqlAdapterTest.php | 4 +- .../SchemaCopy/Copier/SchemaCopierTest.php | 2 + .../SchemaCopy/Factory/AdapterFactoryTest.php | 8 +- .../Service/SchemaCopy/SchemaCopyTestCase.php | 10 +- tests/Unit/Test/RequestBuilderTest.php | 4 +- tests/setupLocalTests.sh | 2 +- 27 files changed, 1173 insertions(+), 42 deletions(-) create mode 100644 tests/App/config/reference.php diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f5b4894..d638ac8 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -161,6 +161,7 @@ jobs: MONOLITHIC_DATABASE_URL: mysql://root:${{ secrets.CI_DATABASE_PASSWORD }}@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/monolithic_db ELASTICSEARCH_URL: http://localhost:9200 OPENSEARCH_URL: http://localhost:9201 + DYNAMODB_URL: http://localhost:4566 DATABASE_SERVER_VERSION: ${{ matrix.mysql-version }} run: | vendor/bin/phpunit --colors=always --testdox \ diff --git a/.gitignore b/.gitignore index aa2f6aa..7255143 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ composer.lock tests/.results/ tests/App/.env.local tests/App/.env.test +test/App/config/reference.php tests/App/var/ vendor/ phpunit.log diff --git a/composer.json b/composer.json index e1c9c19..09bfab1 100644 --- a/composer.json +++ b/composer.json @@ -22,35 +22,35 @@ "php": ">=8.3", "ext-filter": "*", "kununu/collections": "^6.4", - "kununu/data-fixtures": "^13.1", - "symfony/config": "^6.4", - "symfony/dependency-injection": "^6.4", - "symfony/framework-bundle": "^6.4", - "symfony/http-kernel": "^6.4" + "kununu/data-fixtures": "dev-support-doctrine-dbal-4 as 14.0", + "symfony/config": "^6.4 || ^7.4", + "symfony/dependency-injection": "^6.4 || ^7.4", + "symfony/framework-bundle": "^6.4 || ^7.4", + "symfony/http-kernel": "^6.4 || ^7.4" }, "require-dev": { "ext-json": "*", "ext-pdo": "*", "aws/aws-sdk-php": "^3.173", - "doctrine/dbal": "^3.8", + "doctrine/dbal": "^3.10 || ^4.4", "doctrine/doctrine-bundle": "~2.15.0", - "doctrine/doctrine-migrations-bundle": "^3.3", - "doctrine/orm": "^3.0", + "doctrine/doctrine-migrations-bundle": "^3.7", + "doctrine/orm": "^3.6", "elasticsearch/elasticsearch": "^7.10", "kununu/code-tools": "^3.1", - "matthiasnoback/symfony-dependency-injection-test": "^6.1", + "matthiasnoback/symfony-dependency-injection-test": "^6.2", "nyholm/psr7": "^1.8", - "opensearch-project/opensearch-php": "^2.0", + "opensearch-project/opensearch-php": "^2.5", "phpstan/phpstan": "^2.1", "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^12.3", + "phpunit/phpunit": "^12.5", "psr/cache": "^2.0", - "rector/rector": "^2.0", + "rector/rector": "^2.3", "shipmonk/composer-dependency-analyser": "^1.8", - "symfony/browser-kit": "^6.4", - "symfony/dotenv": "^6.4", - "symfony/http-client": "^6.4", - "symfony/http-foundation": "^6.4" + "symfony/browser-kit": "^6.4 || ^7.4", + "symfony/dotenv": "^6.4 || ^7.4", + "symfony/http-client": "^6.4 || ^7.4", + "symfony/http-foundation": "^6.4 || ^7.4" }, "suggest": { "ext-pdo_mysql": "To run Integration Tests.", @@ -97,6 +97,7 @@ ], "phpstan": "phpstan", "rector": "rector process --dry-run --config rector-ci.php src/ tests/", + "rector-fix": "rector process --config rector-ci.php src/ tests/", "test": [ "rm -rf tests/App/var/*", "tests/App/bin/setup_databases.sh test", @@ -116,6 +117,7 @@ "integration-coverage": "Run all integration tests with coverage report", "phpstan": "Run PHPStan", "rector": "Run Rector in dry-run mode with CI rules", + "rector-fix": "Run Rector in fix mode with CI rules", "test": "Run all tests", "test-coverage": "Run all tests with coverage report", "unit": "Run all unit tests", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 839d18f..29bf314 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,10 +1,11 @@ - + diff --git a/src/DependencyInjection/Compiler/HttpClientCompilerPass.php b/src/DependencyInjection/Compiler/HttpClientCompilerPass.php index 67172e3..d181686 100644 --- a/src/DependencyInjection/Compiler/HttpClientCompilerPass.php +++ b/src/DependencyInjection/Compiler/HttpClientCompilerPass.php @@ -50,7 +50,7 @@ private function buildOrchestrator(ContainerBuilder $container, string $id): voi // Orchestrator definition for HttpClient with provided id orchestratorId: sprintf('%s.%s', self::SERVICE_PREFIX, $id), // Purger Definition for HttpClient with provided id - purgerDefinitionBuilder: fn(ContainerBuilder $container, string $baseId): array => [ + purgerDefinitionBuilder: static fn(ContainerBuilder $container, string $baseId): array => [ sprintf('%s.%s.purger', self::SERVICE_PREFIX, $baseId), new Definition( HttpClientPurger::class, @@ -60,7 +60,7 @@ private function buildOrchestrator(ContainerBuilder $container, string $id): voi ), ], // Executor Definition for HttpClient with provided id - executorDefinitionBuilder: fn(ContainerBuilder $container, string $baseId, string $purgerId): array => [ + executorDefinitionBuilder: static fn(ContainerBuilder $container, string $baseId, string $purgerId): array => [ sprintf('%s.%s.executor', self::SERVICE_PREFIX, $baseId), new Definition( HttpClientExecutor::class, diff --git a/src/Service/SchemaCopy/Copier/SchemaCopier.php b/src/Service/SchemaCopy/Copier/SchemaCopier.php index a7f7a02..b0c3219 100644 --- a/src/Service/SchemaCopy/Copier/SchemaCopier.php +++ b/src/Service/SchemaCopy/Copier/SchemaCopier.php @@ -24,7 +24,7 @@ public function copy(Connection $source, Connection $destination): void } $destinationAdapter->runCopy( - function() use ($sourceAdapter, $destinationAdapter, $destination): void { + static function() use ($sourceAdapter, $destinationAdapter, $destination): void { $destinationAdapter->purgeTablesAndViews(); foreach ($sourceAdapter->getTables() as $table) { diff --git a/tests/App/.env b/tests/App/.env index d633c9b..bcab5de 100644 --- a/tests/App/.env +++ b/tests/App/.env @@ -3,4 +3,5 @@ PERSISTENCE_DATABASE_URL="mysql://root:symfony@127.0.0.1:3306/persistence_db" MONOLITHIC_DATABASE_URL="mysql://root:symfony@127.0.0.1:3306/monolithic_db" ELASTICSEARCH_URL="http://127.0.0.1:9200" OPENSEARCH_URL="http://127.0.0.1:9200" +DYNAMODB_URL="http://127.0.0.1:4566" DATABASE_SERVER_VERSION=5.7.42 diff --git a/tests/App/config/packages/parameters.yaml b/tests/App/config/packages/parameters.yaml index 7991930..e29d795 100644 --- a/tests/App/config/packages/parameters.yaml +++ b/tests/App/config/packages/parameters.yaml @@ -5,4 +5,5 @@ parameters: def_database_url: '%env(resolve:DEF_DATABASE_URL)%' persistence_database_url: '%env(resolve:PERSISTENCE_DATABASE_URL)%' monolithic_database_url: '%env(resolve:MONOLITHIC_DATABASE_URL)%' + dynamodb_url: '%env(resolve:DYNAMODB_URL)%' dummy_param: 'i am a parameter' diff --git a/tests/App/config/reference.php b/tests/App/config/reference.php new file mode 100644 index 0000000..87cae27 --- /dev/null +++ b/tests/App/config/reference.php @@ -0,0 +1,1102 @@ + [ + * 'App\\' => [ + * 'resource' => '../src/', + * ], + * ], + * ]); + * ``` + * + * @psalm-type ImportsConfig = list + * @psalm-type ParametersConfig = array|Param|null>|Param|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 + * @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|Param|null, + * http_method_override?: bool|Param, // 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|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%" + * test?: bool|Param, + * default_locale?: scalar|Param|null, // Default: "en" + * set_locale_from_accept_language?: bool|Param, // 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|Param, // 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|Param|null, // Default: "error_controller" + * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true + * csrf_protection?: bool|array{ + * enabled?: scalar|Param|null, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" + * }, + * form?: bool|array{ // Form configuration + * enabled?: bool|Param, // Default: false + * csrf_protection?: bool|array{ + * enabled?: scalar|Param|null, // Default: null + * token_id?: scalar|Param|null, // Default: null + * field_name?: scalar|Param|null, // Default: "_token" + * field_attr?: array, + * }, + * }, + * http_cache?: bool|array{ // HTTP cache configuration + * enabled?: bool|Param, // Default: false + * debug?: bool|Param, // Default: "%kernel.debug%" + * trace_level?: "none"|"short"|"full"|Param, + * trace_header?: scalar|Param|null, + * default_ttl?: int|Param, + * private_headers?: list, + * skip_response_headers?: list, + * allow_reload?: bool|Param, + * allow_revalidate?: bool|Param, + * stale_while_revalidate?: int|Param, + * stale_if_error?: int|Param, + * terminate_on_cache_hit?: bool|Param, + * }, + * esi?: bool|array{ // ESI configuration + * enabled?: bool|Param, // Default: false + * }, + * ssi?: bool|array{ // SSI configuration + * enabled?: bool|Param, // Default: false + * }, + * fragments?: bool|array{ // Fragments configuration + * enabled?: bool|Param, // Default: false + * hinclude_default_template?: scalar|Param|null, // Default: null + * path?: scalar|Param|null, // Default: "/_fragment" + * }, + * profiler?: bool|array{ // Profiler configuration + * enabled?: bool|Param, // Default: false + * collect?: bool|Param, // Default: true + * collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null + * only_exceptions?: bool|Param, // Default: false + * only_main_requests?: bool|Param, // Default: false + * dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler" + * collect_serializer_data?: bool|Param, // Enables the serializer data collector and profiler panel. // Default: false + * }, + * workflows?: bool|array{ + * enabled?: bool|Param, // Default: false + * workflows?: array, + * definition_validators?: list, + * support_strategy?: scalar|Param|null, + * initial_marking?: list, + * events_to_dispatch?: list|null, + * places?: list, + * }>, + * transitions: list, + * to?: list, + * weight?: int|Param, // Default: 1 + * metadata?: list, + * }>, + * metadata?: list, + * }>, + * }, + * router?: bool|array{ // Router configuration + * enabled?: bool|Param, // Default: false + * resource: scalar|Param|null, + * type?: scalar|Param|null, + * cache_dir?: scalar|Param|null, // Deprecated: Setting the "framework.router.cache_dir.cache_dir" configuration option is deprecated. It will be removed in version 8.0. // Default: "%kernel.build_dir%" + * default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null + * http_port?: scalar|Param|null, // Default: 80 + * https_port?: scalar|Param|null, // Default: 443 + * strict_requirements?: scalar|Param|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|Param, // Default: true + * }, + * session?: bool|array{ // Session configuration + * enabled?: bool|Param, // Default: false + * storage_factory_id?: scalar|Param|null, // Default: "session.storage.factory.native" + * handler_id?: scalar|Param|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * name?: scalar|Param|null, + * cookie_lifetime?: scalar|Param|null, + * cookie_path?: scalar|Param|null, + * cookie_domain?: scalar|Param|null, + * cookie_secure?: true|false|"auto"|Param, // Default: "auto" + * cookie_httponly?: bool|Param, // Default: true + * cookie_samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" + * use_cookies?: bool|Param, + * gc_divisor?: scalar|Param|null, + * gc_probability?: scalar|Param|null, + * gc_maxlifetime?: scalar|Param|null, + * save_path?: scalar|Param|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. + * metadata_update_threshold?: int|Param, // Seconds to wait between 2 session metadata updates. // Default: 0 + * sid_length?: int|Param, // Deprecated: Setting the "framework.session.sid_length.sid_length" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. + * sid_bits_per_character?: int|Param, // Deprecated: Setting the "framework.session.sid_bits_per_character.sid_bits_per_character" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. + * }, + * request?: bool|array{ // Request configuration + * enabled?: bool|Param, // Default: false + * formats?: array>, + * }, + * assets?: bool|array{ // Assets configuration + * enabled?: bool|Param, // Default: false + * strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false + * version_strategy?: scalar|Param|null, // Default: null + * version?: scalar|Param|null, // Default: null + * version_format?: scalar|Param|null, // Default: "%%s?%%s" + * json_manifest_path?: scalar|Param|null, // Default: null + * base_path?: scalar|Param|null, // Default: "" + * base_urls?: list, + * packages?: array, + * }>, + * }, + * asset_mapper?: bool|array{ // Asset Mapper configuration + * enabled?: bool|Param, // Default: false + * paths?: array, + * excluded_patterns?: list, + * exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true + * server?: bool|Param, // 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|Param|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"|Param, // 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|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|Param|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|Param|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|Param, // Default: false + * formats?: list, + * extensions?: list, + * }, + * }, + * translator?: bool|array{ // Translator configuration + * enabled?: bool|Param, // Default: false + * fallbacks?: list, + * logging?: bool|Param, // Default: false + * formatter?: scalar|Param|null, // Default: "translator.formatter.default" + * cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" + * paths?: list, + * pseudo_localization?: bool|array{ + * enabled?: bool|Param, // Default: false + * accents?: bool|Param, // Default: true + * expansion_factor?: float|Param, // Default: 1.0 + * brackets?: bool|Param, // Default: true + * parse_html?: bool|Param, // Default: false + * localizable_html_attributes?: list, + * }, + * providers?: array, + * locales?: list, + * }>, + * globals?: array, + * domain?: string|Param, + * }>, + * }, + * validation?: bool|array{ // Validation configuration + * enabled?: bool|Param, // Default: false + * cache?: scalar|Param|null, // Deprecated: Setting the "framework.validation.cache.cache" configuration option is deprecated. It will be removed in version 8.0. + * enable_attributes?: bool|Param, // Default: true + * static_method?: list, + * translation_domain?: scalar|Param|null, // Default: "validators" + * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|"loose"|Param, // Default: "html5" + * mapping?: array{ + * paths?: list, + * }, + * not_compromised_password?: bool|array{ + * enabled?: bool|Param, // When disabled, compromised passwords will be accepted as valid. // Default: true + * endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null + * }, + * disable_translation?: bool|Param, // Default: false + * auto_mapping?: array, + * }>, + * }, + * annotations?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * serializer?: bool|array{ // Serializer configuration + * enabled?: bool|Param, // Default: false + * enable_attributes?: bool|Param, // Default: true + * name_converter?: scalar|Param|null, + * circular_reference_handler?: scalar|Param|null, + * max_depth_handler?: scalar|Param|null, + * mapping?: array{ + * paths?: list, + * }, + * default_context?: list, + * named_serializers?: array, + * include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true + * include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true + * }>, + * }, + * property_access?: bool|array{ // Property access configuration + * enabled?: bool|Param, // Default: false + * magic_call?: bool|Param, // Default: false + * magic_get?: bool|Param, // Default: true + * magic_set?: bool|Param, // Default: true + * throw_exception_on_invalid_index?: bool|Param, // Default: false + * throw_exception_on_invalid_property_path?: bool|Param, // Default: true + * }, + * type_info?: bool|array{ // Type info configuration + * enabled?: bool|Param, // Default: false + * aliases?: array, + * }, + * property_info?: bool|array{ // Property info configuration + * enabled?: bool|Param, // Default: false + * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. + * }, + * cache?: array{ // Cache configuration + * prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|Param|null, + * default_redis_provider?: scalar|Param|null, // Default: "redis://localhost" + * default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection" + * default_pdo_provider?: scalar|Param|null, // Default: null + * pools?: array, + * tags?: scalar|Param|null, // Default: null + * public?: bool|Param, // Default: false + * default_lifetime?: scalar|Param|null, // Default lifetime of the pool. + * provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|Param|null, + * clearer?: scalar|Param|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|Param, // Throw PHP errors as \ErrorException instances. // Default: true + * }, + * exceptions?: array, + * web_link?: bool|array{ // Web links configuration + * enabled?: bool|Param, // Default: false + * }, + * lock?: bool|string|array{ // Lock configuration + * enabled?: bool|Param, // Default: false + * resources?: array>, + * }, + * semaphore?: bool|string|array{ // Semaphore configuration + * enabled?: bool|Param, // Default: false + * resources?: array, + * }, + * messenger?: bool|array{ // Messenger configuration + * enabled?: bool|Param, // Default: false + * routing?: array, + * }>, + * serializer?: array{ + * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * symfony_serializer?: array{ + * format?: scalar|Param|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|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * retry_strategy?: string|array{ + * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null + * max_retries?: int|Param, // Default: 3 + * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 + * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 + * }, + * rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null + * }>, + * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|Param|null, // Default: null + * buses?: array, + * }>, + * }>, + * }, + * scheduler?: bool|array{ // Scheduler configuration + * enabled?: bool|Param, // Default: false + * }, + * disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true + * http_client?: bool|array{ // HTTP Client configuration + * enabled?: bool|Param, // Default: false + * max_host_connections?: int|Param, // The maximum number of connections to a single host. + * default_options?: array{ + * headers?: array, + * vars?: array, + * max_redirects?: int|Param, // The maximum number of redirects to follow. + * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|Param|null, // A certificate authority file. + * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|Param|null, // A PEM formatted certificate file. + * local_pk?: scalar|Param|null, // A private key file. + * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|Param|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|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool|Param, // Default: false + * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool|Param, // Default: false + * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int|Param, // Default: 3 + * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }, + * mock_response_factory?: scalar|Param|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|Param, // The maximum number of redirects to follow. + * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. + * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. + * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. + * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. + * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. + * cafile?: scalar|Param|null, // A certificate authority file. + * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|Param|null, // A PEM formatted certificate file. + * local_pk?: scalar|Param|null, // A private key file. + * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|Param|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|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null + * caching?: bool|array{ // Caching configuration. + * enabled?: bool|Param, // Default: false + * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" + * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true + * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null + * }, + * retry_failed?: bool|array{ + * enabled?: bool|Param, // Default: false + * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null + * http_codes?: array, + * }>, + * max_retries?: int|Param, // Default: 3 + * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 + * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 + * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 + * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 + * }, + * }>, + * }, + * mailer?: bool|array{ // Mailer configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|Param|null, // Default: null + * transports?: array, + * envelope?: array{ // Mailer Envelope configuration + * sender?: scalar|Param|null, + * recipients?: list, + * allowed_recipients?: list, + * }, + * headers?: array, + * dkim_signer?: bool|array{ // DKIM signer configuration + * enabled?: bool|Param, // Default: false + * key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|Param|null, // Default: "" + * select?: scalar|Param|null, // Default: "" + * passphrase?: scalar|Param|null, // The private key passphrase // Default: "" + * options?: array, + * }, + * smime_signer?: bool|array{ // S/MIME signer configuration + * enabled?: bool|Param, // Default: false + * key?: scalar|Param|null, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|Param|null, // The private key passphrase // Default: null + * extra_certificates?: scalar|Param|null, // Default: null + * sign_options?: int|Param, // Default: null + * }, + * smime_encrypter?: bool|array{ // S/MIME encrypter configuration + * enabled?: bool|Param, // Default: false + * repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" + * cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null + * }, + * }, + * secrets?: bool|array{ + * enabled?: bool|Param, // Default: true + * vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local" + * decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" + * }, + * notifier?: bool|array{ // Notifier configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|Param|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|Param, // Default: false + * channel_policy?: array>, + * admin_recipients?: list, + * }, + * rate_limiter?: bool|array{ // Rate limiter configuration + * enabled?: bool|Param, // Default: false + * limiters?: array, + * limit?: int|Param, // The maximum allowed hits in a fixed interval or burst. + * interval?: scalar|Param|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|Param|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|Param, // Amount of tokens to add each interval. // Default: 1 + * }, + * }>, + * }, + * uid?: bool|array{ // Uid configuration + * enabled?: bool|Param, // Default: false + * default_uuid_version?: 7|6|4|1|Param, // Default: 7 + * name_based_uuid_version?: 5|3|Param, // Default: 5 + * name_based_uuid_namespace?: scalar|Param|null, + * time_based_uuid_version?: 7|6|1|Param, // Default: 7 + * time_based_uuid_node?: scalar|Param|null, + * }, + * html_sanitizer?: bool|array{ // HtmlSanitizer configuration + * enabled?: bool|Param, // Default: false + * sanitizers?: array, + * block_elements?: list, + * drop_elements?: list, + * allow_attributes?: array, + * drop_attributes?: array, + * force_attributes?: array>, + * force_https_urls?: bool|Param, // 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|Param, // 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|Param, // 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|Param, // The maximum length allowed for the sanitized input. // Default: 0 + * }>, + * }, + * webhook?: bool|array{ // Webhook configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" + * routing?: array, + * }, + * remote-event?: bool|array{ // RemoteEvent configuration + * enabled?: bool|Param, // Default: false + * }, + * json_streamer?: bool|array{ // JSON streamer configuration + * enabled?: bool|Param, // Default: false + * }, + * } + * @psalm-type KununuTestingConfig = array{ + * connections?: array, + * excluded_tables?: list, + * }>, + * non_transactional_connections?: array, + * excluded_tables?: list, + * }>, + * elastic_search?: array, + * service: scalar|Param|null, + * index_name: scalar|Param|null, + * }>, + * open_search?: array, + * service: scalar|Param|null, + * index_name: scalar|Param|null, + * }>, + * dynamo_db?: array, + * service: scalar|Param|null, + * table_names?: list, + * }>, + * cache?: array{ + * enable?: bool|Param, // Enable creating orchestrators for cache pools // Default: true + * pools?: array, + * }>, + * }, + * http_client?: array{ + * clients?: list, + * }, + * } + * @psalm-type DoctrineConfig = array{ + * dbal?: array{ + * default_connection?: scalar|Param|null, + * types?: array, + * driver_schemes?: array, + * connections?: array, + * mapping_types?: array, + * default_table_options?: array, + * schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory" + * result_cache?: scalar|Param|null, + * slaves?: array, + * replicas?: array, + * }>, + * }, + * orm?: array{ + * default_entity_manager?: scalar|Param|null, + * auto_generate_proxy_classes?: scalar|Param|null, // Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED" // Default: false + * enable_lazy_ghost_objects?: bool|Param, // Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation // Default: true + * proxy_dir?: scalar|Param|null, // Default: "%kernel.build_dir%/doctrine/orm/Proxies" + * proxy_namespace?: scalar|Param|null, // Default: "Proxies" + * controller_resolver?: bool|array{ + * enabled?: bool|Param, // Default: true + * auto_mapping?: bool|Param|null, // Set to false to disable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: null + * evict_cache?: bool|Param, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false + * }, + * entity_managers?: array, + * }>, + * }>, + * }, + * connection?: scalar|Param|null, + * class_metadata_factory_name?: scalar|Param|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" + * default_repository_class?: scalar|Param|null, // Default: "Doctrine\\ORM\\EntityRepository" + * auto_mapping?: scalar|Param|null, // Default: false + * enable_native_lazy_objects?: bool|Param, // Enables the new native implementation of PHP lazy objects instead of generated proxies // Default: false + * naming_strategy?: scalar|Param|null, // Default: "doctrine.orm.naming_strategy.default" + * quote_strategy?: scalar|Param|null, // Default: "doctrine.orm.quote_strategy.default" + * typed_field_mapper?: scalar|Param|null, // Default: "doctrine.orm.typed_field_mapper.default" + * entity_listener_resolver?: scalar|Param|null, // Default: null + * fetch_mode_subselect_batch_size?: scalar|Param|null, + * repository_factory?: scalar|Param|null, // Default: "doctrine.orm.container_repository_factory" + * schema_ignore_classes?: list, + * report_fields_where_declared?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. // Default: true + * validate_xml_mapping?: bool|Param, // 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|Param|null, // Default: null + * id?: scalar|Param|null, + * pool?: scalar|Param|null, + * }, + * region_lock_lifetime?: scalar|Param|null, // Default: 60 + * log_enabled?: bool|Param, // Default: true + * region_lifetime?: scalar|Param|null, // Default: 3600 + * enabled?: bool|Param, // Default: true + * factory?: scalar|Param|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 DoctrineMigrationsConfig = array{ + * enable_service_migrations?: bool|Param, // Whether to enable fetching migrations from the service container. // Default: false + * migrations_paths?: array, + * services?: array, + * factories?: array, + * storage?: array{ // Storage to use for migration status metadata. + * table_storage?: array{ // The default metadata storage, implemented as a table in the database. + * table_name?: scalar|Param|null, // Default: null + * version_column_name?: scalar|Param|null, // Default: null + * version_column_length?: scalar|Param|null, // Default: null + * executed_at_column_name?: scalar|Param|null, // Default: null + * execution_time_column_name?: scalar|Param|null, // Default: null + * }, + * }, + * migrations?: list, + * connection?: scalar|Param|null, // Connection name to use for the migrations database. // Default: null + * em?: scalar|Param|null, // Entity manager name to use for the migrations database (available when doctrine/orm is installed). // Default: null + * all_or_nothing?: scalar|Param|null, // Run all migrations in a transaction. // Default: false + * check_database_platform?: scalar|Param|null, // Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on. // Default: true + * custom_template?: scalar|Param|null, // Custom template path for generated migration classes. // Default: null + * organize_migrations?: scalar|Param|null, // Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false // Default: false + * enable_profiler?: bool|Param, // Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. // Default: false + * transactional?: bool|Param, // Whether or not to wrap migrations in a single transaction. // Default: true + * } + * @psalm-type ConfigType = array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * kununu_testing?: KununuTestingConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * "when@dev"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * kununu_testing?: KununuTestingConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * }, + * "when@test"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * kununu_testing?: KununuTestingConfig, + * doctrine?: DoctrineConfig, + * doctrine_migrations?: DoctrineMigrationsConfig, + * }, + * ..., + * }> + * } + */ +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@test"?: array, + * ... + * } + */ +final class Routes +{ + /** + * @param RoutesConfig $config + * + * @psalm-return RoutesConfig + */ + public static function config(array $config): array + { + return $config; + } +} diff --git a/tests/App/config/services.yaml b/tests/App/config/services.yaml index 67234b6..1203ace 100644 --- a/tests/App/config/services.yaml +++ b/tests/App/config/services.yaml @@ -36,7 +36,7 @@ services: - version: 'latest' region: 'eu-west-1' - endpoint: 'http://localhost:4566' + endpoint: '%dynamodb_url%' credentials: key: 'test' secret: 'test' diff --git a/tests/Unit/DependencyInjection/Compiler/BaseCompilerPassTestCase.php b/tests/Unit/DependencyInjection/Compiler/BaseCompilerPassTestCase.php index 13e80dd..0fd63a7 100644 --- a/tests/Unit/DependencyInjection/Compiler/BaseCompilerPassTestCase.php +++ b/tests/Unit/DependencyInjection/Compiler/BaseCompilerPassTestCase.php @@ -100,12 +100,12 @@ protected function getMockKununuTestingExtension(string $alias = KununuTestingEx $mock = $this->createMock(ExtensionInterface::class); $mock - ->expects($this->any()) + ->expects($this->atLeastOnce()) ->method('getAlias') ->willReturn($alias); $mock - ->expects($this->any()) + ->expects($this->atLeastOnce()) ->method('getNamespace') ->willReturn(false); diff --git a/tests/Unit/DependencyInjection/Compiler/CachePoolCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/CachePoolCompilerPassTest.php index 5b16859..f91c8f0 100644 --- a/tests/Unit/DependencyInjection/Compiler/CachePoolCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/CachePoolCompilerPassTest.php @@ -9,14 +9,16 @@ use Kununu\TestingBundle\Command\LoadCacheFixturesCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\CachePoolCompilerPass; use Kununu\TestingBundle\DependencyInjection\KununuTestingExtension; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; +#[AllowMockObjectsWithoutExpectations] final class CachePoolCompilerPassTest extends BaseLoadFixturesCommandCompilerPassTestCase { private const array CACHE_POOL_IDS = [ - 'cache_pool.service_1' => [ + 'cache_pool.service_1' => [ 'creates_command' => true, ], 'cache_pool.service_2' => [], diff --git a/tests/Unit/DependencyInjection/Compiler/ConnectionCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/ConnectionCompilerPassTest.php index 19102fd..40f8aa6 100644 --- a/tests/Unit/DependencyInjection/Compiler/ConnectionCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/ConnectionCompilerPassTest.php @@ -8,7 +8,9 @@ use Kununu\TestingBundle\Command\LoadConnectionFixturesCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\AbstractConnectionCompilerPass; use Kununu\TestingBundle\DependencyInjection\Compiler\ConnectionCompilerPass; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; +#[AllowMockObjectsWithoutExpectations] final class ConnectionCompilerPassTest extends BaseConnectionCompilerPassTestCase { protected function getCompilerInstance(): AbstractConnectionCompilerPass diff --git a/tests/Unit/DependencyInjection/Compiler/CopyConnectionSchemaCommandCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/CopyConnectionSchemaCommandCompilerPassTest.php index 32d486c..e300e3a 100644 --- a/tests/Unit/DependencyInjection/Compiler/CopyConnectionSchemaCommandCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/CopyConnectionSchemaCommandCompilerPassTest.php @@ -5,8 +5,10 @@ use Kununu\TestingBundle\Command\CopyConnectionSchemaCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\CopyConnectionSchemaCommandCompilerPass; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use Symfony\Component\DependencyInjection\ContainerBuilder; +#[AllowMockObjectsWithoutExpectations] final class CopyConnectionSchemaCommandCompilerPassTest extends BaseCompilerPassTestCase { private const string COMMAND_ID = 'kununu_testing:connections:schema:copy.command'; diff --git a/tests/Unit/DependencyInjection/Compiler/DynamoDbCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/DynamoDbCompilerPassTest.php index c120774..a71cb43 100644 --- a/tests/Unit/DependencyInjection/Compiler/DynamoDbCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/DynamoDbCompilerPassTest.php @@ -9,10 +9,12 @@ use Kununu\TestingBundle\Command\LoadDynamoDbFixturesCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\DynamoDbCompilerPass; use Kununu\TestingBundle\DependencyInjection\KununuTestingExtension; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; +#[AllowMockObjectsWithoutExpectations] final class DynamoDbCompilerPassTest extends BaseLoadFixturesCommandCompilerPassTestCase { private const array DYNAMO_DB_SERVICES = [ diff --git a/tests/Unit/DependencyInjection/Compiler/ElasticsearchCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/ElasticsearchCompilerPassTest.php index c862dc3..ca23ec2 100644 --- a/tests/Unit/DependencyInjection/Compiler/ElasticsearchCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/ElasticsearchCompilerPassTest.php @@ -9,7 +9,9 @@ use Kununu\TestingBundle\Command\LoadElasticsearchFixturesCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\AbstractSearchEngineCompilerPass; use Kununu\TestingBundle\DependencyInjection\Compiler\ElasticsearchCompilerPass; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; +#[AllowMockObjectsWithoutExpectations] final class ElasticsearchCompilerPassTest extends BaseSearchEngineCompilerPassTestCase { protected function getCompilerInstance(): AbstractSearchEngineCompilerPass diff --git a/tests/Unit/DependencyInjection/Compiler/HttpClientCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/HttpClientCompilerPassTest.php index dcebea2..0f59017 100644 --- a/tests/Unit/DependencyInjection/Compiler/HttpClientCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/HttpClientCompilerPassTest.php @@ -8,9 +8,11 @@ use Kununu\DataFixtures\Purger\HttpClientPurger; use Kununu\TestingBundle\DependencyInjection\Compiler\HttpClientCompilerPass; use Kununu\TestingBundle\DependencyInjection\KununuTestingExtension; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; +#[AllowMockObjectsWithoutExpectations] final class HttpClientCompilerPassTest extends BaseCompilerPassTestCase { private const array HTTP_CLIENT_IDS = [ diff --git a/tests/Unit/DependencyInjection/Compiler/NonTransactionalConnectionCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/NonTransactionalConnectionCompilerPassTest.php index dcb3df2..3e00958 100644 --- a/tests/Unit/DependencyInjection/Compiler/NonTransactionalConnectionCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/NonTransactionalConnectionCompilerPassTest.php @@ -8,7 +8,9 @@ use Kununu\TestingBundle\Command\LoadNonTransactionalConnectionFixturesCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\AbstractConnectionCompilerPass; use Kununu\TestingBundle\DependencyInjection\Compiler\NonTransactionalConnectionCompilerPass; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; +#[AllowMockObjectsWithoutExpectations] final class NonTransactionalConnectionCompilerPassTest extends BaseConnectionCompilerPassTestCase { protected function getCompilerInstance(): AbstractConnectionCompilerPass diff --git a/tests/Unit/DependencyInjection/Compiler/OpenSearchCompilerPassTest.php b/tests/Unit/DependencyInjection/Compiler/OpenSearchCompilerPassTest.php index 0fdc6d6..2b01db3 100644 --- a/tests/Unit/DependencyInjection/Compiler/OpenSearchCompilerPassTest.php +++ b/tests/Unit/DependencyInjection/Compiler/OpenSearchCompilerPassTest.php @@ -9,7 +9,9 @@ use Kununu\TestingBundle\Command\LoadOpenSearchFixturesCommand; use Kununu\TestingBundle\DependencyInjection\Compiler\AbstractSearchEngineCompilerPass; use Kununu\TestingBundle\DependencyInjection\Compiler\OpenSearchCompilerPass; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; +#[AllowMockObjectsWithoutExpectations] final class OpenSearchCompilerPassTest extends BaseSearchEngineCompilerPassTestCase { protected function getCompilerInstance(): AbstractSearchEngineCompilerPass diff --git a/tests/Unit/KununuTestingBundleTest.php b/tests/Unit/KununuTestingBundleTest.php index d3fbb3e..7f26250 100644 --- a/tests/Unit/KununuTestingBundleTest.php +++ b/tests/Unit/KununuTestingBundleTest.php @@ -13,10 +13,10 @@ use Kununu\TestingBundle\DependencyInjection\Compiler\OpenSearchCompilerPass; use Kununu\TestingBundle\KununuTestingBundle; use PHPUnit\Framework\MockObject\MockObject; -use PHPUnit\Framework\TestCase; +use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; -final class KununuTestingBundleTest extends TestCase +final class KununuTestingBundleTest extends KernelTestCase { public function testBuildContainerExpectedCompilerPasses(): void { @@ -27,7 +27,7 @@ public function testBuildContainerExpectedCompilerPasses(): void ->expects($this->exactly(8)) ->method('addCompilerPass') ->willReturnCallback( - function($subject) use ($container, &$executedCompilerPasses): MockObject&ContainerBuilder { + static function($subject) use ($container, &$executedCompilerPasses): MockObject&ContainerBuilder { $executedCompilerPasses[] = $subject::class; return $container; diff --git a/tests/Unit/Service/OrchestratorTest.php b/tests/Unit/Service/OrchestratorTest.php index 7010d58..e19b819 100644 --- a/tests/Unit/Service/OrchestratorTest.php +++ b/tests/Unit/Service/OrchestratorTest.php @@ -8,10 +8,12 @@ use Kununu\DataFixtures\FixtureInterface; use Kununu\DataFixtures\Loader\LoaderInterface; use Kununu\TestingBundle\Service\Orchestrator; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +#[AllowMockObjectsWithoutExpectations] final class OrchestratorTest extends TestCase { #[DataProvider('executesAsExpectedDataProvider')] @@ -25,7 +27,7 @@ public function testThatExecutesAsExpected(bool $append): void ->expects($this->exactly(2)) ->method('loadFromClassName') ->with( - $this->callback(fn(string $class): bool => match ($class) { + $this->callback(static fn(string $class): bool => match ($class) { $fixture1Class, $fixture2Class => true, default => false, }) diff --git a/tests/Unit/Service/SchemaCopy/Adapter/MySqlAdapterTest.php b/tests/Unit/Service/SchemaCopy/Adapter/MySqlAdapterTest.php index af75cdf..2aa8c7d 100644 --- a/tests/Unit/Service/SchemaCopy/Adapter/MySqlAdapterTest.php +++ b/tests/Unit/Service/SchemaCopy/Adapter/MySqlAdapterTest.php @@ -7,8 +7,10 @@ use Kununu\TestingBundle\Service\SchemaCopy\Adapter\MySqlAdapter; use Kununu\TestingBundle\Service\SchemaCopy\SchemaCopyAdapterInterface; use Kununu\TestingBundle\Tests\Unit\Service\SchemaCopy\SchemaCopyTestCase; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use PHPUnit\Framework\MockObject\MockObject; +#[AllowMockObjectsWithoutExpectations] final class MySqlAdapterTest extends SchemaCopyTestCase { private MockObject&Connection $connection; @@ -36,7 +38,7 @@ public function testRunCopy(): void $value = false; - $this->adapter->runCopy(function() use (&$value): void { + $this->adapter->runCopy(static function() use (&$value): void { $value = true; }); diff --git a/tests/Unit/Service/SchemaCopy/Copier/SchemaCopierTest.php b/tests/Unit/Service/SchemaCopy/Copier/SchemaCopierTest.php index 5ab0840..9c5e48a 100644 --- a/tests/Unit/Service/SchemaCopy/Copier/SchemaCopierTest.php +++ b/tests/Unit/Service/SchemaCopy/Copier/SchemaCopierTest.php @@ -12,8 +12,10 @@ use Kununu\TestingBundle\Service\SchemaCopy\SchemaCopyInterface; use Kununu\TestingBundle\Tests\Unit\Service\SchemaCopy\SchemaCopyTestCase; use LogicException; +use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations; use PHPUnit\Framework\MockObject\MockObject; +#[AllowMockObjectsWithoutExpectations] final class SchemaCopierTest extends SchemaCopyTestCase { private MockObject&Connection $source; diff --git a/tests/Unit/Service/SchemaCopy/Factory/AdapterFactoryTest.php b/tests/Unit/Service/SchemaCopy/Factory/AdapterFactoryTest.php index 89c9da3..f6abbc5 100644 --- a/tests/Unit/Service/SchemaCopy/Factory/AdapterFactoryTest.php +++ b/tests/Unit/Service/SchemaCopy/Factory/AdapterFactoryTest.php @@ -5,7 +5,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\MySQL80Platform; +use Doctrine\DBAL\Platforms\MySQLPlatform; use Kununu\TestingBundle\Service\SchemaCopy\Exception\UnsupportedDatabasePlatformException; use Kununu\TestingBundle\Service\SchemaCopy\Factory\AdapterFactory; use PHPUnit\Framework\Attributes\DataProvider; @@ -18,9 +18,9 @@ public function testCreateAdapter(string $platformClass, ?string $expectedType): { $connection = $this->createMock(Connection::class); $connection - ->expects($this->any()) + ->expects($this->atLeastOnce()) ->method('getDatabasePlatform') - ->willReturn($this->createMock($platformClass)); + ->willReturn($this->createStub($platformClass)); if (null === $expectedType) { $this->expectException(UnsupportedDatabasePlatformException::class); @@ -37,7 +37,7 @@ public static function createAdapterDataProvider(): array { return [ 'mysql' => [ - MySQL80Platform::class, + MySQLPlatform::class, 'MySql', ], 'invalid' => [ diff --git a/tests/Unit/Service/SchemaCopy/SchemaCopyTestCase.php b/tests/Unit/Service/SchemaCopy/SchemaCopyTestCase.php index 9875621..7ca637b 100644 --- a/tests/Unit/Service/SchemaCopy/SchemaCopyTestCase.php +++ b/tests/Unit/Service/SchemaCopy/SchemaCopyTestCase.php @@ -4,7 +4,7 @@ namespace Kununu\TestingBundle\Tests\Unit\Service\SchemaCopy; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Platforms\MySQL80Platform; +use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Result; use Kununu\TestingBundle\Service\SchemaCopy\SchemaCopyAdapterInterface; use LogicException; @@ -30,9 +30,9 @@ protected function createConnection(): MockObject&Connection { $connection = $this->createMock(Connection::class); $connection - ->expects($this->any()) + ->expects($this->atMost(1)) ->method('getDatabasePlatform') - ->willReturn($this->createMock(MySQL80Platform::class)); + ->willReturn($this->createStub(MySQLPlatform::class)); return $connection; } @@ -44,7 +44,7 @@ protected function mockExecuteQuery(MockObject&Connection $connection, array $re $connection ->expects($this->exactly(count($statements))) ->method('executeQuery') - ->willReturnCallback(fn(string $statement): Result => match (true) { + ->willReturnCallback(static fn(string $statement): Result => match (true) { isset($map[$statement]) => $map[$statement], default => throw new LogicException(sprintf('Statement "%s" not found', $statement)), }); @@ -57,7 +57,7 @@ protected function mockExecuteStatement(MockObject&Connection $connection, strin $connection ->expects($this->exactly(count($statements))) ->method('executeStatement') - ->willReturnCallback(fn(string $statement): int => match (true) { + ->willReturnCallback(static fn(string $statement): int => match (true) { isset($map[$statement]) => $map[$statement], default => throw new LogicException(sprintf('Statement "%s" not found', $statement)), }); diff --git a/tests/Unit/Test/RequestBuilderTest.php b/tests/Unit/Test/RequestBuilderTest.php index ddaa9b5..1b63657 100644 --- a/tests/Unit/Test/RequestBuilderTest.php +++ b/tests/Unit/Test/RequestBuilderTest.php @@ -233,11 +233,11 @@ public function testBuildRequestWithUri(): void public function testBuildRequestWithFiles(): void { - $request = RequestBuilder::aGetRequest()->withFiles([self::createMock(UploadedFile::class)]); + $request = RequestBuilder::aGetRequest()->withFiles([$file = self::createStub(UploadedFile::class)]); [, , , $files] = $request->build(); - self::assertEquals([self::createMock(UploadedFile::class)], $files); + self::assertEquals([$file], $files); } public function testBuildRequestWithContent(): void diff --git a/tests/setupLocalTests.sh b/tests/setupLocalTests.sh index 922a6d5..fa1e9e1 100755 --- a/tests/setupLocalTests.sh +++ b/tests/setupLocalTests.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1 -if ! [ -f App/.env.test ]; then +if ! [[ -f App/.env.test ]]; then echo "Could not found local test env configurations!" echo "Copy tests/App/.env to tests/App/.env.test & tests/App/.env.local and setup according your local env." echo "Then run this script again!!" From 8e5cb3577d6c3a0ab9c316e1b024014305c56155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Gon=C3=A7alves?= Date: Mon, 2 Feb 2026 18:54:41 +0000 Subject: [PATCH 2/4] Delete tests/App/config/reference.php --- tests/App/config/reference.php | 1102 -------------------------------- 1 file changed, 1102 deletions(-) delete mode 100644 tests/App/config/reference.php diff --git a/tests/App/config/reference.php b/tests/App/config/reference.php deleted file mode 100644 index 87cae27..0000000 --- a/tests/App/config/reference.php +++ /dev/null @@ -1,1102 +0,0 @@ - [ - * 'App\\' => [ - * 'resource' => '../src/', - * ], - * ], - * ]); - * ``` - * - * @psalm-type ImportsConfig = list - * @psalm-type ParametersConfig = array|Param|null>|Param|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 - * @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|Param|null, - * http_method_override?: bool|Param, // 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|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" - * ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%" - * test?: bool|Param, - * default_locale?: scalar|Param|null, // Default: "en" - * set_locale_from_accept_language?: bool|Param, // 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|Param, // 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|Param|null, // Default: "error_controller" - * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true - * csrf_protection?: bool|array{ - * enabled?: scalar|Param|null, // Default: null - * stateless_token_ids?: list, - * check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false - * cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" - * }, - * form?: bool|array{ // Form configuration - * enabled?: bool|Param, // Default: false - * csrf_protection?: bool|array{ - * enabled?: scalar|Param|null, // Default: null - * token_id?: scalar|Param|null, // Default: null - * field_name?: scalar|Param|null, // Default: "_token" - * field_attr?: array, - * }, - * }, - * http_cache?: bool|array{ // HTTP cache configuration - * enabled?: bool|Param, // Default: false - * debug?: bool|Param, // Default: "%kernel.debug%" - * trace_level?: "none"|"short"|"full"|Param, - * trace_header?: scalar|Param|null, - * default_ttl?: int|Param, - * private_headers?: list, - * skip_response_headers?: list, - * allow_reload?: bool|Param, - * allow_revalidate?: bool|Param, - * stale_while_revalidate?: int|Param, - * stale_if_error?: int|Param, - * terminate_on_cache_hit?: bool|Param, - * }, - * esi?: bool|array{ // ESI configuration - * enabled?: bool|Param, // Default: false - * }, - * ssi?: bool|array{ // SSI configuration - * enabled?: bool|Param, // Default: false - * }, - * fragments?: bool|array{ // Fragments configuration - * enabled?: bool|Param, // Default: false - * hinclude_default_template?: scalar|Param|null, // Default: null - * path?: scalar|Param|null, // Default: "/_fragment" - * }, - * profiler?: bool|array{ // Profiler configuration - * enabled?: bool|Param, // Default: false - * collect?: bool|Param, // Default: true - * collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null - * only_exceptions?: bool|Param, // Default: false - * only_main_requests?: bool|Param, // Default: false - * dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler" - * collect_serializer_data?: bool|Param, // Enables the serializer data collector and profiler panel. // Default: false - * }, - * workflows?: bool|array{ - * enabled?: bool|Param, // Default: false - * workflows?: array, - * definition_validators?: list, - * support_strategy?: scalar|Param|null, - * initial_marking?: list, - * events_to_dispatch?: list|null, - * places?: list, - * }>, - * transitions: list, - * to?: list, - * weight?: int|Param, // Default: 1 - * metadata?: list, - * }>, - * metadata?: list, - * }>, - * }, - * router?: bool|array{ // Router configuration - * enabled?: bool|Param, // Default: false - * resource: scalar|Param|null, - * type?: scalar|Param|null, - * cache_dir?: scalar|Param|null, // Deprecated: Setting the "framework.router.cache_dir.cache_dir" configuration option is deprecated. It will be removed in version 8.0. // Default: "%kernel.build_dir%" - * default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null - * http_port?: scalar|Param|null, // Default: 80 - * https_port?: scalar|Param|null, // Default: 443 - * strict_requirements?: scalar|Param|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|Param, // Default: true - * }, - * session?: bool|array{ // Session configuration - * enabled?: bool|Param, // Default: false - * storage_factory_id?: scalar|Param|null, // Default: "session.storage.factory.native" - * handler_id?: scalar|Param|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. - * name?: scalar|Param|null, - * cookie_lifetime?: scalar|Param|null, - * cookie_path?: scalar|Param|null, - * cookie_domain?: scalar|Param|null, - * cookie_secure?: true|false|"auto"|Param, // Default: "auto" - * cookie_httponly?: bool|Param, // Default: true - * cookie_samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" - * use_cookies?: bool|Param, - * gc_divisor?: scalar|Param|null, - * gc_probability?: scalar|Param|null, - * gc_maxlifetime?: scalar|Param|null, - * save_path?: scalar|Param|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. - * metadata_update_threshold?: int|Param, // Seconds to wait between 2 session metadata updates. // Default: 0 - * sid_length?: int|Param, // Deprecated: Setting the "framework.session.sid_length.sid_length" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. - * sid_bits_per_character?: int|Param, // Deprecated: Setting the "framework.session.sid_bits_per_character.sid_bits_per_character" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. - * }, - * request?: bool|array{ // Request configuration - * enabled?: bool|Param, // Default: false - * formats?: array>, - * }, - * assets?: bool|array{ // Assets configuration - * enabled?: bool|Param, // Default: false - * strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false - * version_strategy?: scalar|Param|null, // Default: null - * version?: scalar|Param|null, // Default: null - * version_format?: scalar|Param|null, // Default: "%%s?%%s" - * json_manifest_path?: scalar|Param|null, // Default: null - * base_path?: scalar|Param|null, // Default: "" - * base_urls?: list, - * packages?: array, - * }>, - * }, - * asset_mapper?: bool|array{ // Asset Mapper configuration - * enabled?: bool|Param, // Default: false - * paths?: array, - * excluded_patterns?: list, - * exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true - * server?: bool|Param, // 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|Param|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"|Param, // 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|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" - * importmap_polyfill?: scalar|Param|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|Param|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|Param, // Default: false - * formats?: list, - * extensions?: list, - * }, - * }, - * translator?: bool|array{ // Translator configuration - * enabled?: bool|Param, // Default: false - * fallbacks?: list, - * logging?: bool|Param, // Default: false - * formatter?: scalar|Param|null, // Default: "translator.formatter.default" - * cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations" - * default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" - * paths?: list, - * pseudo_localization?: bool|array{ - * enabled?: bool|Param, // Default: false - * accents?: bool|Param, // Default: true - * expansion_factor?: float|Param, // Default: 1.0 - * brackets?: bool|Param, // Default: true - * parse_html?: bool|Param, // Default: false - * localizable_html_attributes?: list, - * }, - * providers?: array, - * locales?: list, - * }>, - * globals?: array, - * domain?: string|Param, - * }>, - * }, - * validation?: bool|array{ // Validation configuration - * enabled?: bool|Param, // Default: false - * cache?: scalar|Param|null, // Deprecated: Setting the "framework.validation.cache.cache" configuration option is deprecated. It will be removed in version 8.0. - * enable_attributes?: bool|Param, // Default: true - * static_method?: list, - * translation_domain?: scalar|Param|null, // Default: "validators" - * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|"loose"|Param, // Default: "html5" - * mapping?: array{ - * paths?: list, - * }, - * not_compromised_password?: bool|array{ - * enabled?: bool|Param, // When disabled, compromised passwords will be accepted as valid. // Default: true - * endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null - * }, - * disable_translation?: bool|Param, // Default: false - * auto_mapping?: array, - * }>, - * }, - * annotations?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * serializer?: bool|array{ // Serializer configuration - * enabled?: bool|Param, // Default: false - * enable_attributes?: bool|Param, // Default: true - * name_converter?: scalar|Param|null, - * circular_reference_handler?: scalar|Param|null, - * max_depth_handler?: scalar|Param|null, - * mapping?: array{ - * paths?: list, - * }, - * default_context?: list, - * named_serializers?: array, - * include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true - * include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true - * }>, - * }, - * property_access?: bool|array{ // Property access configuration - * enabled?: bool|Param, // Default: false - * magic_call?: bool|Param, // Default: false - * magic_get?: bool|Param, // Default: true - * magic_set?: bool|Param, // Default: true - * throw_exception_on_invalid_index?: bool|Param, // Default: false - * throw_exception_on_invalid_property_path?: bool|Param, // Default: true - * }, - * type_info?: bool|array{ // Type info configuration - * enabled?: bool|Param, // Default: false - * aliases?: array, - * }, - * property_info?: bool|array{ // Property info configuration - * enabled?: bool|Param, // Default: false - * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. - * }, - * cache?: array{ // Cache configuration - * prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" - * app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" - * system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system" - * directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app" - * default_psr6_provider?: scalar|Param|null, - * default_redis_provider?: scalar|Param|null, // Default: "redis://localhost" - * default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost" - * default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost" - * default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection" - * default_pdo_provider?: scalar|Param|null, // Default: null - * pools?: array, - * tags?: scalar|Param|null, // Default: null - * public?: bool|Param, // Default: false - * default_lifetime?: scalar|Param|null, // Default lifetime of the pool. - * provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter. - * early_expiration_message_bus?: scalar|Param|null, - * clearer?: scalar|Param|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|Param, // Throw PHP errors as \ErrorException instances. // Default: true - * }, - * exceptions?: array, - * web_link?: bool|array{ // Web links configuration - * enabled?: bool|Param, // Default: false - * }, - * lock?: bool|string|array{ // Lock configuration - * enabled?: bool|Param, // Default: false - * resources?: array>, - * }, - * semaphore?: bool|string|array{ // Semaphore configuration - * enabled?: bool|Param, // Default: false - * resources?: array, - * }, - * messenger?: bool|array{ // Messenger configuration - * enabled?: bool|Param, // Default: false - * routing?: array, - * }>, - * serializer?: array{ - * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" - * symfony_serializer?: array{ - * format?: scalar|Param|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|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null - * retry_strategy?: string|array{ - * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 - * }, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null - * }>, - * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null - * stop_worker_on_signals?: list, - * default_bus?: scalar|Param|null, // Default: null - * buses?: array, - * }>, - * }>, - * }, - * scheduler?: bool|array{ // Scheduler configuration - * enabled?: bool|Param, // Default: false - * }, - * disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true - * http_client?: bool|array{ // HTTP Client configuration - * enabled?: bool|Param, // Default: false - * max_host_connections?: int|Param, // The maximum number of connections to a single host. - * default_options?: array{ - * headers?: array, - * vars?: array, - * max_redirects?: int|Param, // The maximum number of redirects to follow. - * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. - * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. - * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. - * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. - * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|Param|null, // A certificate authority file. - * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|Param|null, // A PEM formatted certificate file. - * local_pk?: scalar|Param|null, // A private key file. - * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|Param|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|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null - * caching?: bool|array{ // Caching configuration. - * enabled?: bool|Param, // Default: false - * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" - * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true - * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null - * }, - * retry_failed?: bool|array{ - * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null - * http_codes?: array, - * }>, - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 - * }, - * }, - * mock_response_factory?: scalar|Param|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|Param, // The maximum number of redirects to follow. - * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. - * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. - * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. - * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. - * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|Param|null, // A certificate authority file. - * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|Param|null, // A PEM formatted certificate file. - * local_pk?: scalar|Param|null, // A private key file. - * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|Param|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|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null - * caching?: bool|array{ // Caching configuration. - * enabled?: bool|Param, // Default: false - * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" - * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true - * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null - * }, - * retry_failed?: bool|array{ - * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null - * http_codes?: array, - * }>, - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 - * }, - * }>, - * }, - * mailer?: bool|array{ // Mailer configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null - * dsn?: scalar|Param|null, // Default: null - * transports?: array, - * envelope?: array{ // Mailer Envelope configuration - * sender?: scalar|Param|null, - * recipients?: list, - * allowed_recipients?: list, - * }, - * headers?: array, - * dkim_signer?: bool|array{ // DKIM signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" - * domain?: scalar|Param|null, // Default: "" - * select?: scalar|Param|null, // Default: "" - * passphrase?: scalar|Param|null, // The private key passphrase // Default: "" - * options?: array, - * }, - * smime_signer?: bool|array{ // S/MIME signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|Param|null, // Path to key (in PEM format) // Default: "" - * certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" - * passphrase?: scalar|Param|null, // The private key passphrase // Default: null - * extra_certificates?: scalar|Param|null, // Default: null - * sign_options?: int|Param, // Default: null - * }, - * smime_encrypter?: bool|array{ // S/MIME encrypter configuration - * enabled?: bool|Param, // Default: false - * repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" - * cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null - * }, - * }, - * secrets?: bool|array{ - * enabled?: bool|Param, // Default: true - * vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" - * local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local" - * decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" - * }, - * notifier?: bool|array{ // Notifier configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|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|Param, // Default: false - * channel_policy?: array>, - * admin_recipients?: list, - * }, - * rate_limiter?: bool|array{ // Rate limiter configuration - * enabled?: bool|Param, // Default: false - * limiters?: array, - * limit?: int|Param, // The maximum allowed hits in a fixed interval or burst. - * interval?: scalar|Param|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|Param|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|Param, // Amount of tokens to add each interval. // Default: 1 - * }, - * }>, - * }, - * uid?: bool|array{ // Uid configuration - * enabled?: bool|Param, // Default: false - * default_uuid_version?: 7|6|4|1|Param, // Default: 7 - * name_based_uuid_version?: 5|3|Param, // Default: 5 - * name_based_uuid_namespace?: scalar|Param|null, - * time_based_uuid_version?: 7|6|1|Param, // Default: 7 - * time_based_uuid_node?: scalar|Param|null, - * }, - * html_sanitizer?: bool|array{ // HtmlSanitizer configuration - * enabled?: bool|Param, // Default: false - * sanitizers?: array, - * block_elements?: list, - * drop_elements?: list, - * allow_attributes?: array, - * drop_attributes?: array, - * force_attributes?: array>, - * force_https_urls?: bool|Param, // 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|Param, // 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|Param, // 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|Param, // The maximum length allowed for the sanitized input. // Default: 0 - * }>, - * }, - * webhook?: bool|array{ // Webhook configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" - * routing?: array, - * }, - * remote-event?: bool|array{ // RemoteEvent configuration - * enabled?: bool|Param, // Default: false - * }, - * json_streamer?: bool|array{ // JSON streamer configuration - * enabled?: bool|Param, // Default: false - * }, - * } - * @psalm-type KununuTestingConfig = array{ - * connections?: array, - * excluded_tables?: list, - * }>, - * non_transactional_connections?: array, - * excluded_tables?: list, - * }>, - * elastic_search?: array, - * service: scalar|Param|null, - * index_name: scalar|Param|null, - * }>, - * open_search?: array, - * service: scalar|Param|null, - * index_name: scalar|Param|null, - * }>, - * dynamo_db?: array, - * service: scalar|Param|null, - * table_names?: list, - * }>, - * cache?: array{ - * enable?: bool|Param, // Enable creating orchestrators for cache pools // Default: true - * pools?: array, - * }>, - * }, - * http_client?: array{ - * clients?: list, - * }, - * } - * @psalm-type DoctrineConfig = array{ - * dbal?: array{ - * default_connection?: scalar|Param|null, - * types?: array, - * driver_schemes?: array, - * connections?: array, - * mapping_types?: array, - * default_table_options?: array, - * schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory" - * result_cache?: scalar|Param|null, - * slaves?: array, - * replicas?: array, - * }>, - * }, - * orm?: array{ - * default_entity_manager?: scalar|Param|null, - * auto_generate_proxy_classes?: scalar|Param|null, // Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED" // Default: false - * enable_lazy_ghost_objects?: bool|Param, // Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation // Default: true - * proxy_dir?: scalar|Param|null, // Default: "%kernel.build_dir%/doctrine/orm/Proxies" - * proxy_namespace?: scalar|Param|null, // Default: "Proxies" - * controller_resolver?: bool|array{ - * enabled?: bool|Param, // Default: true - * auto_mapping?: bool|Param|null, // Set to false to disable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: null - * evict_cache?: bool|Param, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false - * }, - * entity_managers?: array, - * }>, - * }>, - * }, - * connection?: scalar|Param|null, - * class_metadata_factory_name?: scalar|Param|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" - * default_repository_class?: scalar|Param|null, // Default: "Doctrine\\ORM\\EntityRepository" - * auto_mapping?: scalar|Param|null, // Default: false - * enable_native_lazy_objects?: bool|Param, // Enables the new native implementation of PHP lazy objects instead of generated proxies // Default: false - * naming_strategy?: scalar|Param|null, // Default: "doctrine.orm.naming_strategy.default" - * quote_strategy?: scalar|Param|null, // Default: "doctrine.orm.quote_strategy.default" - * typed_field_mapper?: scalar|Param|null, // Default: "doctrine.orm.typed_field_mapper.default" - * entity_listener_resolver?: scalar|Param|null, // Default: null - * fetch_mode_subselect_batch_size?: scalar|Param|null, - * repository_factory?: scalar|Param|null, // Default: "doctrine.orm.container_repository_factory" - * schema_ignore_classes?: list, - * report_fields_where_declared?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. // Default: true - * validate_xml_mapping?: bool|Param, // 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|Param|null, // Default: null - * id?: scalar|Param|null, - * pool?: scalar|Param|null, - * }, - * region_lock_lifetime?: scalar|Param|null, // Default: 60 - * log_enabled?: bool|Param, // Default: true - * region_lifetime?: scalar|Param|null, // Default: 3600 - * enabled?: bool|Param, // Default: true - * factory?: scalar|Param|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 DoctrineMigrationsConfig = array{ - * enable_service_migrations?: bool|Param, // Whether to enable fetching migrations from the service container. // Default: false - * migrations_paths?: array, - * services?: array, - * factories?: array, - * storage?: array{ // Storage to use for migration status metadata. - * table_storage?: array{ // The default metadata storage, implemented as a table in the database. - * table_name?: scalar|Param|null, // Default: null - * version_column_name?: scalar|Param|null, // Default: null - * version_column_length?: scalar|Param|null, // Default: null - * executed_at_column_name?: scalar|Param|null, // Default: null - * execution_time_column_name?: scalar|Param|null, // Default: null - * }, - * }, - * migrations?: list, - * connection?: scalar|Param|null, // Connection name to use for the migrations database. // Default: null - * em?: scalar|Param|null, // Entity manager name to use for the migrations database (available when doctrine/orm is installed). // Default: null - * all_or_nothing?: scalar|Param|null, // Run all migrations in a transaction. // Default: false - * check_database_platform?: scalar|Param|null, // Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on. // Default: true - * custom_template?: scalar|Param|null, // Custom template path for generated migration classes. // Default: null - * organize_migrations?: scalar|Param|null, // Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false // Default: false - * enable_profiler?: bool|Param, // Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. // Default: false - * transactional?: bool|Param, // Whether or not to wrap migrations in a single transaction. // Default: true - * } - * @psalm-type ConfigType = array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * kununu_testing?: KununuTestingConfig, - * doctrine?: DoctrineConfig, - * doctrine_migrations?: DoctrineMigrationsConfig, - * "when@dev"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * kununu_testing?: KununuTestingConfig, - * doctrine?: DoctrineConfig, - * doctrine_migrations?: DoctrineMigrationsConfig, - * }, - * "when@test"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * kununu_testing?: KununuTestingConfig, - * doctrine?: DoctrineConfig, - * doctrine_migrations?: DoctrineMigrationsConfig, - * }, - * ..., - * }> - * } - */ -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@test"?: array, - * ... - * } - */ -final class Routes -{ - /** - * @param RoutesConfig $config - * - * @psalm-return RoutesConfig - */ - public static function config(array $config): array - { - return $config; - } -} From c827b656cfd4dfb41f466a21b7f07cb3cf480929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Gon=C3=A7alves?= Date: Tue, 3 Feb 2026 16:44:00 +0000 Subject: [PATCH 3/4] Move to v14.0 of kununu/data-fixtures --- .gitignore | 2 +- composer.json | 2 +- tests/App/config/reference.php | 1102 -------------------------------- 3 files changed, 2 insertions(+), 1104 deletions(-) delete mode 100644 tests/App/config/reference.php diff --git a/.gitignore b/.gitignore index 7255143..4782f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ composer.lock tests/.results/ tests/App/.env.local tests/App/.env.test -test/App/config/reference.php +tests/App/config/reference.php tests/App/var/ vendor/ phpunit.log diff --git a/composer.json b/composer.json index 09bfab1..b7ad44b 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": ">=8.3", "ext-filter": "*", "kununu/collections": "^6.4", - "kununu/data-fixtures": "dev-support-doctrine-dbal-4 as 14.0", + "kununu/data-fixtures": "^14.0", "symfony/config": "^6.4 || ^7.4", "symfony/dependency-injection": "^6.4 || ^7.4", "symfony/framework-bundle": "^6.4 || ^7.4", diff --git a/tests/App/config/reference.php b/tests/App/config/reference.php deleted file mode 100644 index 87cae27..0000000 --- a/tests/App/config/reference.php +++ /dev/null @@ -1,1102 +0,0 @@ - [ - * 'App\\' => [ - * 'resource' => '../src/', - * ], - * ], - * ]); - * ``` - * - * @psalm-type ImportsConfig = list - * @psalm-type ParametersConfig = array|Param|null>|Param|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 - * @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|Param|null, - * http_method_override?: bool|Param, // 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|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" - * ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%" - * test?: bool|Param, - * default_locale?: scalar|Param|null, // Default: "en" - * set_locale_from_accept_language?: bool|Param, // 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|Param, // 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|Param|null, // Default: "error_controller" - * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true - * csrf_protection?: bool|array{ - * enabled?: scalar|Param|null, // Default: null - * stateless_token_ids?: list, - * check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false - * cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" - * }, - * form?: bool|array{ // Form configuration - * enabled?: bool|Param, // Default: false - * csrf_protection?: bool|array{ - * enabled?: scalar|Param|null, // Default: null - * token_id?: scalar|Param|null, // Default: null - * field_name?: scalar|Param|null, // Default: "_token" - * field_attr?: array, - * }, - * }, - * http_cache?: bool|array{ // HTTP cache configuration - * enabled?: bool|Param, // Default: false - * debug?: bool|Param, // Default: "%kernel.debug%" - * trace_level?: "none"|"short"|"full"|Param, - * trace_header?: scalar|Param|null, - * default_ttl?: int|Param, - * private_headers?: list, - * skip_response_headers?: list, - * allow_reload?: bool|Param, - * allow_revalidate?: bool|Param, - * stale_while_revalidate?: int|Param, - * stale_if_error?: int|Param, - * terminate_on_cache_hit?: bool|Param, - * }, - * esi?: bool|array{ // ESI configuration - * enabled?: bool|Param, // Default: false - * }, - * ssi?: bool|array{ // SSI configuration - * enabled?: bool|Param, // Default: false - * }, - * fragments?: bool|array{ // Fragments configuration - * enabled?: bool|Param, // Default: false - * hinclude_default_template?: scalar|Param|null, // Default: null - * path?: scalar|Param|null, // Default: "/_fragment" - * }, - * profiler?: bool|array{ // Profiler configuration - * enabled?: bool|Param, // Default: false - * collect?: bool|Param, // Default: true - * collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null - * only_exceptions?: bool|Param, // Default: false - * only_main_requests?: bool|Param, // Default: false - * dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler" - * collect_serializer_data?: bool|Param, // Enables the serializer data collector and profiler panel. // Default: false - * }, - * workflows?: bool|array{ - * enabled?: bool|Param, // Default: false - * workflows?: array, - * definition_validators?: list, - * support_strategy?: scalar|Param|null, - * initial_marking?: list, - * events_to_dispatch?: list|null, - * places?: list, - * }>, - * transitions: list, - * to?: list, - * weight?: int|Param, // Default: 1 - * metadata?: list, - * }>, - * metadata?: list, - * }>, - * }, - * router?: bool|array{ // Router configuration - * enabled?: bool|Param, // Default: false - * resource: scalar|Param|null, - * type?: scalar|Param|null, - * cache_dir?: scalar|Param|null, // Deprecated: Setting the "framework.router.cache_dir.cache_dir" configuration option is deprecated. It will be removed in version 8.0. // Default: "%kernel.build_dir%" - * default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null - * http_port?: scalar|Param|null, // Default: 80 - * https_port?: scalar|Param|null, // Default: 443 - * strict_requirements?: scalar|Param|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|Param, // Default: true - * }, - * session?: bool|array{ // Session configuration - * enabled?: bool|Param, // Default: false - * storage_factory_id?: scalar|Param|null, // Default: "session.storage.factory.native" - * handler_id?: scalar|Param|null, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. - * name?: scalar|Param|null, - * cookie_lifetime?: scalar|Param|null, - * cookie_path?: scalar|Param|null, - * cookie_domain?: scalar|Param|null, - * cookie_secure?: true|false|"auto"|Param, // Default: "auto" - * cookie_httponly?: bool|Param, // Default: true - * cookie_samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" - * use_cookies?: bool|Param, - * gc_divisor?: scalar|Param|null, - * gc_probability?: scalar|Param|null, - * gc_maxlifetime?: scalar|Param|null, - * save_path?: scalar|Param|null, // Defaults to "%kernel.cache_dir%/sessions" if the "handler_id" option is not null. - * metadata_update_threshold?: int|Param, // Seconds to wait between 2 session metadata updates. // Default: 0 - * sid_length?: int|Param, // Deprecated: Setting the "framework.session.sid_length.sid_length" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. - * sid_bits_per_character?: int|Param, // Deprecated: Setting the "framework.session.sid_bits_per_character.sid_bits_per_character" configuration option is deprecated. It will be removed in version 8.0. No alternative is provided as PHP 8.4 has deprecated the related option. - * }, - * request?: bool|array{ // Request configuration - * enabled?: bool|Param, // Default: false - * formats?: array>, - * }, - * assets?: bool|array{ // Assets configuration - * enabled?: bool|Param, // Default: false - * strict_mode?: bool|Param, // Throw an exception if an entry is missing from the manifest.json. // Default: false - * version_strategy?: scalar|Param|null, // Default: null - * version?: scalar|Param|null, // Default: null - * version_format?: scalar|Param|null, // Default: "%%s?%%s" - * json_manifest_path?: scalar|Param|null, // Default: null - * base_path?: scalar|Param|null, // Default: "" - * base_urls?: list, - * packages?: array, - * }>, - * }, - * asset_mapper?: bool|array{ // Asset Mapper configuration - * enabled?: bool|Param, // Default: false - * paths?: array, - * excluded_patterns?: list, - * exclude_dotfiles?: bool|Param, // If true, any files starting with "." will be excluded from the asset mapper. // Default: true - * server?: bool|Param, // 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|Param|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"|Param, // 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|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" - * importmap_polyfill?: scalar|Param|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|Param|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|Param, // Default: false - * formats?: list, - * extensions?: list, - * }, - * }, - * translator?: bool|array{ // Translator configuration - * enabled?: bool|Param, // Default: false - * fallbacks?: list, - * logging?: bool|Param, // Default: false - * formatter?: scalar|Param|null, // Default: "translator.formatter.default" - * cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations" - * default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" - * paths?: list, - * pseudo_localization?: bool|array{ - * enabled?: bool|Param, // Default: false - * accents?: bool|Param, // Default: true - * expansion_factor?: float|Param, // Default: 1.0 - * brackets?: bool|Param, // Default: true - * parse_html?: bool|Param, // Default: false - * localizable_html_attributes?: list, - * }, - * providers?: array, - * locales?: list, - * }>, - * globals?: array, - * domain?: string|Param, - * }>, - * }, - * validation?: bool|array{ // Validation configuration - * enabled?: bool|Param, // Default: false - * cache?: scalar|Param|null, // Deprecated: Setting the "framework.validation.cache.cache" configuration option is deprecated. It will be removed in version 8.0. - * enable_attributes?: bool|Param, // Default: true - * static_method?: list, - * translation_domain?: scalar|Param|null, // Default: "validators" - * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|"loose"|Param, // Default: "html5" - * mapping?: array{ - * paths?: list, - * }, - * not_compromised_password?: bool|array{ - * enabled?: bool|Param, // When disabled, compromised passwords will be accepted as valid. // Default: true - * endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null - * }, - * disable_translation?: bool|Param, // Default: false - * auto_mapping?: array, - * }>, - * }, - * annotations?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * serializer?: bool|array{ // Serializer configuration - * enabled?: bool|Param, // Default: false - * enable_attributes?: bool|Param, // Default: true - * name_converter?: scalar|Param|null, - * circular_reference_handler?: scalar|Param|null, - * max_depth_handler?: scalar|Param|null, - * mapping?: array{ - * paths?: list, - * }, - * default_context?: list, - * named_serializers?: array, - * include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true - * include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true - * }>, - * }, - * property_access?: bool|array{ // Property access configuration - * enabled?: bool|Param, // Default: false - * magic_call?: bool|Param, // Default: false - * magic_get?: bool|Param, // Default: true - * magic_set?: bool|Param, // Default: true - * throw_exception_on_invalid_index?: bool|Param, // Default: false - * throw_exception_on_invalid_property_path?: bool|Param, // Default: true - * }, - * type_info?: bool|array{ // Type info configuration - * enabled?: bool|Param, // Default: false - * aliases?: array, - * }, - * property_info?: bool|array{ // Property info configuration - * enabled?: bool|Param, // Default: false - * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. - * }, - * cache?: array{ // Cache configuration - * prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" - * app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" - * system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system" - * directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app" - * default_psr6_provider?: scalar|Param|null, - * default_redis_provider?: scalar|Param|null, // Default: "redis://localhost" - * default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost" - * default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost" - * default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection" - * default_pdo_provider?: scalar|Param|null, // Default: null - * pools?: array, - * tags?: scalar|Param|null, // Default: null - * public?: bool|Param, // Default: false - * default_lifetime?: scalar|Param|null, // Default lifetime of the pool. - * provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter. - * early_expiration_message_bus?: scalar|Param|null, - * clearer?: scalar|Param|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|Param, // Throw PHP errors as \ErrorException instances. // Default: true - * }, - * exceptions?: array, - * web_link?: bool|array{ // Web links configuration - * enabled?: bool|Param, // Default: false - * }, - * lock?: bool|string|array{ // Lock configuration - * enabled?: bool|Param, // Default: false - * resources?: array>, - * }, - * semaphore?: bool|string|array{ // Semaphore configuration - * enabled?: bool|Param, // Default: false - * resources?: array, - * }, - * messenger?: bool|array{ // Messenger configuration - * enabled?: bool|Param, // Default: false - * routing?: array, - * }>, - * serializer?: array{ - * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" - * symfony_serializer?: array{ - * format?: scalar|Param|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|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null - * retry_strategy?: string|array{ - * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 - * }, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use when processing messages. // Default: null - * }>, - * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null - * stop_worker_on_signals?: list, - * default_bus?: scalar|Param|null, // Default: null - * buses?: array, - * }>, - * }>, - * }, - * scheduler?: bool|array{ // Scheduler configuration - * enabled?: bool|Param, // Default: false - * }, - * disallow_search_engine_index?: bool|Param, // Enabled by default when debug is enabled. // Default: true - * http_client?: bool|array{ // HTTP Client configuration - * enabled?: bool|Param, // Default: false - * max_host_connections?: int|Param, // The maximum number of connections to a single host. - * default_options?: array{ - * headers?: array, - * vars?: array, - * max_redirects?: int|Param, // The maximum number of redirects to follow. - * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. - * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. - * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. - * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. - * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|Param|null, // A certificate authority file. - * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|Param|null, // A PEM formatted certificate file. - * local_pk?: scalar|Param|null, // A private key file. - * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|Param|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|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null - * caching?: bool|array{ // Caching configuration. - * enabled?: bool|Param, // Default: false - * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" - * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true - * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null - * }, - * retry_failed?: bool|array{ - * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null - * http_codes?: array, - * }>, - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 - * }, - * }, - * mock_response_factory?: scalar|Param|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|Param, // The maximum number of redirects to follow. - * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. - * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. - * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. - * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. - * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|Param|null, // A certificate authority file. - * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|Param|null, // A PEM formatted certificate file. - * local_pk?: scalar|Param|null, // A private key file. - * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|Param|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|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null - * caching?: bool|array{ // Caching configuration. - * enabled?: bool|Param, // Default: false - * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" - * shared?: bool|Param, // Indicates whether the cache is shared (public) or private. // Default: true - * max_ttl?: int|Param, // The maximum TTL (in seconds) allowed for cached responses. Null means no cap. // Default: null - * }, - * retry_failed?: bool|array{ - * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null - * http_codes?: array, - * }>, - * max_retries?: int|Param, // Default: 3 - * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 - * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: delay * (multiple ^ retries). // Default: 2 - * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 - * jitter?: float|Param, // Randomness in percent (between 0 and 1) to apply to the delay. // Default: 0.1 - * }, - * }>, - * }, - * mailer?: bool|array{ // Mailer configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null - * dsn?: scalar|Param|null, // Default: null - * transports?: array, - * envelope?: array{ // Mailer Envelope configuration - * sender?: scalar|Param|null, - * recipients?: list, - * allowed_recipients?: list, - * }, - * headers?: array, - * dkim_signer?: bool|array{ // DKIM signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" - * domain?: scalar|Param|null, // Default: "" - * select?: scalar|Param|null, // Default: "" - * passphrase?: scalar|Param|null, // The private key passphrase // Default: "" - * options?: array, - * }, - * smime_signer?: bool|array{ // S/MIME signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|Param|null, // Path to key (in PEM format) // Default: "" - * certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" - * passphrase?: scalar|Param|null, // The private key passphrase // Default: null - * extra_certificates?: scalar|Param|null, // Default: null - * sign_options?: int|Param, // Default: null - * }, - * smime_encrypter?: bool|array{ // S/MIME encrypter configuration - * enabled?: bool|Param, // Default: false - * repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" - * cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null - * }, - * }, - * secrets?: bool|array{ - * enabled?: bool|Param, // Default: true - * vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" - * local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local" - * decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" - * }, - * notifier?: bool|array{ // Notifier configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|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|Param, // Default: false - * channel_policy?: array>, - * admin_recipients?: list, - * }, - * rate_limiter?: bool|array{ // Rate limiter configuration - * enabled?: bool|Param, // Default: false - * limiters?: array, - * limit?: int|Param, // The maximum allowed hits in a fixed interval or burst. - * interval?: scalar|Param|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|Param|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|Param, // Amount of tokens to add each interval. // Default: 1 - * }, - * }>, - * }, - * uid?: bool|array{ // Uid configuration - * enabled?: bool|Param, // Default: false - * default_uuid_version?: 7|6|4|1|Param, // Default: 7 - * name_based_uuid_version?: 5|3|Param, // Default: 5 - * name_based_uuid_namespace?: scalar|Param|null, - * time_based_uuid_version?: 7|6|1|Param, // Default: 7 - * time_based_uuid_node?: scalar|Param|null, - * }, - * html_sanitizer?: bool|array{ // HtmlSanitizer configuration - * enabled?: bool|Param, // Default: false - * sanitizers?: array, - * block_elements?: list, - * drop_elements?: list, - * allow_attributes?: array, - * drop_attributes?: array, - * force_attributes?: array>, - * force_https_urls?: bool|Param, // 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|Param, // 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|Param, // 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|Param, // The maximum length allowed for the sanitized input. // Default: 0 - * }>, - * }, - * webhook?: bool|array{ // Webhook configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" - * routing?: array, - * }, - * remote-event?: bool|array{ // RemoteEvent configuration - * enabled?: bool|Param, // Default: false - * }, - * json_streamer?: bool|array{ // JSON streamer configuration - * enabled?: bool|Param, // Default: false - * }, - * } - * @psalm-type KununuTestingConfig = array{ - * connections?: array, - * excluded_tables?: list, - * }>, - * non_transactional_connections?: array, - * excluded_tables?: list, - * }>, - * elastic_search?: array, - * service: scalar|Param|null, - * index_name: scalar|Param|null, - * }>, - * open_search?: array, - * service: scalar|Param|null, - * index_name: scalar|Param|null, - * }>, - * dynamo_db?: array, - * service: scalar|Param|null, - * table_names?: list, - * }>, - * cache?: array{ - * enable?: bool|Param, // Enable creating orchestrators for cache pools // Default: true - * pools?: array, - * }>, - * }, - * http_client?: array{ - * clients?: list, - * }, - * } - * @psalm-type DoctrineConfig = array{ - * dbal?: array{ - * default_connection?: scalar|Param|null, - * types?: array, - * driver_schemes?: array, - * connections?: array, - * mapping_types?: array, - * default_table_options?: array, - * schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory" - * result_cache?: scalar|Param|null, - * slaves?: array, - * replicas?: array, - * }>, - * }, - * orm?: array{ - * default_entity_manager?: scalar|Param|null, - * auto_generate_proxy_classes?: scalar|Param|null, // Auto generate mode possible values are: "NEVER", "ALWAYS", "FILE_NOT_EXISTS", "EVAL", "FILE_NOT_EXISTS_OR_CHANGED" // Default: false - * enable_lazy_ghost_objects?: bool|Param, // Enables the new implementation of proxies based on lazy ghosts instead of using the legacy implementation // Default: true - * proxy_dir?: scalar|Param|null, // Default: "%kernel.build_dir%/doctrine/orm/Proxies" - * proxy_namespace?: scalar|Param|null, // Default: "Proxies" - * controller_resolver?: bool|array{ - * enabled?: bool|Param, // Default: true - * auto_mapping?: bool|Param|null, // Set to false to disable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: null - * evict_cache?: bool|Param, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false - * }, - * entity_managers?: array, - * }>, - * }>, - * }, - * connection?: scalar|Param|null, - * class_metadata_factory_name?: scalar|Param|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" - * default_repository_class?: scalar|Param|null, // Default: "Doctrine\\ORM\\EntityRepository" - * auto_mapping?: scalar|Param|null, // Default: false - * enable_native_lazy_objects?: bool|Param, // Enables the new native implementation of PHP lazy objects instead of generated proxies // Default: false - * naming_strategy?: scalar|Param|null, // Default: "doctrine.orm.naming_strategy.default" - * quote_strategy?: scalar|Param|null, // Default: "doctrine.orm.quote_strategy.default" - * typed_field_mapper?: scalar|Param|null, // Default: "doctrine.orm.typed_field_mapper.default" - * entity_listener_resolver?: scalar|Param|null, // Default: null - * fetch_mode_subselect_batch_size?: scalar|Param|null, - * repository_factory?: scalar|Param|null, // Default: "doctrine.orm.container_repository_factory" - * schema_ignore_classes?: list, - * report_fields_where_declared?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455. // Default: true - * validate_xml_mapping?: bool|Param, // 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|Param|null, // Default: null - * id?: scalar|Param|null, - * pool?: scalar|Param|null, - * }, - * region_lock_lifetime?: scalar|Param|null, // Default: 60 - * log_enabled?: bool|Param, // Default: true - * region_lifetime?: scalar|Param|null, // Default: 3600 - * enabled?: bool|Param, // Default: true - * factory?: scalar|Param|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 DoctrineMigrationsConfig = array{ - * enable_service_migrations?: bool|Param, // Whether to enable fetching migrations from the service container. // Default: false - * migrations_paths?: array, - * services?: array, - * factories?: array, - * storage?: array{ // Storage to use for migration status metadata. - * table_storage?: array{ // The default metadata storage, implemented as a table in the database. - * table_name?: scalar|Param|null, // Default: null - * version_column_name?: scalar|Param|null, // Default: null - * version_column_length?: scalar|Param|null, // Default: null - * executed_at_column_name?: scalar|Param|null, // Default: null - * execution_time_column_name?: scalar|Param|null, // Default: null - * }, - * }, - * migrations?: list, - * connection?: scalar|Param|null, // Connection name to use for the migrations database. // Default: null - * em?: scalar|Param|null, // Entity manager name to use for the migrations database (available when doctrine/orm is installed). // Default: null - * all_or_nothing?: scalar|Param|null, // Run all migrations in a transaction. // Default: false - * check_database_platform?: scalar|Param|null, // Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on. // Default: true - * custom_template?: scalar|Param|null, // Custom template path for generated migration classes. // Default: null - * organize_migrations?: scalar|Param|null, // Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false // Default: false - * enable_profiler?: bool|Param, // Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. // Default: false - * transactional?: bool|Param, // Whether or not to wrap migrations in a single transaction. // Default: true - * } - * @psalm-type ConfigType = array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * kununu_testing?: KununuTestingConfig, - * doctrine?: DoctrineConfig, - * doctrine_migrations?: DoctrineMigrationsConfig, - * "when@dev"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * kununu_testing?: KununuTestingConfig, - * doctrine?: DoctrineConfig, - * doctrine_migrations?: DoctrineMigrationsConfig, - * }, - * "when@test"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * kununu_testing?: KununuTestingConfig, - * doctrine?: DoctrineConfig, - * doctrine_migrations?: DoctrineMigrationsConfig, - * }, - * ..., - * }> - * } - */ -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@test"?: array, - * ... - * } - */ -final class Routes -{ - /** - * @param RoutesConfig $config - * - * @psalm-return RoutesConfig - */ - public static function config(array $config): array - { - return $config; - } -} From 7bb1dda97e7b7f918a4b0e3612bafa27d9265fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Gon=C3=A7alves?= Date: Tue, 3 Feb 2026 16:57:44 +0000 Subject: [PATCH 4/4] Bump SonarSource/sonarqube-scan-action to v7.0.0 --- .github/workflows/continuous-integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d638ac8..5d9e959 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -195,7 +195,7 @@ jobs: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-junit.xml - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v6.0.0 + uses: SonarSource/sonarqube-scan-action@v7.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}