From 0d01eefab21c98cddfe608abb199282d3d7ae868 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 15 Jan 2026 13:11:00 +0000 Subject: [PATCH 1/5] Add php 8.5 support to backend --- config/reference.php | 1090 +++++++++++++++++ src/Controller/GeneratorController.php | 1 + src/Form/Generator/PhpType.php | 8 + .../AvailableExtensionsFactory.php | 2 + .../PhpExtension/Php85AvailableExtensions.php | 122 ++ src/PHPDocker/Project/ServiceOptions/Php.php | 2 + 6 files changed, 1225 insertions(+) create mode 100644 config/reference.php create mode 100644 src/PHPDocker/PhpExtension/Php85AvailableExtensions.php diff --git a/config/reference.php b/config/reference.php new file mode 100644 index 00000000..ea3c6a65 --- /dev/null +++ b/config/reference.php @@ -0,0 +1,1090 @@ + [ + * 'App\\' => [ + * 'resource' => '../src/', + * ], + * ], + * ]); + * ``` + * + * @psalm-type ImportsConfig = list + * @psalm-type ParametersConfig = array|null>|null> + * @psalm-type ArgumentsType = list|array + * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} + * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key + * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator|ExpressionConfigurator + * @psalm-type DeprecationType = array{package: string, version: string, message?: string} + * @psalm-type DefaultsType = array{ + * public?: bool, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * } + * @psalm-type InstanceofType = array{ + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type DefinitionType = array{ + * class?: string, + * file?: string, + * parent?: string, + * shared?: bool, + * synthetic?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * configurator?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * decorates?: string, + * decoration_inner_name?: string, + * decoration_priority?: int, + * decoration_on_invalid?: 'exception'|'ignore'|null, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * from_callable?: CallbackType, + * } + * @psalm-type AliasType = string|array{ + * alias: string, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type PrototypeType = array{ + * resource: string, + * namespace?: string, + * exclude?: string|list, + * parent?: string, + * shared?: bool, + * lazy?: bool|string, + * public?: bool, + * abstract?: bool, + * deprecated?: DeprecationType, + * factory?: CallbackType, + * arguments?: ArgumentsType, + * properties?: array, + * configurator?: CallbackType, + * calls?: list, + * tags?: TagsType, + * resource_tags?: TagsType, + * autowire?: bool, + * autoconfigure?: bool, + * bind?: array, + * constructor?: string, + * } + * @psalm-type StackType = array{ + * stack: list>, + * public?: bool, + * deprecated?: DeprecationType, + * } + * @psalm-type ServicesConfig = array{ + * _defaults?: DefaultsType, + * _instanceof?: InstanceofType, + * ... + * } + * @psalm-type ExtensionType = array + * @psalm-type FrameworkConfig = array{ + * secret?: scalar|null|Param, + * 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|null|Param, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|null|Param, // Default: "%env(default::SYMFONY_IDE)%" + * test?: bool|Param, + * default_locale?: scalar|null|Param, // 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|null|Param, // Default: "error_controller" + * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true + * csrf_protection?: bool|array{ + * enabled?: scalar|null|Param, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|null|Param, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|null|Param, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" + * }, + * form?: bool|array{ // Form configuration + * enabled?: bool|Param, // Default: true + * csrf_protection?: array{ + * enabled?: scalar|null|Param, // Default: null + * token_id?: scalar|null|Param, // Default: null + * field_name?: scalar|null|Param, // 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|null|Param, + * 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|null|Param, // Default: null + * path?: scalar|null|Param, // Default: "/_fragment" + * }, + * profiler?: bool|array{ // Profiler configuration + * enabled?: bool|Param, // Default: false + * collect?: bool|Param, // Default: true + * collect_parameter?: scalar|null|Param, // 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|null|Param, // 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|null|Param, + * 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|null|Param, + * type?: scalar|null|Param, + * cache_dir?: scalar|null|Param, // 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|null|Param, // The default URI used to generate URLs in a non-HTTP context. // Default: null + * http_port?: scalar|null|Param, // Default: 80 + * https_port?: scalar|null|Param, // Default: 443 + * strict_requirements?: scalar|null|Param, // 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|null|Param, // Default: "session.storage.factory.native" + * handler_id?: scalar|null|Param, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. + * name?: scalar|null|Param, + * cookie_lifetime?: scalar|null|Param, + * cookie_path?: scalar|null|Param, + * cookie_domain?: scalar|null|Param, + * 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|null|Param, + * gc_probability?: scalar|null|Param, + * gc_maxlifetime?: scalar|null|Param, + * save_path?: scalar|null|Param, // 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|null|Param, // Default: null + * version?: scalar|null|Param, // Default: null + * version_format?: scalar|null|Param, // Default: "%%s?%%s" + * json_manifest_path?: scalar|null|Param, // Default: null + * base_path?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|null|Param, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" + * importmap_script_attributes?: array, + * vendor_dir?: scalar|null|Param, // 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|null|Param, // Default: "translator.formatter.default" + * cache_dir?: scalar|null|Param, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|null|Param, // 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: true + * cache?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // 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|null|Param, + * circular_reference_handler?: scalar|null|Param, + * max_depth_handler?: scalar|null|Param, + * 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: true + * 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: true + * aliases?: array, + * }, + * property_info?: bool|array{ // Property info configuration + * enabled?: bool|Param, // Default: true + * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. + * }, + * cache?: array{ // Cache configuration + * prefix_seed?: scalar|null|Param, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|null|Param, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|null|Param, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|null|Param, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|null|Param, + * default_redis_provider?: scalar|null|Param, // Default: "redis://localhost" + * default_valkey_provider?: scalar|null|Param, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|null|Param, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|null|Param, // Default: "database_connection" + * default_pdo_provider?: scalar|null|Param, // Default: null + * pools?: array, + * tags?: scalar|null|Param, // Default: null + * public?: bool|Param, // Default: false + * default_lifetime?: scalar|null|Param, // Default lifetime of the pool. + * provider?: scalar|null|Param, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|null|Param, + * clearer?: scalar|null|Param, + * }>, + * }, + * 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|null|Param, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * symfony_serializer?: array{ + * format?: scalar|null|Param, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" + * context?: array, + * }, + * }, + * transports?: array, + * failure_transport?: scalar|null|Param, // Transport name to send failed messages to (after all retries have failed). // Default: null + * retry_strategy?: string|array{ + * service?: scalar|null|Param, // 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|null|Param, // Rate limiter name to use when processing messages. // Default: null + * }>, + * failure_transport?: scalar|null|Param, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|null|Param, // 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|null|Param, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null|Param, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // A certificate authority file. + * capath?: scalar|null|Param, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null|Param, // A PEM formatted certificate file. + * local_pk?: scalar|null|Param, // A private key file. + * passphrase?: scalar|null|Param, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null|Param, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null|Param, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // 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|null|Param, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|null|Param, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // A certificate authority file. + * capath?: scalar|null|Param, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|null|Param, // A PEM formatted certificate file. + * local_pk?: scalar|null|Param, // A private key file. + * passphrase?: scalar|null|Param, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|null|Param, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). + * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). + * sha1?: mixed, + * pin-sha256?: mixed, + * md5?: mixed, + * }, + * crypto_method?: scalar|null|Param, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * extra?: array, + * rate_limiter?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|null|Param, // Default: null + * transports?: array, + * envelope?: array{ // Mailer Envelope configuration + * sender?: scalar|null|Param, + * recipients?: list, + * allowed_recipients?: list, + * }, + * headers?: array, + * dkim_signer?: bool|array{ // DKIM signer configuration + * enabled?: bool|Param, // Default: false + * key?: scalar|null|Param, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|null|Param, // Default: "" + * select?: scalar|null|Param, // Default: "" + * passphrase?: scalar|null|Param, // The private key passphrase // Default: "" + * options?: array, + * }, + * smime_signer?: bool|array{ // S/MIME signer configuration + * enabled?: bool|Param, // Default: false + * key?: scalar|null|Param, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|null|Param, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|null|Param, // The private key passphrase // Default: null + * extra_certificates?: scalar|null|Param, // Default: null + * sign_options?: int|Param, // Default: null + * }, + * smime_encrypter?: bool|array{ // S/MIME encrypter configuration + * enabled?: bool|Param, // Default: false + * repository?: scalar|null|Param, // 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|null|Param, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|null|Param, // Default: "%kernel.project_dir%/.env.%kernel.runtime_environment%.local" + * decryption_env_var?: scalar|null|Param, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" + * }, + * notifier?: bool|array{ // Notifier configuration + * enabled?: bool|Param, // Default: false + * message_bus?: scalar|null|Param, // 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|null|Param, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). + * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". + * interval?: scalar|null|Param, // 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|null|Param, + * time_based_uuid_version?: 7|6|1|Param, // Default: 7 + * time_based_uuid_node?: scalar|null|Param, + * }, + * 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|null|Param, // 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 TwigConfig = array{ + * form_themes?: list, + * globals?: array, + * autoescape_service?: scalar|null|Param, // Default: null + * autoescape_service_method?: scalar|null|Param, // Default: null + * base_template_class?: scalar|null|Param, // Deprecated: The child node "base_template_class" at path "twig.base_template_class" is deprecated. + * cache?: scalar|null|Param, // Default: true + * charset?: scalar|null|Param, // Default: "%kernel.charset%" + * debug?: bool|Param, // Default: "%kernel.debug%" + * strict_variables?: bool|Param, // Default: "%kernel.debug%" + * auto_reload?: scalar|null|Param, + * optimizations?: int|Param, + * default_path?: scalar|null|Param, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" + * file_name_pattern?: list, + * paths?: array, + * date?: array{ // The default format options used by the date filter. + * format?: scalar|null|Param, // Default: "F j, Y H:i" + * interval_format?: scalar|null|Param, // Default: "%d days" + * timezone?: scalar|null|Param, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null + * }, + * number_format?: array{ // The default format options for the number_format filter. + * decimals?: int|Param, // Default: 0 + * decimal_point?: scalar|null|Param, // Default: "." + * thousands_separator?: scalar|null|Param, // Default: "," + * }, + * mailer?: array{ + * html_to_text_converter?: scalar|null|Param, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null + * }, + * } + * @psalm-type TwigExtraConfig = array{ + * cache?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * html?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * markdown?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * intl?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * cssinliner?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * inky?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * string?: bool|array{ + * enabled?: bool|Param, // Default: false + * }, + * commonmark?: array{ + * renderer?: array{ // Array of options for rendering HTML. + * block_separator?: scalar|null|Param, + * inner_separator?: scalar|null|Param, + * soft_break?: scalar|null|Param, + * }, + * html_input?: "strip"|"allow"|"escape"|Param, // How to handle HTML input. + * allow_unsafe_links?: bool|Param, // Remove risky link and image URLs by setting this to false. // Default: true + * max_nesting_level?: int|Param, // The maximum nesting level for blocks. // Default: 9223372036854775807 + * max_delimiters_per_line?: int|Param, // The maximum number of strong/emphasis delimiters per line. // Default: 9223372036854775807 + * slug_normalizer?: array{ // Array of options for configuring how URL-safe slugs are created. + * instance?: mixed, + * max_length?: int|Param, // Default: 255 + * unique?: mixed, + * }, + * commonmark?: array{ // Array of options for configuring the CommonMark core extension. + * enable_em?: bool|Param, // Default: true + * enable_strong?: bool|Param, // Default: true + * use_asterisk?: bool|Param, // Default: true + * use_underscore?: bool|Param, // Default: true + * unordered_list_markers?: list, + * }, + * ... + * }, + * } + * @psalm-type WebProfilerConfig = array{ + * toolbar?: bool|array{ // Profiler toolbar configuration + * enabled?: bool|Param, // Default: false + * ajax_replace?: bool|Param, // Replace toolbar on AJAX requests // Default: false + * }, + * intercept_redirects?: bool|Param, // Default: false + * excluded_ajax_paths?: scalar|null|Param, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt" + * } + * @psalm-type MonologConfig = array{ + * use_microseconds?: scalar|null|Param, // Default: true + * channels?: list, + * handlers?: array, + * excluded_http_codes?: list, + * }>, + * accepted_levels?: list, + * min_level?: scalar|null|Param, // Default: "DEBUG" + * max_level?: scalar|null|Param, // Default: "EMERGENCY" + * buffer_size?: scalar|null|Param, // Default: 0 + * flush_on_overflow?: bool|Param, // Default: false + * handler?: scalar|null|Param, + * url?: scalar|null|Param, + * exchange?: scalar|null|Param, + * exchange_name?: scalar|null|Param, // Default: "log" + * room?: scalar|null|Param, + * message_format?: scalar|null|Param, // Default: "text" + * api_version?: scalar|null|Param, // Default: null + * channel?: scalar|null|Param, // Default: null + * bot_name?: scalar|null|Param, // Default: "Monolog" + * use_attachment?: scalar|null|Param, // Default: true + * use_short_attachment?: scalar|null|Param, // Default: false + * include_extra?: scalar|null|Param, // Default: false + * icon_emoji?: scalar|null|Param, // Default: null + * webhook_url?: scalar|null|Param, + * exclude_fields?: list, + * team?: scalar|null|Param, + * notify?: scalar|null|Param, // Default: false + * nickname?: scalar|null|Param, // Default: "Monolog" + * token?: scalar|null|Param, + * region?: scalar|null|Param, + * source?: scalar|null|Param, + * use_ssl?: bool|Param, // Default: true + * user?: mixed, + * title?: scalar|null|Param, // Default: null + * host?: scalar|null|Param, // Default: null + * port?: scalar|null|Param, // Default: 514 + * config?: list, + * members?: list, + * connection_string?: scalar|null|Param, + * timeout?: scalar|null|Param, + * time?: scalar|null|Param, // Default: 60 + * deduplication_level?: scalar|null|Param, // Default: 400 + * store?: scalar|null|Param, // Default: null + * connection_timeout?: scalar|null|Param, + * persistent?: bool|Param, + * dsn?: scalar|null|Param, + * hub_id?: scalar|null|Param, // Default: null + * client_id?: scalar|null|Param, // Default: null + * auto_log_stacks?: scalar|null|Param, // Default: false + * release?: scalar|null|Param, // Default: null + * environment?: scalar|null|Param, // Default: null + * message_type?: scalar|null|Param, // Default: 0 + * parse_mode?: scalar|null|Param, // Default: null + * disable_webpage_preview?: bool|null|Param, // Default: null + * disable_notification?: bool|null|Param, // Default: null + * split_long_messages?: bool|Param, // Default: false + * delay_between_messages?: bool|Param, // Default: false + * topic?: int|Param, // Default: null + * factor?: int|Param, // Default: 1 + * tags?: list, + * console_formater_options?: mixed, // Deprecated: "monolog.handlers..console_formater_options.console_formater_options" is deprecated, use "monolog.handlers..console_formater_options.console_formatter_options" instead. + * console_formatter_options?: mixed, // Default: [] + * formatter?: scalar|null|Param, + * nested?: bool|Param, // Default: false + * publisher?: string|array{ + * id?: scalar|null|Param, + * hostname?: scalar|null|Param, + * port?: scalar|null|Param, // Default: 12201 + * chunk_size?: scalar|null|Param, // Default: 1420 + * encoder?: "json"|"compressed_json"|Param, + * }, + * mongo?: string|array{ + * id?: scalar|null|Param, + * host?: scalar|null|Param, + * port?: scalar|null|Param, // Default: 27017 + * user?: scalar|null|Param, + * pass?: scalar|null|Param, + * database?: scalar|null|Param, // Default: "monolog" + * collection?: scalar|null|Param, // Default: "logs" + * }, + * mongodb?: string|array{ + * id?: scalar|null|Param, // ID of a MongoDB\Client service + * uri?: scalar|null|Param, + * username?: scalar|null|Param, + * password?: scalar|null|Param, + * database?: scalar|null|Param, // Default: "monolog" + * collection?: scalar|null|Param, // Default: "logs" + * }, + * elasticsearch?: string|array{ + * id?: scalar|null|Param, + * hosts?: list, + * host?: scalar|null|Param, + * port?: scalar|null|Param, // Default: 9200 + * transport?: scalar|null|Param, // Default: "Http" + * user?: scalar|null|Param, // Default: null + * password?: scalar|null|Param, // Default: null + * }, + * index?: scalar|null|Param, // Default: "monolog" + * document_type?: scalar|null|Param, // Default: "logs" + * ignore_error?: scalar|null|Param, // Default: false + * redis?: string|array{ + * id?: scalar|null|Param, + * host?: scalar|null|Param, + * password?: scalar|null|Param, // Default: null + * port?: scalar|null|Param, // Default: 6379 + * database?: scalar|null|Param, // Default: 0 + * key_name?: scalar|null|Param, // Default: "monolog_redis" + * }, + * predis?: string|array{ + * id?: scalar|null|Param, + * host?: scalar|null|Param, + * }, + * from_email?: scalar|null|Param, + * to_email?: list, + * subject?: scalar|null|Param, + * content_type?: scalar|null|Param, // Default: null + * headers?: list, + * mailer?: scalar|null|Param, // Default: null + * email_prototype?: string|array{ + * id: scalar|null|Param, + * method?: scalar|null|Param, // Default: null + * }, + * lazy?: bool|Param, // Default: true + * verbosity_levels?: array{ + * VERBOSITY_QUIET?: scalar|null|Param, // Default: "ERROR" + * VERBOSITY_NORMAL?: scalar|null|Param, // Default: "WARNING" + * VERBOSITY_VERBOSE?: scalar|null|Param, // Default: "NOTICE" + * VERBOSITY_VERY_VERBOSE?: scalar|null|Param, // Default: "INFO" + * VERBOSITY_DEBUG?: scalar|null|Param, // Default: "DEBUG" + * }, + * channels?: string|array{ + * type?: scalar|null|Param, + * elements?: list, + * }, + * }>, + * } + * @psalm-type DebugConfig = array{ + * max_items?: int|Param, // Max number of displayed items past the first level, -1 means no limit. // Default: 2500 + * min_depth?: int|Param, // Minimum tree depth to clone all the items, 1 is default. // Default: 1 + * max_string_length?: int|Param, // Max length of displayed strings, -1 means no limit. // Default: -1 + * dump_destination?: scalar|null|Param, // A stream URL where dumps should be written to. // Default: null + * theme?: "dark"|"light"|Param, // Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light". // Default: "dark" + * } + * @psalm-type ConfigType = array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_extra?: TwigExtraConfig, + * monolog?: MonologConfig, + * "when@dev"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_extra?: TwigExtraConfig, + * web_profiler?: WebProfilerConfig, + * monolog?: MonologConfig, + * debug?: DebugConfig, + * }, + * "when@prod"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_extra?: TwigExtraConfig, + * monolog?: MonologConfig, + * }, + * "when@test"?: array{ + * imports?: ImportsConfig, + * parameters?: ParametersConfig, + * services?: ServicesConfig, + * framework?: FrameworkConfig, + * twig?: TwigConfig, + * twig_extra?: TwigExtraConfig, + * web_profiler?: WebProfilerConfig, + * monolog?: MonologConfig, + * }, + * ..., + * }> + * } + */ +final class App +{ + /** + * @param ConfigType $config + * + * @psalm-return ConfigType + */ + public static function config(array $config): array + { + return AppReference::config($config); + } +} + +namespace Symfony\Component\Routing\Loader\Configurator; + +/** + * This class provides array-shapes for configuring the routes of an application. + * + * Example: + * + * ```php + * // config/routes.php + * namespace Symfony\Component\Routing\Loader\Configurator; + * + * return Routes::config([ + * 'controllers' => [ + * 'resource' => 'routing.controllers', + * ], + * ]); + * ``` + * + * @psalm-type RouteConfig = array{ + * path: string|array, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type ImportConfig = array{ + * resource: string, + * type?: string, + * exclude?: string|list, + * prefix?: string|array, + * name_prefix?: string, + * trailing_slash_on_root?: bool, + * controller?: string, + * methods?: string|list, + * requirements?: array, + * defaults?: array, + * options?: array, + * host?: string|array, + * schemes?: string|list, + * condition?: string, + * locale?: string, + * format?: string, + * utf8?: bool, + * stateless?: bool, + * } + * @psalm-type AliasConfig = array{ + * alias: string, + * deprecated?: array{package:string, version:string, message?:string}, + * } + * @psalm-type RoutesConfig = array{ + * "when@dev"?: array, + * "when@prod"?: array, + * "when@test"?: array, + * ... + * } + */ +final class Routes +{ + /** + * @param RoutesConfig $config + * + * @psalm-return RoutesConfig + */ + public static function config(array $config): array + { + return $config; + } +} diff --git a/src/Controller/GeneratorController.php b/src/Controller/GeneratorController.php index 2089c8c8..6a252aab 100644 --- a/src/Controller/GeneratorController.php +++ b/src/Controller/GeneratorController.php @@ -79,6 +79,7 @@ private function hydrateProject(array $formData): Project PhpOptions::PHP_VERSION_82 => $phpData['phpExtensions82'], PhpOptions::PHP_VERSION_83 => $phpData['phpExtensions83'], PhpOptions::PHP_VERSION_84 => $phpData['phpExtensions84'], + PhpOptions::PHP_VERSION_85 => $phpData['phpExtensions85'], default => throw new InvalidArgumentException(sprintf('Unsupported php version %s', $phpData['version'])), }; diff --git a/src/Form/Generator/PhpType.php b/src/Form/Generator/PhpType.php index dd8c6fe5..5499168a 100644 --- a/src/Form/Generator/PhpType.php +++ b/src/Form/Generator/PhpType.php @@ -23,6 +23,7 @@ use App\PHPDocker\PhpExtension\Php82AvailableExtensions; use App\PHPDocker\PhpExtension\Php83AvailableExtensions; use App\PHPDocker\PhpExtension\Php84AvailableExtensions; +use App\PHPDocker\PhpExtension\Php85AvailableExtensions; use App\PHPDocker\PhpExtension\PhpExtension; use App\PHPDocker\Project\ServiceOptions\Php; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -104,6 +105,13 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'label' => 'Extensions (PHP 8.4)', 'required' => false, 'constraints' => $phpOptionsConstraints, + ]) + ->add('phpExtensions85', ChoiceType::class, [ + 'choices' => $this->getExtensionChoices((new Php85AvailableExtensions())->getOptional()), + 'multiple' => true, + 'label' => 'Extensions (PHP 8.5)', + 'required' => false, + 'constraints' => $phpOptionsConstraints, ]); } diff --git a/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php b/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php index 4af867a1..5e2d8c2b 100644 --- a/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php +++ b/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php @@ -30,6 +30,7 @@ class AvailableExtensionsFactory private const string PHP_VERSION_82 = '8.2'; private const string PHP_VERSION_83 = '8.3'; private const string PHP_VERSION_84 = '8.4'; + private const string PHP_VERSION_85 = '8.5'; /** * Supported PHP versions @@ -39,6 +40,7 @@ class AvailableExtensionsFactory self::PHP_VERSION_82 => Php82AvailableExtensions::class, self::PHP_VERSION_83 => Php83AvailableExtensions::class, self::PHP_VERSION_84 => Php84AvailableExtensions::class, + self::PHP_VERSION_85 => Php85AvailableExtensions::class, ]; /** diff --git a/src/PHPDocker/PhpExtension/Php85AvailableExtensions.php b/src/PHPDocker/PhpExtension/Php85AvailableExtensions.php new file mode 100644 index 00000000..4955c576 --- /dev/null +++ b/src/PHPDocker/PhpExtension/Php85AvailableExtensions.php @@ -0,0 +1,122 @@ +> + */ + protected function getMandatoryExtensionsMap(): array + { + return [ + 'cURL' => ['packages' => ['php8.5-curl']], + 'MBSTRING' => ['packages' => ['php8.5-mbstring']], + 'OPCache' => ['packages' => ['php8.5-opcache']], + 'Readline' => ['packages' => ['php8.5-readline']], + 'XML' => ['packages' => ['php8.5-xml']], + 'Zip' => ['packages' => ['php8.5-zip']], + ]; + } + + /** + * @inheritDoc + * @return array> + */ + protected function getOptionalExtensionsMap(): array + { + return [ + // 'Decimal' => ['packages' => ['php8.5-decimal']], + // 'GRPC' => ['packages' => ['php8.5-grpc']], + // 'Inotify' => ['packages' => ['php8.5-inotify']], + // 'LZ4' => ['packages' => ['php8.5-lz4']], + // 'Protobuf' => ['packages' => ['php8.5-protobuf']], + // 'Pinba' => ['packages' => ['php8.5-pinba']], + // 'Samba Client' => ['packages' => ['php8.5-smbclient']], + // 'Solr' => ['packages' => ['php8.5-solr']], + // 'Swoole' => ['packages' => ['php8.5-swoole']], + // 'vips' => ['packages' => ['php8.5-vips']], + // 'Xhprof' => ['packages' => ['php8.5-xhprof']], + // 'zstd (Zstandard)' => ['packages' => ['php8.5-zstd']], + + 'AMQP' => ['packages' => ['php8.5-amqp']], + 'AST' => ['packages' => ['php8.5-ast']], + 'Bcmath' => ['packages' => ['php8.5-bcmath']], + 'bzip2' => ['packages' => ['php8.5-bz2']], + 'CGI' => ['packages' => ['php8.5-cgi']], + 'DBA' => ['packages' => ['php8.5-dba']], + 'DS (Data Structures)' => ['packages' => ['php8.5-ds']], + 'Enchant' => ['packages' => ['php8.5-enchant']], + 'Excimer' => ['packages' => ['php8.5-excimer']], + 'GD' => ['packages' => ['php8.5-gd']], + 'Gearman' => ['packages' => ['php8.5-gearman']], + 'Gmagick (GraphicsMagick)' => ['packages' => ['php8.5-gmagick']], + 'GMP' => ['packages' => ['php8.5-gmp']], + 'GNUPG' => ['packages' => ['php8.5-gnupg']], + 'HTTP' => ['packages' => ['php8.5-http']], + 'igbinary' => ['packages' => ['php8.5-igbinary']], + 'ImageMagick' => ['packages' => ['php8.5-imagick']], + 'IMAP' => ['packages' => ['php8.5-imap']], + 'Interbase' => ['packages' => ['php8.5-interbase']], + 'Intl (Internationalisation)' => ['packages' => ['php8.5-intl']], + 'LDAP' => ['packages' => ['php8.5-ldap']], + 'Libvirt' => ['packages' => ['php8.5-libvirt-php']], + 'Mailparse' => ['packages' => ['php8.5-mailparse']], + 'MaxMind DB' => ['packages' => ['php8.5-maxminddb']], + 'mcrypt' => ['packages' => ['php8.5-mcrypt']], + 'Memcache' => ['packages' => ['php8.5-memcache']], + 'Memcached' => ['packages' => ['php8.5-memcached']], + 'MongoDB' => ['packages' => ['php8.5-mongodb']], + 'MessagePack' => ['packages' => ['php8.5-msgpack']], + 'MySQL' => ['packages' => ['php8.5-mysql']], + 'OAuth' => ['packages' => ['php8.5-oauth']], + 'ODBC' => ['packages' => ['php8.5-odbc']], + 'OpenTelemetry' => ['packages' => ['php8.5-opentelemetry']], + 'Pcov' => ['packages' => ['php8.5-pcov']], + 'PostgreSQL' => ['packages' => ['php8.5-pgsql']], + 'PostgreSQL (libpq)' => ['packages' => ['php8.5-pq']], + 'Phalcon 5' => ['packages' => ['php8.5-phalcon']], + 'PHPDBG' => ['packages' => ['php8.5-phpdbg']], + 'ps' => ['packages' => ['php8.5-ps']], + 'pspell' => ['packages' => ['php8.5-pspell']], + 'PSR' => ['packages' => ['php8.5-psr']], + 'raphf' => ['packages' => ['php8.5-raphf']], + 'Redis' => ['packages' => ['php8.5-redis']], + 'rrd' => ['packages' => ['php8.5-rrd']], + 'SNMP' => ['packages' => ['php8.5-snmp']], + 'SOAP' => ['packages' => ['php8.5-soap']], + 'SQLite3' => ['packages' => ['php8.5-sqlite3']], + 'ssh2' => ['packages' => ['php8.5-ssh2']], + 'STOMP protocol' => ['packages' => ['php8.5-stomp']], + 'Sybase' => ['packages' => ['php8.5-sybase']], + 'Tidy' => ['packages' => ['php8.5-tidy']], + 'UOPZ' => ['packages' => ['php8.5-uopz']], + 'Upload progress' => ['packages' => ['php8.5-uploadprogress']], + 'UUID' => ['packages' => ['php8.5-uuid']], + 'Xdebug' => ['packages' => ['php8.5-xdebug']], + 'XMLRPC' => ['packages' => ['php8.5-xmlrpc']], + 'XSL' => ['packages' => ['php8.5-xsl']], + 'Yac' => ['packages' => ['php8.5-yac']], + 'YAML' => ['packages' => ['php8.5-yaml']], + 'ZMQ (ZeroMQ)' => ['packages' => ['php8.5-zmq']], + ]; + } +} diff --git a/src/PHPDocker/Project/ServiceOptions/Php.php b/src/PHPDocker/Project/ServiceOptions/Php.php index 5402f52d..43da1457 100644 --- a/src/PHPDocker/Project/ServiceOptions/Php.php +++ b/src/PHPDocker/Project/ServiceOptions/Php.php @@ -32,6 +32,7 @@ class Php extends Base public const string PHP_VERSION_82 = '8.2'; public const string PHP_VERSION_83 = '8.3'; public const string PHP_VERSION_84 = '8.4'; + public const string PHP_VERSION_85 = '8.5'; private string $version; @@ -42,6 +43,7 @@ class Php extends Base * Supported PHP versions */ private const array SUPPORTED_VERSIONS = [ + self::PHP_VERSION_85, self::PHP_VERSION_84, self::PHP_VERSION_83, self::PHP_VERSION_82, From 5d2737ed0777703a0bf972f02e624e3807b6d93a Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 15 Jan 2026 13:14:11 +0000 Subject: [PATCH 2/5] Add support to form javascript --- public/js/main-form.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/js/main-form.js b/public/js/main-form.js index 7f113516..54696755 100644 --- a/public/js/main-form.js +++ b/public/js/main-form.js @@ -102,7 +102,7 @@ function doMainFormMagic () { phpVersionSelector.on('change', function () { extensionMultiSelects.parents('.form-group').hide() - let chosenVersion = '84' + let chosenVersion = '85' switch ($(this).val()) { case '8.1': chosenVersion = '81' @@ -115,6 +115,10 @@ function doMainFormMagic () { case '8.3': chosenVersion = '83' break + + case '8.4': + chosenVersion = '84' + break } extensionMultiSelects.filter('[id$=' + chosenVersion + ']').parents('.form-group').show() From 23a3f6e0adcf354107b4727cac5ce3575a65838f Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 15 Jan 2026 13:21:40 +0000 Subject: [PATCH 3/5] Add missing php 85 selection form data --- templates/generator.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/generator.html.twig b/templates/generator.html.twig index 30902cd8..510f338d 100644 --- a/templates/generator.html.twig +++ b/templates/generator.html.twig @@ -58,6 +58,8 @@
+ {{ form_row(attribute(form.phpOptions, 'phpExtensions85')) }} + {{ form_row(attribute(form.phpOptions, 'phpExtensions84')) }} {{ form_row(attribute(form.phpOptions, 'phpExtensions83')) }} From 7861898e1be26a6b0b38f6e9d9c3f12d5f1b55c0 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 15 Jan 2026 13:31:56 +0000 Subject: [PATCH 4/5] Remove php 8.1 --- src/Controller/GeneratorController.php | 1 - src/Form/Generator/PhpType.php | 8 -- .../AvailableExtensionsFactory.php | 2 - .../PhpExtension/Php81AvailableExtensions.php | 111 ------------------ src/PHPDocker/Project/ServiceOptions/Php.php | 2 - templates/generator.html.twig | 2 - 6 files changed, 126 deletions(-) delete mode 100644 src/PHPDocker/PhpExtension/Php81AvailableExtensions.php diff --git a/src/Controller/GeneratorController.php b/src/Controller/GeneratorController.php index 6a252aab..33acd7e2 100644 --- a/src/Controller/GeneratorController.php +++ b/src/Controller/GeneratorController.php @@ -75,7 +75,6 @@ private function hydrateProject(array $formData): Project $phpData = $formData['phpOptions']; $extensions = match ($phpData['version']) { - PhpOptions::PHP_VERSION_81 => $phpData['phpExtensions81'], PhpOptions::PHP_VERSION_82 => $phpData['phpExtensions82'], PhpOptions::PHP_VERSION_83 => $phpData['phpExtensions83'], PhpOptions::PHP_VERSION_84 => $phpData['phpExtensions84'], diff --git a/src/Form/Generator/PhpType.php b/src/Form/Generator/PhpType.php index 5499168a..a966b072 100644 --- a/src/Form/Generator/PhpType.php +++ b/src/Form/Generator/PhpType.php @@ -19,7 +19,6 @@ namespace App\Form\Generator; -use App\PHPDocker\PhpExtension\Php81AvailableExtensions; use App\PHPDocker\PhpExtension\Php82AvailableExtensions; use App\PHPDocker\PhpExtension\Php83AvailableExtensions; use App\PHPDocker\PhpExtension\Php84AvailableExtensions; @@ -78,13 +77,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void new Choice(choices: Php::getSupportedVersions()), ], ]) - ->add('phpExtensions81', ChoiceType::class, [ - 'choices' => $this->getExtensionChoices((new Php81AvailableExtensions())->getOptional()), - 'multiple' => true, - 'label' => 'Extensions (PHP 8.1)', - 'required' => false, - 'constraints' => $phpOptionsConstraints, - ]) ->add('phpExtensions82', ChoiceType::class, [ 'choices' => $this->getExtensionChoices((new Php82AvailableExtensions())->getOptional()), 'multiple' => true, diff --git a/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php b/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php index 5e2d8c2b..def90c2a 100644 --- a/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php +++ b/src/PHPDocker/PhpExtension/AvailableExtensionsFactory.php @@ -26,7 +26,6 @@ */ class AvailableExtensionsFactory { - private const string PHP_VERSION_81 = '8.1'; private const string PHP_VERSION_82 = '8.2'; private const string PHP_VERSION_83 = '8.3'; private const string PHP_VERSION_84 = '8.4'; @@ -36,7 +35,6 @@ class AvailableExtensionsFactory * Supported PHP versions */ private const array SUPPORTED_VERSIONS = [ - self::PHP_VERSION_81 => Php81AvailableExtensions::class, self::PHP_VERSION_82 => Php82AvailableExtensions::class, self::PHP_VERSION_83 => Php83AvailableExtensions::class, self::PHP_VERSION_84 => Php84AvailableExtensions::class, diff --git a/src/PHPDocker/PhpExtension/Php81AvailableExtensions.php b/src/PHPDocker/PhpExtension/Php81AvailableExtensions.php deleted file mode 100644 index 97c90303..00000000 --- a/src/PHPDocker/PhpExtension/Php81AvailableExtensions.php +++ /dev/null @@ -1,111 +0,0 @@ -> - */ - protected function getMandatoryExtensionsMap(): array - { - return [ - 'cURL' => ['packages' => ['php8.1-curl']], - 'MBSTRING' => ['packages' => ['php8.1-mbstring']], - 'OPCache' => ['packages' => ['php8.1-opcache']], - 'Readline' => ['packages' => ['php8.1-readline']], - 'XML' => ['packages' => ['php8.1-xml']], - 'Zip' => ['packages' => ['php8.1-zip']], - ]; - } - - /** - * @inheritDoc - * @return array> - */ - protected function getOptionalExtensionsMap(): array - { - return [ - 'AMQP' => ['packages' => ['php8.1-amqp']], - 'AST' => ['packages' => ['php8.1-ast']], - 'Bcmath' => ['packages' => ['php8.1-bcmath']], - 'bzip2' => ['packages' => ['php8.1-bz2']], - 'CGI' => ['packages' => ['php8.1-cgi']], - 'DBA' => ['packages' => ['php8.1-dba']], - 'Decimal' => ['packages' => ['php8.1-decimal']], - 'DS (Data Structures)' => ['packages' => ['php8.1-ds']], - 'Enchant' => ['packages' => ['php8.1-enchant']], - 'GD' => ['packages' => ['php8.1-gd']], - 'Gearman' => ['packages' => ['php8.1-gearman']], - 'Gmagick (GraphicsMagick)' => ['packages' => ['php8.1-gmagick']], - 'GMP' => ['packages' => ['php8.1-gmp']], - 'GNUPG' => ['packages' => ['php8.1-gnupg']], - 'GRPC' => ['packages' => ['php8.1-grpc']], - 'HTTP' => ['packages' => ['php8.1-http']], - 'igbinary' => ['packages' => ['php8.1-igbinary']], - 'ImageMagick' => ['packages' => ['php8.1-imagick']], - 'IMAP' => ['packages' => ['php8.1-imap']], - 'Inotify' => ['packages' => ['php8.1-inotify']], - 'Interbase' => ['packages' => ['php8.1-interbase']], - 'Intl (Internationalisation)' => ['packages' => ['php8.1-intl']], - 'LDAP' => ['packages' => ['php8.1-ldap']], - 'LZ4' => ['packages' => ['php8.1-lz4']], - 'Mailparse' => ['packages' => ['php8.1-mailparse']], - 'MaxMind DB' => ['packages' => ['php8.1-maxminddb']], - 'mcrypt' => ['packages' => ['php8.1-mcrypt']], - 'Memcache' => ['packages' => ['php8.1-memcache']], - 'Memcached' => ['packages' => ['php8.1-memcached']], - 'MongoDB' => ['packages' => ['php8.1-mongodb']], - 'MessagePack' => ['packages' => ['php8.1-msgpack']], - 'MySQL' => ['packages' => ['php8.1-mysql']], - 'OAuth' => ['packages' => ['php8.1-oauth']], - 'ODBC' => ['packages' => ['php8.1-odbc']], - 'Pcov' => ['packages' => ['php8.1-pcov']], - 'PostgreSQL' => ['packages' => ['php8.1-pgsql']], - 'PHPDBG' => ['packages' => ['php8.1-phpdbg']], - 'Protobuf' => ['packages' => ['php8.1-protobuf']], - 'pspell' => ['packages' => ['php8.1-pspell']], - 'PSR' => ['packages' => ['php8.1-psr']], - 'raphf' => ['packages' => ['php8.1-raphf']], - 'Redis' => ['packages' => ['php8.1-redis']], - 'rrd' => ['packages' => ['php8.1-rrd']], - 'Samba Client' => ['packages' => ['php8.1-smbclient']], - 'SNMP' => ['packages' => ['php8.1-snmp']], - 'SOAP' => ['packages' => ['php8.1-soap']], - 'Solr' => ['packages' => ['php8.1-solr']], - 'SQLite3' => ['packages' => ['php8.1-sqlite3']], - 'ssh2' => ['packages' => ['php8.1-ssh2']], - 'Swoole' => ['packages' => ['php8.1-swoole']], - 'Sybase' => ['packages' => ['php8.1-sybase']], - 'Tidy' => ['packages' => ['php8.1-tidy']], - 'UUID' => ['packages' => ['php8.1-uuid']], - 'vips' => ['packages' => ['php8.1-vips']], - 'Xdebug' => ['packages' => ['php8.1-xdebug']], - 'Xhprof' => ['packages' => ['php8.1-xhprof']], - 'XMLRPC' => ['packages' => ['php8.1-xmlrpc']], - 'XSL' => ['packages' => ['php8.1-xsl']], - 'Yac' => ['packages' => ['php8.1-yac']], - 'YAML' => ['packages' => ['php8.1-yaml']], - 'ZMQ (ZeroMQ)' => ['packages' => ['php8.1-zmq']], - 'zstd (Zstandard)' => ['packages' => ['php8.1-zstd']], - ]; - } -} diff --git a/src/PHPDocker/Project/ServiceOptions/Php.php b/src/PHPDocker/Project/ServiceOptions/Php.php index 43da1457..65c89a2c 100644 --- a/src/PHPDocker/Project/ServiceOptions/Php.php +++ b/src/PHPDocker/Project/ServiceOptions/Php.php @@ -28,7 +28,6 @@ */ class Php extends Base { - public const string PHP_VERSION_81 = '8.1'; public const string PHP_VERSION_82 = '8.2'; public const string PHP_VERSION_83 = '8.3'; public const string PHP_VERSION_84 = '8.4'; @@ -47,7 +46,6 @@ class Php extends Base self::PHP_VERSION_84, self::PHP_VERSION_83, self::PHP_VERSION_82, - self::PHP_VERSION_81, ]; /** diff --git a/templates/generator.html.twig b/templates/generator.html.twig index 510f338d..8fdae4ff 100644 --- a/templates/generator.html.twig +++ b/templates/generator.html.twig @@ -65,8 +65,6 @@ {{ form_row(attribute(form.phpOptions, 'phpExtensions83')) }} {{ form_row(attribute(form.phpOptions, 'phpExtensions82')) }} - - {{ form_row(attribute(form.phpOptions, 'phpExtensions81')) }}
From ac2034fbf5802497a02792ac0b0e86ad3a1f6e83 Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Thu, 15 Jan 2026 13:39:32 +0000 Subject: [PATCH 5/5] Remove config/reference.php --- config/reference.php | 1090 ------------------------------------------ 1 file changed, 1090 deletions(-) delete mode 100644 config/reference.php diff --git a/config/reference.php b/config/reference.php deleted file mode 100644 index ea3c6a65..00000000 --- a/config/reference.php +++ /dev/null @@ -1,1090 +0,0 @@ - [ - * 'App\\' => [ - * 'resource' => '../src/', - * ], - * ], - * ]); - * ``` - * - * @psalm-type ImportsConfig = list - * @psalm-type ParametersConfig = array|null>|null> - * @psalm-type ArgumentsType = list|array - * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} - * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key - * @psalm-type CallbackType = string|array{0:string|ReferenceConfigurator,1:string}|\Closure|ReferenceConfigurator|ExpressionConfigurator - * @psalm-type DeprecationType = array{package: string, version: string, message?: string} - * @psalm-type DefaultsType = array{ - * public?: bool, - * tags?: TagsType, - * resource_tags?: TagsType, - * autowire?: bool, - * autoconfigure?: bool, - * bind?: array, - * } - * @psalm-type InstanceofType = array{ - * shared?: bool, - * lazy?: bool|string, - * public?: bool, - * properties?: array, - * configurator?: CallbackType, - * calls?: list, - * tags?: TagsType, - * resource_tags?: TagsType, - * autowire?: bool, - * bind?: array, - * constructor?: string, - * } - * @psalm-type DefinitionType = array{ - * class?: string, - * file?: string, - * parent?: string, - * shared?: bool, - * synthetic?: bool, - * lazy?: bool|string, - * public?: bool, - * abstract?: bool, - * deprecated?: DeprecationType, - * factory?: CallbackType, - * configurator?: CallbackType, - * arguments?: ArgumentsType, - * properties?: array, - * calls?: list, - * tags?: TagsType, - * resource_tags?: TagsType, - * decorates?: string, - * decoration_inner_name?: string, - * decoration_priority?: int, - * decoration_on_invalid?: 'exception'|'ignore'|null, - * autowire?: bool, - * autoconfigure?: bool, - * bind?: array, - * constructor?: string, - * from_callable?: CallbackType, - * } - * @psalm-type AliasType = string|array{ - * alias: string, - * public?: bool, - * deprecated?: DeprecationType, - * } - * @psalm-type PrototypeType = array{ - * resource: string, - * namespace?: string, - * exclude?: string|list, - * parent?: string, - * shared?: bool, - * lazy?: bool|string, - * public?: bool, - * abstract?: bool, - * deprecated?: DeprecationType, - * factory?: CallbackType, - * arguments?: ArgumentsType, - * properties?: array, - * configurator?: CallbackType, - * calls?: list, - * tags?: TagsType, - * resource_tags?: TagsType, - * autowire?: bool, - * autoconfigure?: bool, - * bind?: array, - * constructor?: string, - * } - * @psalm-type StackType = array{ - * stack: list>, - * public?: bool, - * deprecated?: DeprecationType, - * } - * @psalm-type ServicesConfig = array{ - * _defaults?: DefaultsType, - * _instanceof?: InstanceofType, - * ... - * } - * @psalm-type ExtensionType = array - * @psalm-type FrameworkConfig = array{ - * secret?: scalar|null|Param, - * 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|null|Param, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" - * ide?: scalar|null|Param, // Default: "%env(default::SYMFONY_IDE)%" - * test?: bool|Param, - * default_locale?: scalar|null|Param, // 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|null|Param, // Default: "error_controller" - * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true - * csrf_protection?: bool|array{ - * enabled?: scalar|null|Param, // Default: null - * stateless_token_ids?: list, - * check_header?: scalar|null|Param, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false - * cookie_name?: scalar|null|Param, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" - * }, - * form?: bool|array{ // Form configuration - * enabled?: bool|Param, // Default: true - * csrf_protection?: array{ - * enabled?: scalar|null|Param, // Default: null - * token_id?: scalar|null|Param, // Default: null - * field_name?: scalar|null|Param, // 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|null|Param, - * 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|null|Param, // Default: null - * path?: scalar|null|Param, // Default: "/_fragment" - * }, - * profiler?: bool|array{ // Profiler configuration - * enabled?: bool|Param, // Default: false - * collect?: bool|Param, // Default: true - * collect_parameter?: scalar|null|Param, // 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|null|Param, // 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|null|Param, - * 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|null|Param, - * type?: scalar|null|Param, - * cache_dir?: scalar|null|Param, // 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|null|Param, // The default URI used to generate URLs in a non-HTTP context. // Default: null - * http_port?: scalar|null|Param, // Default: 80 - * https_port?: scalar|null|Param, // Default: 443 - * strict_requirements?: scalar|null|Param, // 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|null|Param, // Default: "session.storage.factory.native" - * handler_id?: scalar|null|Param, // Defaults to using the native session handler, or to the native *file* session handler if "save_path" is not null. - * name?: scalar|null|Param, - * cookie_lifetime?: scalar|null|Param, - * cookie_path?: scalar|null|Param, - * cookie_domain?: scalar|null|Param, - * 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|null|Param, - * gc_probability?: scalar|null|Param, - * gc_maxlifetime?: scalar|null|Param, - * save_path?: scalar|null|Param, // 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|null|Param, // Default: null - * version?: scalar|null|Param, // Default: null - * version_format?: scalar|null|Param, // Default: "%%s?%%s" - * json_manifest_path?: scalar|null|Param, // Default: null - * base_path?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" - * importmap_polyfill?: scalar|null|Param, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" - * importmap_script_attributes?: array, - * vendor_dir?: scalar|null|Param, // 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|null|Param, // Default: "translator.formatter.default" - * cache_dir?: scalar|null|Param, // Default: "%kernel.cache_dir%/translations" - * default_path?: scalar|null|Param, // 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: true - * cache?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // 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|null|Param, - * circular_reference_handler?: scalar|null|Param, - * max_depth_handler?: scalar|null|Param, - * 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: true - * 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: true - * aliases?: array, - * }, - * property_info?: bool|array{ // Property info configuration - * enabled?: bool|Param, // Default: true - * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. - * }, - * cache?: array{ // Cache configuration - * prefix_seed?: scalar|null|Param, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" - * app?: scalar|null|Param, // App related cache pools configuration. // Default: "cache.adapter.filesystem" - * system?: scalar|null|Param, // System related cache pools configuration. // Default: "cache.adapter.system" - * directory?: scalar|null|Param, // Default: "%kernel.share_dir%/pools/app" - * default_psr6_provider?: scalar|null|Param, - * default_redis_provider?: scalar|null|Param, // Default: "redis://localhost" - * default_valkey_provider?: scalar|null|Param, // Default: "valkey://localhost" - * default_memcached_provider?: scalar|null|Param, // Default: "memcached://localhost" - * default_doctrine_dbal_provider?: scalar|null|Param, // Default: "database_connection" - * default_pdo_provider?: scalar|null|Param, // Default: null - * pools?: array, - * tags?: scalar|null|Param, // Default: null - * public?: bool|Param, // Default: false - * default_lifetime?: scalar|null|Param, // Default lifetime of the pool. - * provider?: scalar|null|Param, // Overwrite the setting from the default provider for this adapter. - * early_expiration_message_bus?: scalar|null|Param, - * clearer?: scalar|null|Param, - * }>, - * }, - * 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|null|Param, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" - * symfony_serializer?: array{ - * format?: scalar|null|Param, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" - * context?: array, - * }, - * }, - * transports?: array, - * failure_transport?: scalar|null|Param, // Transport name to send failed messages to (after all retries have failed). // Default: null - * retry_strategy?: string|array{ - * service?: scalar|null|Param, // 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|null|Param, // Rate limiter name to use when processing messages. // Default: null - * }>, - * failure_transport?: scalar|null|Param, // Transport name to send failed messages to (after all retries have failed). // Default: null - * stop_worker_on_signals?: list, - * default_bus?: scalar|null|Param, // 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|null|Param, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|null|Param, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // A certificate authority file. - * capath?: scalar|null|Param, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|null|Param, // A PEM formatted certificate file. - * local_pk?: scalar|null|Param, // A private key file. - * passphrase?: scalar|null|Param, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|null|Param, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) - * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). - * sha1?: mixed, - * pin-sha256?: mixed, - * md5?: mixed, - * }, - * crypto_method?: scalar|null|Param, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // 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|null|Param, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. - * resolve?: array, - * proxy?: scalar|null|Param, // The URL of the proxy to pass requests through or null for automatic detection. - * no_proxy?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // A certificate authority file. - * capath?: scalar|null|Param, // A directory that contains multiple certificate authority files. - * local_cert?: scalar|null|Param, // A PEM formatted certificate file. - * local_pk?: scalar|null|Param, // A private key file. - * passphrase?: scalar|null|Param, // The passphrase used to encrypt the "local_pk" file. - * ciphers?: scalar|null|Param, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). - * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). - * sha1?: mixed, - * pin-sha256?: mixed, - * md5?: mixed, - * }, - * crypto_method?: scalar|null|Param, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. - * extra?: array, - * rate_limiter?: scalar|null|Param, // 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|null|Param, // 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|null|Param, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null - * dsn?: scalar|null|Param, // Default: null - * transports?: array, - * envelope?: array{ // Mailer Envelope configuration - * sender?: scalar|null|Param, - * recipients?: list, - * allowed_recipients?: list, - * }, - * headers?: array, - * dkim_signer?: bool|array{ // DKIM signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|null|Param, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" - * domain?: scalar|null|Param, // Default: "" - * select?: scalar|null|Param, // Default: "" - * passphrase?: scalar|null|Param, // The private key passphrase // Default: "" - * options?: array, - * }, - * smime_signer?: bool|array{ // S/MIME signer configuration - * enabled?: bool|Param, // Default: false - * key?: scalar|null|Param, // Path to key (in PEM format) // Default: "" - * certificate?: scalar|null|Param, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" - * passphrase?: scalar|null|Param, // The private key passphrase // Default: null - * extra_certificates?: scalar|null|Param, // Default: null - * sign_options?: int|Param, // Default: null - * }, - * smime_encrypter?: bool|array{ // S/MIME encrypter configuration - * enabled?: bool|Param, // Default: false - * repository?: scalar|null|Param, // 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|null|Param, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" - * local_dotenv_file?: scalar|null|Param, // Default: "%kernel.project_dir%/.env.%kernel.runtime_environment%.local" - * decryption_env_var?: scalar|null|Param, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" - * }, - * notifier?: bool|array{ // Notifier configuration - * enabled?: bool|Param, // Default: false - * message_bus?: scalar|null|Param, // 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|null|Param, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). - * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". - * interval?: scalar|null|Param, // 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|null|Param, - * time_based_uuid_version?: 7|6|1|Param, // Default: 7 - * time_based_uuid_node?: scalar|null|Param, - * }, - * 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|null|Param, // 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 TwigConfig = array{ - * form_themes?: list, - * globals?: array, - * autoescape_service?: scalar|null|Param, // Default: null - * autoescape_service_method?: scalar|null|Param, // Default: null - * base_template_class?: scalar|null|Param, // Deprecated: The child node "base_template_class" at path "twig.base_template_class" is deprecated. - * cache?: scalar|null|Param, // Default: true - * charset?: scalar|null|Param, // Default: "%kernel.charset%" - * debug?: bool|Param, // Default: "%kernel.debug%" - * strict_variables?: bool|Param, // Default: "%kernel.debug%" - * auto_reload?: scalar|null|Param, - * optimizations?: int|Param, - * default_path?: scalar|null|Param, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" - * file_name_pattern?: list, - * paths?: array, - * date?: array{ // The default format options used by the date filter. - * format?: scalar|null|Param, // Default: "F j, Y H:i" - * interval_format?: scalar|null|Param, // Default: "%d days" - * timezone?: scalar|null|Param, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null - * }, - * number_format?: array{ // The default format options for the number_format filter. - * decimals?: int|Param, // Default: 0 - * decimal_point?: scalar|null|Param, // Default: "." - * thousands_separator?: scalar|null|Param, // Default: "," - * }, - * mailer?: array{ - * html_to_text_converter?: scalar|null|Param, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null - * }, - * } - * @psalm-type TwigExtraConfig = array{ - * cache?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * html?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * markdown?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * intl?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * cssinliner?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * inky?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * string?: bool|array{ - * enabled?: bool|Param, // Default: false - * }, - * commonmark?: array{ - * renderer?: array{ // Array of options for rendering HTML. - * block_separator?: scalar|null|Param, - * inner_separator?: scalar|null|Param, - * soft_break?: scalar|null|Param, - * }, - * html_input?: "strip"|"allow"|"escape"|Param, // How to handle HTML input. - * allow_unsafe_links?: bool|Param, // Remove risky link and image URLs by setting this to false. // Default: true - * max_nesting_level?: int|Param, // The maximum nesting level for blocks. // Default: 9223372036854775807 - * max_delimiters_per_line?: int|Param, // The maximum number of strong/emphasis delimiters per line. // Default: 9223372036854775807 - * slug_normalizer?: array{ // Array of options for configuring how URL-safe slugs are created. - * instance?: mixed, - * max_length?: int|Param, // Default: 255 - * unique?: mixed, - * }, - * commonmark?: array{ // Array of options for configuring the CommonMark core extension. - * enable_em?: bool|Param, // Default: true - * enable_strong?: bool|Param, // Default: true - * use_asterisk?: bool|Param, // Default: true - * use_underscore?: bool|Param, // Default: true - * unordered_list_markers?: list, - * }, - * ... - * }, - * } - * @psalm-type WebProfilerConfig = array{ - * toolbar?: bool|array{ // Profiler toolbar configuration - * enabled?: bool|Param, // Default: false - * ajax_replace?: bool|Param, // Replace toolbar on AJAX requests // Default: false - * }, - * intercept_redirects?: bool|Param, // Default: false - * excluded_ajax_paths?: scalar|null|Param, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt" - * } - * @psalm-type MonologConfig = array{ - * use_microseconds?: scalar|null|Param, // Default: true - * channels?: list, - * handlers?: array, - * excluded_http_codes?: list, - * }>, - * accepted_levels?: list, - * min_level?: scalar|null|Param, // Default: "DEBUG" - * max_level?: scalar|null|Param, // Default: "EMERGENCY" - * buffer_size?: scalar|null|Param, // Default: 0 - * flush_on_overflow?: bool|Param, // Default: false - * handler?: scalar|null|Param, - * url?: scalar|null|Param, - * exchange?: scalar|null|Param, - * exchange_name?: scalar|null|Param, // Default: "log" - * room?: scalar|null|Param, - * message_format?: scalar|null|Param, // Default: "text" - * api_version?: scalar|null|Param, // Default: null - * channel?: scalar|null|Param, // Default: null - * bot_name?: scalar|null|Param, // Default: "Monolog" - * use_attachment?: scalar|null|Param, // Default: true - * use_short_attachment?: scalar|null|Param, // Default: false - * include_extra?: scalar|null|Param, // Default: false - * icon_emoji?: scalar|null|Param, // Default: null - * webhook_url?: scalar|null|Param, - * exclude_fields?: list, - * team?: scalar|null|Param, - * notify?: scalar|null|Param, // Default: false - * nickname?: scalar|null|Param, // Default: "Monolog" - * token?: scalar|null|Param, - * region?: scalar|null|Param, - * source?: scalar|null|Param, - * use_ssl?: bool|Param, // Default: true - * user?: mixed, - * title?: scalar|null|Param, // Default: null - * host?: scalar|null|Param, // Default: null - * port?: scalar|null|Param, // Default: 514 - * config?: list, - * members?: list, - * connection_string?: scalar|null|Param, - * timeout?: scalar|null|Param, - * time?: scalar|null|Param, // Default: 60 - * deduplication_level?: scalar|null|Param, // Default: 400 - * store?: scalar|null|Param, // Default: null - * connection_timeout?: scalar|null|Param, - * persistent?: bool|Param, - * dsn?: scalar|null|Param, - * hub_id?: scalar|null|Param, // Default: null - * client_id?: scalar|null|Param, // Default: null - * auto_log_stacks?: scalar|null|Param, // Default: false - * release?: scalar|null|Param, // Default: null - * environment?: scalar|null|Param, // Default: null - * message_type?: scalar|null|Param, // Default: 0 - * parse_mode?: scalar|null|Param, // Default: null - * disable_webpage_preview?: bool|null|Param, // Default: null - * disable_notification?: bool|null|Param, // Default: null - * split_long_messages?: bool|Param, // Default: false - * delay_between_messages?: bool|Param, // Default: false - * topic?: int|Param, // Default: null - * factor?: int|Param, // Default: 1 - * tags?: list, - * console_formater_options?: mixed, // Deprecated: "monolog.handlers..console_formater_options.console_formater_options" is deprecated, use "monolog.handlers..console_formater_options.console_formatter_options" instead. - * console_formatter_options?: mixed, // Default: [] - * formatter?: scalar|null|Param, - * nested?: bool|Param, // Default: false - * publisher?: string|array{ - * id?: scalar|null|Param, - * hostname?: scalar|null|Param, - * port?: scalar|null|Param, // Default: 12201 - * chunk_size?: scalar|null|Param, // Default: 1420 - * encoder?: "json"|"compressed_json"|Param, - * }, - * mongo?: string|array{ - * id?: scalar|null|Param, - * host?: scalar|null|Param, - * port?: scalar|null|Param, // Default: 27017 - * user?: scalar|null|Param, - * pass?: scalar|null|Param, - * database?: scalar|null|Param, // Default: "monolog" - * collection?: scalar|null|Param, // Default: "logs" - * }, - * mongodb?: string|array{ - * id?: scalar|null|Param, // ID of a MongoDB\Client service - * uri?: scalar|null|Param, - * username?: scalar|null|Param, - * password?: scalar|null|Param, - * database?: scalar|null|Param, // Default: "monolog" - * collection?: scalar|null|Param, // Default: "logs" - * }, - * elasticsearch?: string|array{ - * id?: scalar|null|Param, - * hosts?: list, - * host?: scalar|null|Param, - * port?: scalar|null|Param, // Default: 9200 - * transport?: scalar|null|Param, // Default: "Http" - * user?: scalar|null|Param, // Default: null - * password?: scalar|null|Param, // Default: null - * }, - * index?: scalar|null|Param, // Default: "monolog" - * document_type?: scalar|null|Param, // Default: "logs" - * ignore_error?: scalar|null|Param, // Default: false - * redis?: string|array{ - * id?: scalar|null|Param, - * host?: scalar|null|Param, - * password?: scalar|null|Param, // Default: null - * port?: scalar|null|Param, // Default: 6379 - * database?: scalar|null|Param, // Default: 0 - * key_name?: scalar|null|Param, // Default: "monolog_redis" - * }, - * predis?: string|array{ - * id?: scalar|null|Param, - * host?: scalar|null|Param, - * }, - * from_email?: scalar|null|Param, - * to_email?: list, - * subject?: scalar|null|Param, - * content_type?: scalar|null|Param, // Default: null - * headers?: list, - * mailer?: scalar|null|Param, // Default: null - * email_prototype?: string|array{ - * id: scalar|null|Param, - * method?: scalar|null|Param, // Default: null - * }, - * lazy?: bool|Param, // Default: true - * verbosity_levels?: array{ - * VERBOSITY_QUIET?: scalar|null|Param, // Default: "ERROR" - * VERBOSITY_NORMAL?: scalar|null|Param, // Default: "WARNING" - * VERBOSITY_VERBOSE?: scalar|null|Param, // Default: "NOTICE" - * VERBOSITY_VERY_VERBOSE?: scalar|null|Param, // Default: "INFO" - * VERBOSITY_DEBUG?: scalar|null|Param, // Default: "DEBUG" - * }, - * channels?: string|array{ - * type?: scalar|null|Param, - * elements?: list, - * }, - * }>, - * } - * @psalm-type DebugConfig = array{ - * max_items?: int|Param, // Max number of displayed items past the first level, -1 means no limit. // Default: 2500 - * min_depth?: int|Param, // Minimum tree depth to clone all the items, 1 is default. // Default: 1 - * max_string_length?: int|Param, // Max length of displayed strings, -1 means no limit. // Default: -1 - * dump_destination?: scalar|null|Param, // A stream URL where dumps should be written to. // Default: null - * theme?: "dark"|"light"|Param, // Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light". // Default: "dark" - * } - * @psalm-type ConfigType = array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_extra?: TwigExtraConfig, - * monolog?: MonologConfig, - * "when@dev"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_extra?: TwigExtraConfig, - * web_profiler?: WebProfilerConfig, - * monolog?: MonologConfig, - * debug?: DebugConfig, - * }, - * "when@prod"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_extra?: TwigExtraConfig, - * monolog?: MonologConfig, - * }, - * "when@test"?: array{ - * imports?: ImportsConfig, - * parameters?: ParametersConfig, - * services?: ServicesConfig, - * framework?: FrameworkConfig, - * twig?: TwigConfig, - * twig_extra?: TwigExtraConfig, - * web_profiler?: WebProfilerConfig, - * monolog?: MonologConfig, - * }, - * ..., - * }> - * } - */ -final class App -{ - /** - * @param ConfigType $config - * - * @psalm-return ConfigType - */ - public static function config(array $config): array - { - return AppReference::config($config); - } -} - -namespace Symfony\Component\Routing\Loader\Configurator; - -/** - * This class provides array-shapes for configuring the routes of an application. - * - * Example: - * - * ```php - * // config/routes.php - * namespace Symfony\Component\Routing\Loader\Configurator; - * - * return Routes::config([ - * 'controllers' => [ - * 'resource' => 'routing.controllers', - * ], - * ]); - * ``` - * - * @psalm-type RouteConfig = array{ - * path: string|array, - * controller?: string, - * methods?: string|list, - * requirements?: array, - * defaults?: array, - * options?: array, - * host?: string|array, - * schemes?: string|list, - * condition?: string, - * locale?: string, - * format?: string, - * utf8?: bool, - * stateless?: bool, - * } - * @psalm-type ImportConfig = array{ - * resource: string, - * type?: string, - * exclude?: string|list, - * prefix?: string|array, - * name_prefix?: string, - * trailing_slash_on_root?: bool, - * controller?: string, - * methods?: string|list, - * requirements?: array, - * defaults?: array, - * options?: array, - * host?: string|array, - * schemes?: string|list, - * condition?: string, - * locale?: string, - * format?: string, - * utf8?: bool, - * stateless?: bool, - * } - * @psalm-type AliasConfig = array{ - * alias: string, - * deprecated?: array{package:string, version:string, message?:string}, - * } - * @psalm-type RoutesConfig = array{ - * "when@dev"?: array, - * "when@prod"?: array, - * "when@test"?: array, - * ... - * } - */ -final class Routes -{ - /** - * @param RoutesConfig $config - * - * @psalm-return RoutesConfig - */ - public static function config(array $config): array - { - return $config; - } -}