From 31140cf635c0b00e62337e6b565c0d0adf9288f4 Mon Sep 17 00:00:00 2001 From: stlgaits Date: Mon, 2 Feb 2026 17:30:27 +0100 Subject: [PATCH] fix(grid): add default EnumFilter Twig template --- app/Entity/Book.php | 14 + app/Enum/BookCategory.php | 42 + app/Factory/BookFactory.php | 7 + app/Grid/BookGrid.php | 13 +- config/reference.php | 1254 +++++++++-------- .../config/app/grid/templates.php | 1 + .../shared/grid/filter/enum.html.twig | 3 + .../book/show/content/page_body.html.twig | 10 +- tests/Functional/BookTest.php | 5 + translations/messages.de.yaml | 1 + translations/messages.de_AT.yaml | 1 + translations/messages.de_CH.yaml | 1 + translations/messages.en.yaml | 1 + translations/messages.fr.yaml | 1 + 14 files changed, 726 insertions(+), 628 deletions(-) create mode 100644 app/Enum/BookCategory.php create mode 100644 src/BootstrapAdminUi/templates/shared/grid/filter/enum.html.twig diff --git a/app/Entity/Book.php b/app/Entity/Book.php index 30b6781f8..c3ba31115 100644 --- a/app/Entity/Book.php +++ b/app/Entity/Book.php @@ -13,6 +13,7 @@ namespace App\Entity; +use App\Enum\BookCategory; use App\Grid\BookGrid; use App\Repository\BookRepository; use App\Responder\ExportGridToCsvResponder; @@ -79,6 +80,9 @@ class Book implements ResourceInterface #[NotBlank] private ?string $authorName = null; + #[ORM\Column(type: 'enum', length: 255, nullable: true)] + private ?BookCategory $category = null; + #[ORM\Column(type: 'datetime_immutable')] private \DateTimeImmutable $createdAt; @@ -121,4 +125,14 @@ public function setCreatedAt(\DateTimeImmutable $createdAt): void { $this->createdAt = $createdAt; } + + public function getCategory(): ?BookCategory + { + return $this->category; + } + + public function setCategory(?BookCategory $category): void + { + $this->category = $category; + } } diff --git a/app/Enum/BookCategory.php b/app/Enum/BookCategory.php new file mode 100644 index 000000000..4609039d6 --- /dev/null +++ b/app/Enum/BookCategory.php @@ -0,0 +1,42 @@ +with(['authorName' => $authorName]); } + public function withCategory(string $category): self + { + return $this->with(['category' => $category]); + } + protected function defaults(): array|callable { return [ 'title' => ucfirst(self::faker()->words(3, true)), 'authorName' => self::faker()->firstName() . ' ' . self::faker()->lastName(), + 'category' => self::faker()->randomElement(BookCategory::cases()), ]; } } diff --git a/app/Grid/BookGrid.php b/app/Grid/BookGrid.php index 1efada35e..29192609a 100644 --- a/app/Grid/BookGrid.php +++ b/app/Grid/BookGrid.php @@ -14,6 +14,7 @@ namespace App\Grid; use App\Entity\Book; +use App\Enum\BookCategory; use Sylius\Bundle\GridBundle\Builder\Action\Action; use Sylius\Bundle\GridBundle\Builder\Action\CreateAction; use Sylius\Bundle\GridBundle\Builder\Action\DeleteAction; @@ -22,7 +23,9 @@ use Sylius\Bundle\GridBundle\Builder\ActionGroup\BulkActionGroup; use Sylius\Bundle\GridBundle\Builder\ActionGroup\ItemActionGroup; use Sylius\Bundle\GridBundle\Builder\ActionGroup\MainActionGroup; +use Sylius\Bundle\GridBundle\Builder\Field\EnumField; use Sylius\Bundle\GridBundle\Builder\Field\StringField; +use Sylius\Bundle\GridBundle\Builder\Filter\EnumFilter; use Sylius\Bundle\GridBundle\Builder\Filter\StringFilter; use Sylius\Bundle\GridBundle\Builder\GridBuilderInterface; use Sylius\Bundle\GridBundle\Grid\AbstractGrid; @@ -39,9 +42,12 @@ public function buildGrid(GridBuilderInterface $gridBuilder): void { $gridBuilder ->orderBy('title') - ->addFilter( + ->withFilters( StringFilter::create('search', ['title', 'authorName']) ->setLabel('sylius.ui.search'), + EnumFilter::create(name: 'category', enumClass: BookCategory::class, field: 'category') + ->addFormOption('choice_label', fn (BookCategory $choice) => $choice->value) + ->setLabel('app.ui.category'), ) ->addField( StringField::create('title') @@ -53,6 +59,11 @@ public function buildGrid(GridBuilderInterface $gridBuilder): void ->setLabel('app.ui.author_name') ->setSortable(true), ) + ->addField( + EnumField::create('category') + ->setLabel('app.ui.category') + ->setSortable(true), + ) ->addActionGroup( MainActionGroup::create( CreateAction::create(), diff --git a/config/reference.php b/config/reference.php index 0d1559a7a..566e6e863 100644 --- a/config/reference.php +++ b/config/reference.php @@ -33,7 +33,7 @@ * type?: string|null, * ignore_errors?: bool, * }> - * @psalm-type ParametersConfig = array|null>|null> + * @psalm-type ParametersConfig = array|Param|null>|Param|null> * @psalm-type ArgumentsType = list|array * @psalm-type CallType = array|array{0:string, 1?:ArgumentsType, 2?:bool}|array{method:string, arguments?:ArgumentsType, returns_clone?:bool} * @psalm-type TagsType = list>> // arrays inside the list must have only one element, with the tag name as the key @@ -126,44 +126,44 @@ * } * @psalm-type ExtensionType = array * @psalm-type FrameworkConfig = array{ - * secret?: scalar|null|Param, + * secret?: scalar|Param|null, * http_method_override?: bool|Param, // Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. // Default: false * allowed_http_method_override?: list|null, - * trust_x_sendfile_type_header?: scalar|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)%" + * trust_x_sendfile_type_header?: scalar|Param|null, // Set true to enable support for xsendfile in binary file responses. // Default: "%env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)%" + * ide?: scalar|Param|null, // Default: "%env(default::SYMFONY_IDE)%" * test?: bool|Param, - * default_locale?: scalar|null|Param, // Default: "en" + * default_locale?: scalar|Param|null, // Default: "en" * set_locale_from_accept_language?: bool|Param, // Whether to use the Accept-Language HTTP header to set the Request locale (only when the "_locale" request attribute is not passed). // Default: false * set_content_language_from_locale?: bool|Param, // Whether to set the Content-Language HTTP header on the Response using the Request locale. // Default: false - * enabled_locales?: list, - * trusted_hosts?: list, + * 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" + * trusted_headers?: list, + * error_controller?: scalar|Param|null, // Default: "error_controller" * handle_all_throwables?: bool|Param, // HttpKernel will handle all kinds of \Throwable. // Default: true * csrf_protection?: bool|array{ - * enabled?: scalar|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" + * enabled?: scalar|Param|null, // Default: null + * stateless_token_ids?: list, + * check_header?: scalar|Param|null, // Whether to check the CSRF token in a header in addition to a cookie when using stateless protection. // Default: false + * cookie_name?: scalar|Param|null, // The name of the cookie to use when using stateless protection. // Default: "csrf-token" * }, * form?: bool|array{ // Form configuration * enabled?: bool|Param, // Default: 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, + * csrf_protection?: bool|array{ + * enabled?: scalar|Param|null, // Default: null + * token_id?: scalar|Param|null, // Default: null + * field_name?: scalar|Param|null, // Default: "_token" + * field_attr?: array, * }, * }, * http_cache?: bool|array{ // HTTP cache configuration * enabled?: bool|Param, // Default: false * debug?: bool|Param, // Default: "%kernel.debug%" * trace_level?: "none"|"short"|"full"|Param, - * trace_header?: scalar|null|Param, + * trace_header?: scalar|Param|null, * default_ttl?: int|Param, - * private_headers?: list, - * skip_response_headers?: list, + * private_headers?: list, + * skip_response_headers?: list, * allow_reload?: bool|Param, * allow_revalidate?: bool|Param, * stale_while_revalidate?: int|Param, @@ -178,17 +178,17 @@ * }, * fragments?: bool|array{ // Fragments configuration * enabled?: bool|Param, // Default: false - * hinclude_default_template?: scalar|null|Param, // Default: null - * path?: scalar|null|Param, // Default: "/_fragment" + * hinclude_default_template?: scalar|Param|null, // Default: null + * path?: scalar|Param|null, // Default: "/_fragment" * }, * profiler?: bool|array{ // Profiler configuration * enabled?: bool|Param, // Default: false * collect?: bool|Param, // Default: true - * collect_parameter?: scalar|null|Param, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null + * collect_parameter?: scalar|Param|null, // The name of the parameter to use to enable or disable collection on a per request basis. // Default: null * only_exceptions?: bool|Param, // Default: false * only_main_requests?: bool|Param, // Default: false - * dsn?: scalar|null|Param, // Default: "file:%kernel.cache_dir%/profiler" - * collect_serializer_data?: true|Param, // Default: true + * dsn?: scalar|Param|null, // Default: "file:%kernel.cache_dir%/profiler" + * collect_serializer_data?: bool|Param, // Enables the serializer data collector and profiler panel. // Default: false * }, * workflows?: bool|array{ * enabled?: bool|Param, // Default: false @@ -199,16 +199,16 @@ * type?: "workflow"|"state_machine"|Param, // Default: "state_machine" * marking_store?: array{ * type?: "method"|Param, - * property?: scalar|null|Param, - * service?: scalar|null|Param, + * property?: scalar|Param|null, + * service?: scalar|Param|null, * }, - * supports?: list, - * definition_validators?: list, - * support_strategy?: scalar|null|Param, - * initial_marking?: list, + * supports?: list, + * definition_validators?: list, + * support_strategy?: scalar|Param|null, + * initial_marking?: list, * events_to_dispatch?: list|null, * places?: list, * }>, * transitions: list>, + * formats?: array>, * }, * assets?: bool|array{ // Assets configuration * enabled?: bool|Param, // Default: true * 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, + * version_strategy?: scalar|Param|null, // Default: null + * version?: scalar|Param|null, // Default: null + * version_format?: scalar|Param|null, // Default: "%%s?%%s" + * json_manifest_path?: scalar|Param|null, // Default: null + * base_path?: scalar|Param|null, // Default: "" + * base_urls?: list, * packages?: array, + * version_strategy?: scalar|Param|null, // Default: null + * version?: scalar|Param|null, + * version_format?: scalar|Param|null, // Default: null + * json_manifest_path?: scalar|Param|null, // Default: null + * base_path?: scalar|Param|null, // Default: "" + * base_urls?: list, * }>, * }, * asset_mapper?: bool|array{ // Asset Mapper configuration * enabled?: bool|Param, // Default: true - * paths?: array, - * excluded_patterns?: list, + * 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/" + * public_prefix?: scalar|Param|null, // The public path where the assets will be written to (and served from when "server" is true). // Default: "/assets/" * missing_import_mode?: "strict"|"warn"|"ignore"|Param, // Behavior if an asset cannot be found when imported from JavaScript or CSS files - e.g. "import './non-existent.js'". "strict" means an exception is thrown, "warn" means a warning is logged, "ignore" means the import is left as-is. // Default: "warn" - * extensions?: array, - * importmap_path?: scalar|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" + * extensions?: array, + * importmap_path?: scalar|Param|null, // The path of the importmap.php file. // Default: "%kernel.project_dir%/importmap.php" + * importmap_polyfill?: scalar|Param|null, // The importmap name that will be used to load the polyfill. Set to false to disable. // Default: "es-module-shims" + * importmap_script_attributes?: array, + * vendor_dir?: scalar|Param|null, // The directory to store JavaScript vendors. // Default: "%kernel.project_dir%/assets/vendor" * precompress?: bool|array{ // Precompress assets with Brotli, Zstandard and gzip. * enabled?: bool|Param, // Default: false - * formats?: list, - * extensions?: list, + * formats?: list, + * extensions?: list, * }, * }, * translator?: bool|array{ // Translator configuration * enabled?: bool|Param, // Default: true - * fallbacks?: list, + * 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, + * formatter?: scalar|Param|null, // Default: "translator.formatter.default" + * cache_dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/translations" + * default_path?: scalar|Param|null, // The default path used to load translations. // Default: "%kernel.project_dir%/translations" + * paths?: list, * pseudo_localization?: bool|array{ * enabled?: bool|Param, // Default: false * accents?: bool|Param, // Default: true * expansion_factor?: float|Param, // Default: 1.0 * brackets?: bool|Param, // Default: true * parse_html?: bool|Param, // Default: false - * localizable_html_attributes?: list, + * localizable_html_attributes?: list, * }, * providers?: array, - * locales?: list, + * dsn?: scalar|Param|null, + * domains?: list, + * locales?: list, * }>, * globals?: array, + * parameters?: array, * domain?: string|Param, * }>, * }, * validation?: bool|array{ // Validation configuration * enabled?: bool|Param, // Default: true + * cache?: scalar|Param|null, // Deprecated: Setting the "framework.validation.cache.cache" configuration option is deprecated. It will be removed in version 8.0. * enable_attributes?: bool|Param, // Default: true - * static_method?: list, - * translation_domain?: scalar|null|Param, // Default: "validators" - * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|Param, // Default: "html5" + * static_method?: list, + * translation_domain?: scalar|Param|null, // Default: "validators" + * email_validation_mode?: "html5"|"html5-allow-no-tld"|"strict"|"loose"|Param, // Default: "html5" * mapping?: array{ - * paths?: list, + * 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 + * endpoint?: scalar|Param|null, // API endpoint for the NotCompromisedPassword Validator. // Default: null * }, * disable_translation?: bool|Param, // Default: false * auto_mapping?: array, + * services?: list, * }>, * }, + * 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, + * name_converter?: scalar|Param|null, + * circular_reference_handler?: scalar|Param|null, + * max_depth_handler?: scalar|Param|null, * mapping?: array{ - * paths?: list, + * 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 @@ -371,31 +378,31 @@ * }, * type_info?: bool|array{ // Type info configuration * enabled?: bool|Param, // Default: true - * aliases?: array, + * aliases?: array, * }, * property_info?: bool|array{ // Property info configuration * enabled?: bool|Param, // Default: true - * with_constructor_extractor?: bool|Param, // Registers the constructor extractor. // 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 + * prefix_seed?: scalar|Param|null, // Used to namespace cache keys when using several apps with the same shared backend. // Default: "_%kernel.project_dir%.%kernel.container_class%" + * app?: scalar|Param|null, // App related cache pools configuration. // Default: "cache.adapter.filesystem" + * system?: scalar|Param|null, // System related cache pools configuration. // Default: "cache.adapter.system" + * directory?: scalar|Param|null, // Default: "%kernel.share_dir%/pools/app" + * default_psr6_provider?: scalar|Param|null, + * default_redis_provider?: scalar|Param|null, // Default: "redis://localhost" + * default_valkey_provider?: scalar|Param|null, // Default: "valkey://localhost" + * default_memcached_provider?: scalar|Param|null, // Default: "memcached://localhost" + * default_doctrine_dbal_provider?: scalar|Param|null, // Default: "database_connection" + * default_pdo_provider?: scalar|Param|null, // Default: null * pools?: array, - * tags?: scalar|null|Param, // Default: null + * adapters?: list, + * tags?: scalar|Param|null, // 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, + * default_lifetime?: scalar|Param|null, // Default lifetime of the pool. + * provider?: scalar|Param|null, // Overwrite the setting from the default provider for this adapter. + * early_expiration_message_bus?: scalar|Param|null, + * clearer?: scalar|Param|null, * }>, * }, * php_errors?: array{ // PHP errors handling configuration @@ -403,51 +410,51 @@ * 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>, + * resources?: array>, * }, * semaphore?: bool|string|array{ // Semaphore configuration * enabled?: bool|Param, // Default: false - * resources?: array, + * resources?: array, * }, * messenger?: bool|array{ // Messenger configuration * enabled?: bool|Param, // Default: false * routing?: array, + * senders?: list, * }>, * serializer?: array{ - * default_serializer?: scalar|null|Param, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" + * default_serializer?: scalar|Param|null, // Service id to use as the default serializer for the transports. // Default: "messenger.transport.native_php_serializer" * symfony_serializer?: array{ - * format?: scalar|null|Param, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" + * format?: scalar|Param|null, // Serialization format for the messenger.transport.symfony_serializer service (which is not the serializer used by default). // Default: "json" * context?: array, * }, * }, * transports?: array, - * failure_transport?: scalar|null|Param, // Transport name to send failed messages to (after all retries have failed). // Default: null + * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null * retry_strategy?: string|array{ - * service?: scalar|null|Param, // Service id to override the retry strategy entirely. // Default: null + * service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null * max_retries?: int|Param, // Default: 3 * delay?: int|Param, // Time in ms to delay (or the initial value when multiplier is used). // Default: 1000 * multiplier?: float|Param, // If greater than 1, delay will grow exponentially for each retry: this delay = (delay * (multiple ^ retries)). // Default: 2 * max_delay?: int|Param, // Max time in ms that a retry should ever be delayed (0 = infinite). // Default: 0 * jitter?: float|Param, // Randomness to apply to the delay (between 0 and 1). // Default: 0.1 * }, - * rate_limiter?: scalar|null|Param, // Rate limiter name to use when processing messages. // Default: null + * rate_limiter?: scalar|Param|null, // 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 + * failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null + * stop_worker_on_signals?: list, + * default_bus?: scalar|Param|null, // Default: null * buses?: array, * }>, * }>, @@ -471,29 +478,29 @@ * 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. + * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|null|Param, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|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"...) + * cafile?: scalar|Param|null, // A certificate authority file. + * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|Param|null, // A PEM formatted certificate file. + * local_pk?: scalar|Param|null, // A private key file. + * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...) * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). * sha1?: mixed, * pin-sha256?: mixed, * md5?: mixed, * }, - * crypto_method?: scalar|null|Param, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. * extra?: array, - * rate_limiter?: scalar|null|Param, // Rate limiter name to use for throttling requests. // Default: null + * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null * caching?: bool|array{ // Caching configuration. * enabled?: bool|Param, // Default: false * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" @@ -502,7 +509,7 @@ * }, * retry_failed?: bool|array{ * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|null|Param, // service id to override the retry strategy. // Default: null + * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null * http_codes?: array, @@ -514,39 +521,39 @@ * 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. + * mock_response_factory?: scalar|Param|null, // The id of the service that should generate mock responses. It should be either an invokable or an iterable. * scoped_clients?: array, + * scope?: scalar|Param|null, // The regular expression that the request URL must match before adding the other options. When none is provided, the base URI is used instead. + * base_uri?: scalar|Param|null, // The URI to resolve relative URLs, following rules in RFC 3985, section 2. + * auth_basic?: scalar|Param|null, // An HTTP Basic authentication "username:password". + * auth_bearer?: scalar|Param|null, // A token enabling HTTP Bearer authorization. + * auth_ntlm?: scalar|Param|null, // A "username:password" pair to use Microsoft NTLM authentication (requires the cURL extension). + * query?: 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. + * http_version?: scalar|Param|null, // The default HTTP version, typically 1.1 or 2.0, leave to null for the best version. + * resolve?: array, + * proxy?: scalar|Param|null, // The URL of the proxy to pass requests through or null for automatic detection. + * no_proxy?: scalar|Param|null, // A comma separated list of hosts that do not require a proxy to be reached. * timeout?: float|Param, // The idle timeout, defaults to the "default_socket_timeout" ini parameter. * max_duration?: float|Param, // The maximum execution time for the request+response as a whole. - * bindto?: scalar|null|Param, // A network interface name, IP address, a host name or a UNIX socket to bind to. + * bindto?: scalar|Param|null, // A network interface name, IP address, a host name or a UNIX socket to bind to. * verify_peer?: bool|Param, // Indicates if the peer should be verified in a TLS context. * verify_host?: bool|Param, // Indicates if the host should exist as a certificate common name. - * cafile?: scalar|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"...). + * cafile?: scalar|Param|null, // A certificate authority file. + * capath?: scalar|Param|null, // A directory that contains multiple certificate authority files. + * local_cert?: scalar|Param|null, // A PEM formatted certificate file. + * local_pk?: scalar|Param|null, // A private key file. + * passphrase?: scalar|Param|null, // The passphrase used to encrypt the "local_pk" file. + * ciphers?: scalar|Param|null, // A list of TLS ciphers separated by colons, commas or spaces (e.g. "RC3-SHA:TLS13-AES-128-GCM-SHA256"...). * peer_fingerprint?: array{ // Associative array: hashing algorithm => hash(es). * sha1?: mixed, * pin-sha256?: mixed, * md5?: mixed, * }, - * crypto_method?: scalar|null|Param, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. + * crypto_method?: scalar|Param|null, // The minimum version of TLS to accept; must be one of STREAM_CRYPTO_METHOD_TLSv*_CLIENT constants. * extra?: array, - * rate_limiter?: scalar|null|Param, // Rate limiter name to use for throttling requests. // Default: null + * rate_limiter?: scalar|Param|null, // Rate limiter name to use for throttling requests. // Default: null * caching?: bool|array{ // Caching configuration. * enabled?: bool|Param, // Default: false * cache_pool?: string|Param, // The taggable cache pool to use for storing the responses. // Default: "cache.http_client" @@ -555,7 +562,7 @@ * }, * retry_failed?: bool|array{ * enabled?: bool|Param, // Default: false - * retry_strategy?: scalar|null|Param, // service id to override the retry strategy. // Default: null + * retry_strategy?: scalar|Param|null, // service id to override the retry strategy. // Default: null * http_codes?: array, @@ -570,69 +577,69 @@ * }, * 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, + * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * dsn?: scalar|Param|null, // Default: null + * transports?: array, * envelope?: array{ // Mailer Envelope configuration - * sender?: scalar|null|Param, - * recipients?: list, - * allowed_recipients?: list, + * sender?: scalar|Param|null, + * recipients?: list, + * allowed_recipients?: list, * }, * headers?: array, * dkim_signer?: bool|array{ // DKIM signer configuration * enabled?: bool|Param, // Default: false - * key?: scalar|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: "" + * key?: scalar|Param|null, // Key content, or path to key (in PEM format with the `file://` prefix) // Default: "" + * domain?: scalar|Param|null, // Default: "" + * select?: scalar|Param|null, // Default: "" + * passphrase?: scalar|Param|null, // The private key passphrase // Default: "" * options?: array, * }, * smime_signer?: bool|array{ // S/MIME signer configuration * enabled?: bool|Param, // Default: false - * key?: scalar|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 + * key?: scalar|Param|null, // Path to key (in PEM format) // Default: "" + * certificate?: scalar|Param|null, // Path to certificate (in PEM format without the `file://` prefix) // Default: "" + * passphrase?: scalar|Param|null, // The private key passphrase // Default: null + * extra_certificates?: scalar|Param|null, // Default: null * sign_options?: int|Param, // Default: null * }, * smime_encrypter?: bool|array{ // S/MIME encrypter configuration * enabled?: bool|Param, // Default: false - * repository?: scalar|null|Param, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" + * repository?: scalar|Param|null, // S/MIME certificate repository service. This service shall implement the `Symfony\Component\Mailer\EventListener\SmimeCertificateRepositoryInterface`. // Default: "" * cipher?: int|Param, // A set of algorithms used to encrypt the message // Default: null * }, * }, * secrets?: bool|array{ * enabled?: bool|Param, // Default: true - * vault_directory?: scalar|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" + * vault_directory?: scalar|Param|null, // Default: "%kernel.project_dir%/config/secrets/%kernel.runtime_environment%" + * local_dotenv_file?: scalar|Param|null, // Default: "%kernel.project_dir%/.env.%kernel.environment%.local" + * decryption_env_var?: scalar|Param|null, // Default: "base64:default::SYMFONY_DECRYPTION_SECRET" * }, * notifier?: bool|array{ // Notifier configuration * enabled?: bool|Param, // Default: false - * message_bus?: scalar|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, + * message_bus?: scalar|Param|null, // The message bus to use. Defaults to the default bus if the Messenger component is installed. // Default: null + * chatter_transports?: array, + * texter_transports?: array, * notification_on_failed_messages?: bool|Param, // Default: false - * channel_policy?: array>, + * channel_policy?: array>, * admin_recipients?: list, * }, * rate_limiter?: bool|array{ // Rate limiter configuration * enabled?: bool|Param, // Default: false * limiters?: array, + * limiters?: list, * 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). + * interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). * rate?: array{ // Configures the fill rate if "policy" is set to "token_bucket". - * interval?: scalar|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). + * interval?: scalar|Param|null, // Configures the rate interval. The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent). * amount?: int|Param, // Amount of tokens to add each interval. // Default: 1 * }, * }>, @@ -641,9 +648,9 @@ * 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, + * name_based_uuid_namespace?: scalar|Param|null, * time_based_uuid_version?: 7|6|1|Param, // Default: 7 - * time_based_uuid_node?: scalar|null|Param, + * time_based_uuid_node?: scalar|Param|null, * }, * html_sanitizer?: bool|array{ // HtmlSanitizer configuration * enabled?: bool|Param, // Default: false @@ -670,10 +677,10 @@ * }, * webhook?: bool|array{ // Webhook configuration * enabled?: bool|Param, // Default: false - * message_bus?: scalar|null|Param, // The message bus to use. // Default: "messenger.default_bus" + * message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus" * routing?: array, * }, * remote-event?: bool|array{ // RemoteEvent configuration @@ -684,55 +691,59 @@ * }, * } * @psalm-type TwigConfig = array{ - * form_themes?: list, + * form_themes?: list, * globals?: array, - * autoescape_service?: scalar|null|Param, // Default: null - * autoescape_service_method?: scalar|null|Param, // Default: null - * cache?: scalar|null|Param, // Default: true - * charset?: scalar|null|Param, // Default: "%kernel.charset%" + * autoescape_service?: scalar|Param|null, // Default: null + * autoescape_service_method?: scalar|Param|null, // Default: null + * base_template_class?: scalar|Param|null, // Deprecated: The child node "base_template_class" at path "twig.base_template_class" is deprecated. + * cache?: scalar|Param|null, // Default: true + * charset?: scalar|Param|null, // Default: "%kernel.charset%" * debug?: bool|Param, // Default: "%kernel.debug%" * strict_variables?: bool|Param, // Default: "%kernel.debug%" - * auto_reload?: scalar|null|Param, + * auto_reload?: scalar|Param|null, * optimizations?: int|Param, - * default_path?: scalar|null|Param, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" - * file_name_pattern?: list, + * default_path?: scalar|Param|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates" + * file_name_pattern?: list, * paths?: array, * date?: array{ // The default format options used by the date filter. - * format?: scalar|null|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 + * format?: scalar|Param|null, // Default: "F j, Y H:i" + * interval_format?: scalar|Param|null, // Default: "%d days" + * timezone?: scalar|Param|null, // The timezone used when formatting dates, when set to null, the timezone returned by date_default_timezone_get() is used. // Default: null * }, * number_format?: array{ // The default format options for the number_format filter. * decimals?: int|Param, // Default: 0 - * decimal_point?: scalar|null|Param, // Default: "." - * thousands_separator?: scalar|null|Param, // Default: "," + * decimal_point?: scalar|Param|null, // Default: "." + * thousands_separator?: scalar|Param|null, // Default: "," * }, * mailer?: array{ - * html_to_text_converter?: scalar|null|Param, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null + * html_to_text_converter?: scalar|Param|null, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null * }, * } * @psalm-type TwigComponentConfig = array{ * defaults?: array, - * anonymous_template_directory?: scalar|null|Param, // Defaults to `components` - * profiler?: bool|Param, // Enables the profiler for Twig Component (in debug mode) // Default: "%kernel.debug%" - * controllers_json?: scalar|null|Param, // Deprecated: The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0. // Default: null + * anonymous_template_directory?: scalar|Param|null, // Defaults to `components` + * profiler?: bool|array{ // Enables the profiler for Twig Component + * enabled?: bool|Param, // Default: "%kernel.debug%" + * collect_components?: bool|Param, // Collect components instances // Default: true + * }, + * controllers_json?: scalar|Param|null, // Deprecated: The "twig_component.controllers_json" config option is deprecated, and will be removed in 3.0. // Default: null * } * @psalm-type SyliusTwigHooksConfig = array{ * enable_autoprefixing?: bool|Param, // Default: false - * hook_name_section_separator?: scalar|null|Param, // Default: false - * supported_hookable_types?: array, + * hook_name_section_separator?: scalar|Param|null, // Default: false + * supported_hookable_types?: array, * hooks?: array, * props?: array, * configuration?: array, @@ -741,123 +752,121 @@ * } * @psalm-type SyliusTwigExtraConfig = array{ * twig_ux?: array{ - * anonymous_component_template_prefixes?: array, + * anonymous_component_template_prefixes?: array, * }, * } * @psalm-type SyliusAdminUiConfig = array{ - * routing?: array, + * routing?: array, * } - * @psalm-type SyliusUiTranslationsConfig = array - * @psalm-type SyliusBootstrapAdminUiConfig = array * @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" + * excluded_ajax_paths?: scalar|Param|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt" * } * @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 + * dump_destination?: scalar|Param|null, // 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 LiveComponentConfig = array{ - * secret?: scalar|null|Param, // The secret used to compute fingerprints and checksums // Default: "%kernel.secret%" + * secret?: scalar|Param|null, // The secret used to compute fingerprints and checksums // Default: "%kernel.secret%" * } * @psalm-type StimulusConfig = array{ - * controller_paths?: list, - * controllers_json?: scalar|null|Param, // Default: "%kernel.project_dir%/assets/controllers.json" + * controller_paths?: list, + * controllers_json?: scalar|Param|null, // Default: "%kernel.project_dir%/assets/controllers.json" * } * @psalm-type DoctrineConfig = array{ * dbal?: array{ - * default_connection?: scalar|null|Param, + * default_connection?: scalar|Param|null, * types?: array, - * driver_schemes?: array, + * driver_schemes?: array, * connections?: array, - * mapping_types?: array, - * default_table_options?: array, - * schema_manager_factory?: scalar|null|Param, // Default: "doctrine.dbal.default_schema_manager_factory" - * result_cache?: scalar|null|Param, + * mapping_types?: array, + * default_table_options?: array, + * schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory" + * result_cache?: scalar|Param|null, * replicas?: array, * }>, * }, * orm?: array{ - * default_entity_manager?: scalar|null|Param, + * default_entity_manager?: scalar|Param|null, * enable_native_lazy_objects?: bool|Param, // Deprecated: The "enable_native_lazy_objects" option is deprecated and will be removed in DoctrineBundle 4.0, as native lazy objects are now always enabled. // Default: true * controller_resolver?: bool|array{ * enabled?: bool|Param, // Default: true @@ -866,98 +875,98 @@ * }, * entity_managers?: array, * }>, * }>, * }, - * connection?: scalar|null|Param, - * class_metadata_factory_name?: scalar|null|Param, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" - * default_repository_class?: scalar|null|Param, // Default: "Doctrine\\ORM\\EntityRepository" - * auto_mapping?: scalar|null|Param, // Default: false - * naming_strategy?: scalar|null|Param, // Default: "doctrine.orm.naming_strategy.default" - * quote_strategy?: scalar|null|Param, // Default: "doctrine.orm.quote_strategy.default" - * typed_field_mapper?: scalar|null|Param, // Default: "doctrine.orm.typed_field_mapper.default" - * entity_listener_resolver?: scalar|null|Param, // Default: null - * fetch_mode_subselect_batch_size?: scalar|null|Param, - * repository_factory?: scalar|null|Param, // Default: "doctrine.orm.container_repository_factory" - * schema_ignore_classes?: list, + * connection?: scalar|Param|null, + * class_metadata_factory_name?: scalar|Param|null, // Default: "Doctrine\\ORM\\Mapping\\ClassMetadataFactory" + * default_repository_class?: scalar|Param|null, // Default: "Doctrine\\ORM\\EntityRepository" + * auto_mapping?: scalar|Param|null, // Default: false + * naming_strategy?: scalar|Param|null, // Default: "doctrine.orm.naming_strategy.default" + * quote_strategy?: scalar|Param|null, // Default: "doctrine.orm.quote_strategy.default" + * typed_field_mapper?: scalar|Param|null, // Default: "doctrine.orm.typed_field_mapper.default" + * entity_listener_resolver?: scalar|Param|null, // Default: null + * fetch_mode_subselect_batch_size?: scalar|Param|null, + * repository_factory?: scalar|Param|null, // Default: "doctrine.orm.container_repository_factory" + * schema_ignore_classes?: list, * validate_xml_mapping?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728. // Default: false * second_level_cache?: array{ * region_cache_driver?: string|array{ - * type?: scalar|null|Param, // Default: null - * id?: scalar|null|Param, - * pool?: scalar|null|Param, + * type?: scalar|Param|null, // Default: null + * id?: scalar|Param|null, + * pool?: scalar|Param|null, * }, - * region_lock_lifetime?: scalar|null|Param, // Default: 60 + * region_lock_lifetime?: scalar|Param|null, // Default: 60 * log_enabled?: bool|Param, // Default: true - * region_lifetime?: scalar|null|Param, // Default: 3600 + * region_lifetime?: scalar|Param|null, // Default: 3600 * enabled?: bool|Param, // Default: true - * factory?: scalar|null|Param, + * factory?: scalar|Param|null, * regions?: array, * loggers?: array, * }, - * hydrators?: array, + * hydrators?: array, * mappings?: array, * dql?: array{ - * string_functions?: array, - * numeric_functions?: array, - * datetime_functions?: array, + * string_functions?: array, + * numeric_functions?: array, + * datetime_functions?: array, * }, * filters?: array, * }>, - * identity_generation_preferences?: array, + * identity_generation_preferences?: array, * }>, - * resolve_target_entities?: array, + * resolve_target_entities?: array, * }, * } * @psalm-type BabdevPagerfantaConfig = array{ - * default_view?: scalar|null|Param, // Default: "default" - * default_twig_template?: scalar|null|Param, // Default: "@BabDevPagerfanta/default.html.twig" + * default_view?: scalar|Param|null, // Default: "default" + * default_twig_template?: scalar|Param|null, // Default: "@BabDevPagerfanta/default.html.twig" * exceptions_strategy?: array{ * out_of_range_page?: "to_http_not_found"|"custom"|Param, // Default: "to_http_not_found" * not_valid_current_page?: "to_http_not_found"|"custom"|Param, // Default: "to_http_not_found" @@ -965,27 +974,27 @@ * } * @psalm-type SyliusResourceConfig = array{ * resources?: array, @@ -994,67 +1003,67 @@ * limit?: mixed, // Default: null * allowed_paginate?: list, * default_page_size?: int|Param, // Default: 10 - * default_templates_dir?: scalar|null|Param, // Default: null + * default_templates_dir?: scalar|Param|null, // Default: null * sortable?: bool|Param, // Default: false * sorting?: mixed, // Default: null * filterable?: bool|Param, // Default: false * criteria?: mixed, // Default: null - * state_machine_component?: scalar|null|Param, // Default: null + * state_machine_component?: scalar|Param|null, // Default: null * }, * translation?: bool|array{ * enabled?: bool|Param, // Default: true - * locale_provider?: scalar|null|Param, // Default: "sylius.translation_locale_provider.immutable" + * locale_provider?: scalar|Param|null, // Default: "sylius.translation_locale_provider.immutable" * }, * drivers?: list<"doctrine/orm"|"doctrine/mongodb-odm"|"doctrine/phpcr-odm"|Param>, * mapping?: array{ - * imports?: list, - * paths?: list, + * imports?: list, + * paths?: list, * }, - * authorization_checker?: scalar|null|Param, // Default: "sylius.resource_controller.authorization_checker.disabled" + * authorization_checker?: scalar|Param|null, // Default: "sylius.resource_controller.authorization_checker.disabled" * routing_path_bc_layer?: bool|Param, - * path_segment_name_generator?: scalar|null|Param, // Specify a path name generator to use. // Default: "sylius.metadata.path_segment_name_generator.dash" + * path_segment_name_generator?: scalar|Param|null, // Specify a path name generator to use. // Default: "sylius.metadata.path_segment_name_generator.dash" * } * @psalm-type ZenstruckFoundryConfig = array{ - * auto_refresh_proxies?: bool|null|Param, // Deprecated: Since 2.0 auto_refresh_proxies defaults to true and this configuration has no effect. // Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh) // Default: null - * enable_auto_refresh_with_lazy_objects?: bool|null|Param, // Enable auto-refresh using PHP 8.4 lazy objects (cannot be enabled if PHP < 8.4). // Default: null + * auto_refresh_proxies?: bool|Param|null, // Deprecated: Since 2.0 auto_refresh_proxies defaults to true and this configuration has no effect. // Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh) // Default: null + * enable_auto_refresh_with_lazy_objects?: bool|Param|null, // Enable auto-refresh using PHP 8.4 lazy objects (cannot be enabled if PHP < 8.4). // Default: null * faker?: array{ // Configure the faker used by your factories. - * locale?: scalar|null|Param, // The default locale to use for faker. // Default: null - * seed?: scalar|null|Param, // Deprecated: The "faker.seed" configuration is deprecated and will be removed in 3.0. Use environment variable "FOUNDRY_FAKER_SEED" instead. // Random number generator seed to produce the same fake values every run. // Default: null - * service?: scalar|null|Param, // Service id for custom faker instance. // Default: null + * locale?: scalar|Param|null, // The default locale to use for faker. // Default: null + * seed?: scalar|Param|null, // Deprecated: The "faker.seed" configuration is deprecated and will be removed in 3.0. Use environment variable "FOUNDRY_FAKER_SEED" instead. // Random number generator seed to produce the same fake values every run. // Default: null + * service?: scalar|Param|null, // Service id for custom faker instance. // Default: null * }, * instantiator?: array{ // Configure the default instantiator used by your object factories. * use_constructor?: bool|Param, // Use the constructor to instantiate objects. // Default: true * allow_extra_attributes?: bool|Param, // Whether or not to skip attributes that do not correspond to properties. // Default: false * always_force_properties?: bool|Param, // Whether or not to skip setters and force set object properties (public/private/protected) directly. // Default: false - * service?: scalar|null|Param, // Service id of your custom instantiator. // Default: null + * service?: scalar|Param|null, // Service id of your custom instantiator. // Default: null * }, - * global_state?: list, + * global_state?: list, * persistence?: array{ * flush_once?: bool|Param, // Flush only once per call of `PersistentObjectFactory::create()` in userland. // Default: false * }, * orm?: array{ * auto_persist?: bool|Param, // Deprecated: Since 2.4 auto_persist defaults to true and this configuration has no effect. // Automatically persist entities when created. // Default: true * reset?: array{ - * connections?: list, - * entity_managers?: list, + * connections?: list, + * entity_managers?: list, * mode?: \Zenstruck\Foundry\ORM\ResetDatabase\ResetDatabaseMode::SCHEMA|\Zenstruck\Foundry\ORM\ResetDatabase\ResetDatabaseMode::MIGRATE|Param, // Reset mode to use with ResetDatabase trait // Default: "schema" * migrations?: array{ - * configurations?: list, + * configurations?: list, * }, * }, * }, * mongo?: array{ * auto_persist?: bool|Param, // Deprecated: Since 2.4 auto_persist defaults to true and this configuration has no effect. // Automatically persist documents when created. // Default: true * reset?: array{ - * document_managers?: list, + * document_managers?: list, * }, * }, * make_factory?: array{ - * default_namespace?: scalar|null|Param, // Default namespace where factories will be created by maker. // Default: "Factory" + * default_namespace?: scalar|Param|null, // Default namespace where factories will be created by maker. // Default: "Factory" * add_hints?: bool|Param, // Add "beginner" hints in the created factory. // Default: true * }, * make_story?: array{ - * default_namespace?: scalar|null|Param, // Default namespace where stories will be created by maker. // Default: "Story" + * default_namespace?: scalar|Param|null, // Default namespace where stories will be created by maker. // Default: "Story" * }, * } * @psalm-type KnpMenuConfig = array{ @@ -1062,431 +1071,434 @@ * builder_alias?: bool|Param, // Default: true * }, * twig?: array{ - * template?: scalar|null|Param, // Default: "@KnpMenu/menu.html.twig" + * template?: scalar|Param|null, // Default: "@KnpMenu/menu.html.twig" * }, * templating?: bool|Param, // Default: false - * default_renderer?: scalar|null|Param, // Default: "twig" + * default_renderer?: scalar|Param|null, // Default: "twig" * } * @psalm-type SyliusGridConfig = array{ * drivers?: list<"doctrine/orm"|"doctrine/phpcr-odm"|Param>, * templates?: array{ - * filter?: array, - * action?: array, - * bulk_action?: array, + * filter?: array, + * action?: array, + * bulk_action?: array, * }, * grids?: array, * }, * sorting?: array, * limits?: list, * fields?: array, * }>, * filters?: array, * form_options?: list, * default_value?: mixed, * }>, * actions?: array, * }>>, * removals?: array, * }>, * } * @psalm-type VichUploaderConfig = array{ - * default_filename_attribute_suffix?: scalar|null|Param, // Default: "_name" - * db_driver: scalar|null|Param, - * storage?: scalar|null|Param, // Default: "file_system" + * default_filename_attribute_suffix?: scalar|Param|null, // Default: "_name" + * db_driver: scalar|Param|null, + * storage?: scalar|Param|null, // Default: "file_system" * use_flysystem_to_resolve_uri?: bool|Param, // Default: false - * twig?: scalar|null|Param, // twig requires templating // Default: true - * form?: scalar|null|Param, // Default: true + * twig?: scalar|Param|null, // twig requires templating // Default: true + * form?: scalar|Param|null, // Default: true * metadata?: array{ - * cache?: scalar|null|Param, // Default: "file" - * type?: scalar|null|Param, // Default: "attribute" + * cache?: scalar|Param|null, // Default: "file" + * type?: scalar|Param|null, // Default: "attribute" * file_cache?: array{ - * dir?: scalar|null|Param, // Default: "%kernel.cache_dir%/vich_uploader" + * dir?: scalar|Param|null, // Default: "%kernel.cache_dir%/vich_uploader" * }, * auto_detection?: bool|Param, // Default: true * directories?: list, * }, * mappings?: array, * } * @psalm-type MakerConfig = array{ - * root_namespace?: scalar|null|Param, // Default: "App" + * root_namespace?: scalar|Param|null, // Default: "App" * generate_final_classes?: bool|Param, // Default: true * generate_final_entities?: bool|Param, // Default: false * } * @psalm-type SecurityConfig = array{ - * access_denied_url?: scalar|null|Param, // Default: null + * access_denied_url?: scalar|Param|null, // Default: null * session_fixation_strategy?: "none"|"migrate"|"invalidate"|Param, // Default: "migrate" + * hide_user_not_found?: bool|Param, // Deprecated: The "hide_user_not_found" option is deprecated and will be removed in 8.0. Use the "expose_security_errors" option instead. * expose_security_errors?: \Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::None|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::AccountStatus|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::All|Param, // Default: "none" * erase_credentials?: bool|Param, // Default: true * access_decision_manager?: array{ * strategy?: "affirmative"|"consensus"|"unanimous"|"priority"|Param, - * service?: scalar|null|Param, - * strategy_service?: scalar|null|Param, + * service?: scalar|Param|null, + * strategy_service?: scalar|Param|null, * allow_if_all_abstain?: bool|Param, // Default: false * allow_if_equal_granted_denied?: bool|Param, // Default: true * }, * password_hashers?: array, - * hash_algorithm?: scalar|null|Param, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512" - * key_length?: scalar|null|Param, // Default: 40 + * algorithm?: scalar|Param|null, + * migrate_from?: list, + * hash_algorithm?: scalar|Param|null, // Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. // Default: "sha512" + * key_length?: scalar|Param|null, // Default: 40 * ignore_case?: bool|Param, // Default: false * encode_as_base64?: bool|Param, // Default: true - * iterations?: scalar|null|Param, // Default: 5000 + * iterations?: scalar|Param|null, // Default: 5000 * cost?: int|Param, // Default: null - * memory_cost?: scalar|null|Param, // Default: null - * time_cost?: scalar|null|Param, // Default: null - * id?: scalar|null|Param, + * memory_cost?: scalar|Param|null, // Default: null + * time_cost?: scalar|Param|null, // Default: null + * id?: scalar|Param|null, * }>, * providers?: array, + * providers?: list, * }, * entity?: array{ - * class: scalar|null|Param, // The full entity class name of your user class. - * property?: scalar|null|Param, // Default: null - * manager_name?: scalar|null|Param, // Default: null + * class: scalar|Param|null, // The full entity class name of your user class. + * property?: scalar|Param|null, // Default: null + * manager_name?: scalar|Param|null, // Default: null * }, * memory?: array{ * users?: array, + * password?: scalar|Param|null, // Default: null + * roles?: list, * }>, * }, * ldap?: array{ - * service: scalar|null|Param, - * base_dn: scalar|null|Param, - * search_dn?: scalar|null|Param, // Default: null - * search_password?: scalar|null|Param, // Default: null - * extra_fields?: list, - * default_roles?: list, - * role_fetcher?: scalar|null|Param, // Default: null - * uid_key?: scalar|null|Param, // Default: "sAMAccountName" - * filter?: scalar|null|Param, // Default: "({uid_key}={user_identifier})" - * password_attribute?: scalar|null|Param, // Default: null + * service: scalar|Param|null, + * base_dn: scalar|Param|null, + * search_dn?: scalar|Param|null, // Default: null + * search_password?: scalar|Param|null, // Default: null + * extra_fields?: list, + * default_roles?: list, + * role_fetcher?: scalar|Param|null, // Default: null + * uid_key?: scalar|Param|null, // Default: "sAMAccountName" + * filter?: scalar|Param|null, // Default: "({uid_key}={user_identifier})" + * password_attribute?: scalar|Param|null, // Default: null * }, * }>, * firewalls: array, + * pattern?: scalar|Param|null, + * host?: scalar|Param|null, + * methods?: list, * security?: bool|Param, // Default: true - * user_checker?: scalar|null|Param, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker" - * request_matcher?: scalar|null|Param, - * access_denied_url?: scalar|null|Param, - * access_denied_handler?: scalar|null|Param, - * entry_point?: scalar|null|Param, // An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface". - * provider?: scalar|null|Param, + * user_checker?: scalar|Param|null, // The UserChecker to use when authenticating users in this firewall. // Default: "security.user_checker" + * request_matcher?: scalar|Param|null, + * access_denied_url?: scalar|Param|null, + * access_denied_handler?: scalar|Param|null, + * entry_point?: scalar|Param|null, // An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface". + * provider?: scalar|Param|null, * stateless?: bool|Param, // Default: false * lazy?: bool|Param, // Default: false - * context?: scalar|null|Param, + * context?: scalar|Param|null, * logout?: array{ - * enable_csrf?: bool|null|Param, // Default: null - * csrf_token_id?: scalar|null|Param, // Default: "logout" - * csrf_parameter?: scalar|null|Param, // Default: "_csrf_token" - * csrf_token_manager?: scalar|null|Param, - * path?: scalar|null|Param, // Default: "/logout" - * target?: scalar|null|Param, // Default: "/" + * enable_csrf?: bool|Param|null, // Default: null + * csrf_token_id?: scalar|Param|null, // Default: "logout" + * csrf_parameter?: scalar|Param|null, // Default: "_csrf_token" + * csrf_token_manager?: scalar|Param|null, + * path?: scalar|Param|null, // Default: "/logout" + * target?: scalar|Param|null, // Default: "/" * invalidate_session?: bool|Param, // Default: true * clear_site_data?: list<"*"|"cache"|"cookies"|"storage"|"executionContexts"|Param>, * delete_cookies?: array, * }, * switch_user?: array{ - * provider?: scalar|null|Param, - * parameter?: scalar|null|Param, // Default: "_switch_user" - * role?: scalar|null|Param, // Default: "ROLE_ALLOWED_TO_SWITCH" - * target_route?: scalar|null|Param, // Default: null + * provider?: scalar|Param|null, + * parameter?: scalar|Param|null, // Default: "_switch_user" + * role?: scalar|Param|null, // Default: "ROLE_ALLOWED_TO_SWITCH" + * target_route?: scalar|Param|null, // Default: null * }, - * required_badges?: list, - * custom_authenticators?: list, + * required_badges?: list, + * custom_authenticators?: list, * login_throttling?: array{ - * limiter?: scalar|null|Param, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface". + * limiter?: scalar|Param|null, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface". * max_attempts?: int|Param, // Default: 5 - * interval?: scalar|null|Param, // Default: "1 minute" - * lock_factory?: scalar|null|Param, // The service ID of the lock factory used by the login rate limiter (or null to disable locking). // Default: null + * interval?: scalar|Param|null, // Default: "1 minute" + * lock_factory?: scalar|Param|null, // The service ID of the lock factory used by the login rate limiter (or null to disable locking). // Default: null * cache_pool?: string|Param, // The cache pool to use for storing the limiter state // Default: "cache.rate_limiter" * storage_service?: string|Param, // The service ID of a custom storage implementation, this precedes any configured "cache_pool" // Default: null * }, * x509?: array{ - * provider?: scalar|null|Param, - * user?: scalar|null|Param, // Default: "SSL_CLIENT_S_DN_Email" - * credentials?: scalar|null|Param, // Default: "SSL_CLIENT_S_DN" - * user_identifier?: scalar|null|Param, // Default: "emailAddress" + * provider?: scalar|Param|null, + * user?: scalar|Param|null, // Default: "SSL_CLIENT_S_DN_Email" + * credentials?: scalar|Param|null, // Default: "SSL_CLIENT_S_DN" + * user_identifier?: scalar|Param|null, // Default: "emailAddress" * }, * remote_user?: array{ - * provider?: scalar|null|Param, - * user?: scalar|null|Param, // Default: "REMOTE_USER" + * provider?: scalar|Param|null, + * user?: scalar|Param|null, // Default: "REMOTE_USER" * }, * login_link?: array{ - * check_route: scalar|null|Param, // Route that will validate the login link - e.g. "app_login_link_verify". - * check_post_only?: scalar|null|Param, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false - * signature_properties: list, + * check_route: scalar|Param|null, // Route that will validate the login link - e.g. "app_login_link_verify". + * check_post_only?: scalar|Param|null, // If true, only HTTP POST requests to "check_route" will be handled by the authenticator. // Default: false + * signature_properties: list, * lifetime?: int|Param, // The lifetime of the login link in seconds. // Default: 600 * max_uses?: int|Param, // Max number of times a login link can be used - null means unlimited within lifetime. // Default: null - * used_link_cache?: scalar|null|Param, // Cache service id used to expired links of max_uses is set. - * success_handler?: scalar|null|Param, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface. - * failure_handler?: scalar|null|Param, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface. - * provider?: scalar|null|Param, // The user provider to load users from. - * secret?: scalar|null|Param, // Default: "%kernel.secret%" + * used_link_cache?: scalar|Param|null, // Cache service id used to expired links of max_uses is set. + * success_handler?: scalar|Param|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface. + * failure_handler?: scalar|Param|null, // A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface. + * provider?: scalar|Param|null, // The user provider to load users from. + * secret?: scalar|Param|null, // Default: "%kernel.secret%" * always_use_default_target_path?: bool|Param, // Default: false - * default_target_path?: scalar|null|Param, // Default: "/" - * login_path?: scalar|null|Param, // Default: "/login" - * target_path_parameter?: scalar|null|Param, // Default: "_target_path" + * default_target_path?: scalar|Param|null, // Default: "/" + * login_path?: scalar|Param|null, // Default: "/login" + * target_path_parameter?: scalar|Param|null, // Default: "_target_path" * use_referer?: bool|Param, // Default: false - * failure_path?: scalar|null|Param, // Default: null + * failure_path?: scalar|Param|null, // Default: null * failure_forward?: bool|Param, // Default: false - * failure_path_parameter?: scalar|null|Param, // Default: "_failure_path" + * failure_path_parameter?: scalar|Param|null, // Default: "_failure_path" * }, * form_login?: array{ - * provider?: scalar|null|Param, + * provider?: scalar|Param|null, * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|null|Param, - * failure_handler?: scalar|null|Param, - * check_path?: scalar|null|Param, // Default: "/login_check" + * success_handler?: scalar|Param|null, + * failure_handler?: scalar|Param|null, + * check_path?: scalar|Param|null, // Default: "/login_check" * use_forward?: bool|Param, // Default: false - * login_path?: scalar|null|Param, // Default: "/login" - * username_parameter?: scalar|null|Param, // Default: "_username" - * password_parameter?: scalar|null|Param, // Default: "_password" - * csrf_parameter?: scalar|null|Param, // Default: "_csrf_token" - * csrf_token_id?: scalar|null|Param, // Default: "authenticate" + * login_path?: scalar|Param|null, // Default: "/login" + * username_parameter?: scalar|Param|null, // Default: "_username" + * password_parameter?: scalar|Param|null, // Default: "_password" + * csrf_parameter?: scalar|Param|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|Param|null, // Default: "authenticate" * enable_csrf?: bool|Param, // Default: false * post_only?: bool|Param, // Default: true * form_only?: bool|Param, // Default: false * always_use_default_target_path?: bool|Param, // Default: false - * default_target_path?: scalar|null|Param, // Default: "/" - * target_path_parameter?: scalar|null|Param, // Default: "_target_path" + * default_target_path?: scalar|Param|null, // Default: "/" + * target_path_parameter?: scalar|Param|null, // Default: "_target_path" * use_referer?: bool|Param, // Default: false - * failure_path?: scalar|null|Param, // Default: null + * failure_path?: scalar|Param|null, // Default: null * failure_forward?: bool|Param, // Default: false - * failure_path_parameter?: scalar|null|Param, // Default: "_failure_path" + * failure_path_parameter?: scalar|Param|null, // Default: "_failure_path" * }, * form_login_ldap?: array{ - * provider?: scalar|null|Param, + * provider?: scalar|Param|null, * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|null|Param, - * failure_handler?: scalar|null|Param, - * check_path?: scalar|null|Param, // Default: "/login_check" + * success_handler?: scalar|Param|null, + * failure_handler?: scalar|Param|null, + * check_path?: scalar|Param|null, // Default: "/login_check" * use_forward?: bool|Param, // Default: false - * login_path?: scalar|null|Param, // Default: "/login" - * username_parameter?: scalar|null|Param, // Default: "_username" - * password_parameter?: scalar|null|Param, // Default: "_password" - * csrf_parameter?: scalar|null|Param, // Default: "_csrf_token" - * csrf_token_id?: scalar|null|Param, // Default: "authenticate" + * login_path?: scalar|Param|null, // Default: "/login" + * username_parameter?: scalar|Param|null, // Default: "_username" + * password_parameter?: scalar|Param|null, // Default: "_password" + * csrf_parameter?: scalar|Param|null, // Default: "_csrf_token" + * csrf_token_id?: scalar|Param|null, // Default: "authenticate" * enable_csrf?: bool|Param, // Default: false * post_only?: bool|Param, // Default: true * form_only?: bool|Param, // Default: false * always_use_default_target_path?: bool|Param, // Default: false - * default_target_path?: scalar|null|Param, // Default: "/" - * target_path_parameter?: scalar|null|Param, // Default: "_target_path" + * default_target_path?: scalar|Param|null, // Default: "/" + * target_path_parameter?: scalar|Param|null, // Default: "_target_path" * use_referer?: bool|Param, // Default: false - * failure_path?: scalar|null|Param, // Default: null + * failure_path?: scalar|Param|null, // Default: null * failure_forward?: bool|Param, // Default: false - * failure_path_parameter?: scalar|null|Param, // Default: "_failure_path" - * service?: scalar|null|Param, // Default: "ldap" - * dn_string?: scalar|null|Param, // Default: "{user_identifier}" - * query_string?: scalar|null|Param, - * search_dn?: scalar|null|Param, // Default: "" - * search_password?: scalar|null|Param, // Default: "" + * failure_path_parameter?: scalar|Param|null, // Default: "_failure_path" + * service?: scalar|Param|null, // Default: "ldap" + * dn_string?: scalar|Param|null, // Default: "{user_identifier}" + * query_string?: scalar|Param|null, + * search_dn?: scalar|Param|null, // Default: "" + * search_password?: scalar|Param|null, // Default: "" * }, * json_login?: array{ - * provider?: scalar|null|Param, + * provider?: scalar|Param|null, * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|null|Param, - * failure_handler?: scalar|null|Param, - * check_path?: scalar|null|Param, // Default: "/login_check" + * success_handler?: scalar|Param|null, + * failure_handler?: scalar|Param|null, + * check_path?: scalar|Param|null, // Default: "/login_check" * use_forward?: bool|Param, // Default: false - * login_path?: scalar|null|Param, // Default: "/login" - * username_path?: scalar|null|Param, // Default: "username" - * password_path?: scalar|null|Param, // Default: "password" + * login_path?: scalar|Param|null, // Default: "/login" + * username_path?: scalar|Param|null, // Default: "username" + * password_path?: scalar|Param|null, // Default: "password" * }, * json_login_ldap?: array{ - * provider?: scalar|null|Param, + * provider?: scalar|Param|null, * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|null|Param, - * failure_handler?: scalar|null|Param, - * check_path?: scalar|null|Param, // Default: "/login_check" + * success_handler?: scalar|Param|null, + * failure_handler?: scalar|Param|null, + * check_path?: scalar|Param|null, // Default: "/login_check" * use_forward?: bool|Param, // Default: false - * login_path?: scalar|null|Param, // Default: "/login" - * username_path?: scalar|null|Param, // Default: "username" - * password_path?: scalar|null|Param, // Default: "password" - * service?: scalar|null|Param, // Default: "ldap" - * dn_string?: scalar|null|Param, // Default: "{user_identifier}" - * query_string?: scalar|null|Param, - * search_dn?: scalar|null|Param, // Default: "" - * search_password?: scalar|null|Param, // Default: "" + * login_path?: scalar|Param|null, // Default: "/login" + * username_path?: scalar|Param|null, // Default: "username" + * password_path?: scalar|Param|null, // Default: "password" + * service?: scalar|Param|null, // Default: "ldap" + * dn_string?: scalar|Param|null, // Default: "{user_identifier}" + * query_string?: scalar|Param|null, + * search_dn?: scalar|Param|null, // Default: "" + * search_password?: scalar|Param|null, // Default: "" * }, * access_token?: array{ - * provider?: scalar|null|Param, + * provider?: scalar|Param|null, * remember_me?: bool|Param, // Default: true - * success_handler?: scalar|null|Param, - * failure_handler?: scalar|null|Param, - * realm?: scalar|null|Param, // Default: null - * token_extractors?: list, + * success_handler?: scalar|Param|null, + * failure_handler?: scalar|Param|null, + * realm?: scalar|Param|null, // Default: null + * token_extractors?: list, * token_handler: string|array{ - * id?: scalar|null|Param, + * id?: scalar|Param|null, * oidc_user_info?: string|array{ - * base_uri: scalar|null|Param, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). + * base_uri: scalar|Param|null, // Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured). * discovery?: array{ // Enable the OIDC discovery. * cache?: array{ - * id: scalar|null|Param, // Cache service id to use to cache the OIDC discovery configuration. + * id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. * }, * }, - * claim?: scalar|null|Param, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" - * client?: scalar|null|Param, // HttpClient service id to use to call the OIDC server. + * claim?: scalar|Param|null, // Claim which contains the user identifier (e.g. sub, email, etc.). // Default: "sub" + * client?: scalar|Param|null, // HttpClient service id to use to call the OIDC server. * }, * oidc?: array{ * discovery?: array{ // Enable the OIDC discovery. - * base_uri: list, + * base_uri: list, * cache?: array{ - * id: scalar|null|Param, // Cache service id to use to cache the OIDC discovery configuration. + * id: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration. * }, * }, - * claim?: scalar|null|Param, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" - * audience: scalar|null|Param, // Audience set in the token, for validation purpose. - * issuers: list, - * algorithms: list, - * keyset?: scalar|null|Param, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). + * claim?: scalar|Param|null, // Claim which contains the user identifier (e.g.: sub, email..). // Default: "sub" + * audience: scalar|Param|null, // Audience set in the token, for validation purpose. + * issuers: list, + * algorithm?: array, + * algorithms: list, + * key?: scalar|Param|null, // Deprecated: The "key" option is deprecated and will be removed in 8.0. Use the "keyset" option instead. // JSON-encoded JWK used to sign the token (must contain a "kty" key). + * keyset?: scalar|Param|null, // JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys). * encryption?: bool|array{ * enabled?: bool|Param, // Default: false * enforce?: bool|Param, // When enabled, the token shall be encrypted. // Default: false - * algorithms: list, - * keyset: scalar|null|Param, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). + * algorithms: list, + * keyset: scalar|Param|null, // JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys). * }, * }, * cas?: array{ - * validation_url: scalar|null|Param, // CAS server validation URL - * prefix?: scalar|null|Param, // CAS prefix // Default: "cas" - * http_client?: scalar|null|Param, // HTTP Client service // Default: null + * validation_url: scalar|Param|null, // CAS server validation URL + * prefix?: scalar|Param|null, // CAS prefix // Default: "cas" + * http_client?: scalar|Param|null, // HTTP Client service // Default: null * }, - * oauth2?: scalar|null|Param, + * oauth2?: scalar|Param|null, * }, * }, * http_basic?: array{ - * provider?: scalar|null|Param, - * realm?: scalar|null|Param, // Default: "Secured Area" + * provider?: scalar|Param|null, + * realm?: scalar|Param|null, // Default: "Secured Area" * }, * http_basic_ldap?: array{ - * provider?: scalar|null|Param, - * realm?: scalar|null|Param, // Default: "Secured Area" - * service?: scalar|null|Param, // Default: "ldap" - * dn_string?: scalar|null|Param, // Default: "{user_identifier}" - * query_string?: scalar|null|Param, - * search_dn?: scalar|null|Param, // Default: "" - * search_password?: scalar|null|Param, // Default: "" + * provider?: scalar|Param|null, + * realm?: scalar|Param|null, // Default: "Secured Area" + * service?: scalar|Param|null, // Default: "ldap" + * dn_string?: scalar|Param|null, // Default: "{user_identifier}" + * query_string?: scalar|Param|null, + * search_dn?: scalar|Param|null, // Default: "" + * search_password?: scalar|Param|null, // Default: "" * }, * remember_me?: array{ - * secret?: scalar|null|Param, // Default: "%kernel.secret%" - * service?: scalar|null|Param, - * user_providers?: list, + * secret?: scalar|Param|null, // Default: "%kernel.secret%" + * service?: scalar|Param|null, + * user_providers?: list, * catch_exceptions?: bool|Param, // Default: true - * signature_properties?: list, + * signature_properties?: list, * token_provider?: string|array{ - * service?: scalar|null|Param, // The service ID of a custom remember-me token provider. + * service?: scalar|Param|null, // The service ID of a custom remember-me token provider. * doctrine?: bool|array{ * enabled?: bool|Param, // Default: false - * connection?: scalar|null|Param, // Default: null + * connection?: scalar|Param|null, // Default: null * }, * }, - * token_verifier?: scalar|null|Param, // The service ID of a custom rememberme token verifier. - * name?: scalar|null|Param, // Default: "REMEMBERME" + * token_verifier?: scalar|Param|null, // The service ID of a custom rememberme token verifier. + * name?: scalar|Param|null, // Default: "REMEMBERME" * lifetime?: int|Param, // Default: 31536000 - * path?: scalar|null|Param, // Default: "/" - * domain?: scalar|null|Param, // Default: null + * path?: scalar|Param|null, // Default: "/" + * domain?: scalar|Param|null, // Default: null * secure?: true|false|"auto"|Param, // Default: null * httponly?: bool|Param, // Default: true * samesite?: null|"lax"|"strict"|"none"|Param, // Default: "lax" * always_remember_me?: bool|Param, // Default: false - * remember_me_parameter?: scalar|null|Param, // Default: "_remember_me" + * remember_me_parameter?: scalar|Param|null, // Default: "_remember_me" * }, * }>, * access_control?: list, - * attributes?: array, - * route?: scalar|null|Param, // Default: null - * methods?: list, - * allow_if?: scalar|null|Param, // Default: null - * roles?: list, + * ips?: list, + * attributes?: array, + * route?: scalar|Param|null, // Default: null + * methods?: list, + * allow_if?: scalar|Param|null, // Default: null + * roles?: list, * }>, - * role_hierarchy?: array>, + * role_hierarchy?: array>, * } * @psalm-type UxIconsConfig = array{ - * icon_dir?: scalar|null|Param, // The local directory where icons are stored. // Default: "%kernel.project_dir%/assets/icons" - * default_icon_attributes?: mixed, // Default attributes to add to all icons. // Default: {"fill":"currentColor"} + * icon_dir?: scalar|Param|null, // The local directory where icons are stored. // Default: "%kernel.project_dir%/assets/icons" + * default_icon_attributes?: array, * icon_sets?: array, + * path?: scalar|Param|null, // The local icon set directory path. (cannot be used with 'alias') + * alias?: scalar|Param|null, // The remote icon set identifier. (cannot be used with 'path') + * icon_attributes?: array, * }>, - * aliases?: list, + * aliases?: array, * iconify?: bool|array{ // Configuration for the remote icon service. * enabled?: bool|Param, // Default: true * on_demand?: bool|Param, // Whether to download icons "on demand". // Default: true - * endpoint?: scalar|null|Param, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design" + * endpoint?: scalar|Param|null, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design" * }, * ignore_not_found?: bool|Param, // Ignore error when an icon is not found. Set to 'true' to fail silently. // Default: false * } * @psalm-type WhiteOctoberPagerfantaConfig = array{ // Deprecated: The "white_october_pagerfanta" configuration node is deprecated, migrate your configuration to the "babdev_pagerfanta" configuration node. * exceptions_strategy?: array{ - * out_of_range_page?: scalar|null|Param, // Default: "to_http_not_found" - * not_valid_current_page?: scalar|null|Param, // Default: "to_http_not_found" + * out_of_range_page?: scalar|Param|null, // Default: "to_http_not_found" + * not_valid_current_page?: scalar|Param|null, // Default: "to_http_not_found" * }, - * default_view?: scalar|null|Param, // Default: "default" + * default_view?: scalar|Param|null, // Default: "default" * } * @psalm-type ConfigType = array{ * imports?: ImportsConfig, @@ -1498,8 +1510,6 @@ * sylius_twig_hooks?: SyliusTwigHooksConfig, * sylius_twig_extra?: SyliusTwigExtraConfig, * sylius_admin_ui?: SyliusAdminUiConfig, - * sylius_ui_translations?: SyliusUiTranslationsConfig, - * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, * live_component?: LiveComponentConfig, * stimulus?: StimulusConfig, * doctrine?: DoctrineConfig, @@ -1521,8 +1531,6 @@ * sylius_twig_hooks?: SyliusTwigHooksConfig, * sylius_twig_extra?: SyliusTwigExtraConfig, * sylius_admin_ui?: SyliusAdminUiConfig, - * sylius_ui_translations?: SyliusUiTranslationsConfig, - * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, * web_profiler?: WebProfilerConfig, * debug?: DebugConfig, * live_component?: LiveComponentConfig, @@ -1548,8 +1556,6 @@ * sylius_twig_hooks?: SyliusTwigHooksConfig, * sylius_twig_extra?: SyliusTwigExtraConfig, * sylius_admin_ui?: SyliusAdminUiConfig, - * sylius_ui_translations?: SyliusUiTranslationsConfig, - * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, * live_component?: LiveComponentConfig, * stimulus?: StimulusConfig, * doctrine?: DoctrineConfig, @@ -1571,8 +1577,6 @@ * sylius_twig_hooks?: SyliusTwigHooksConfig, * sylius_twig_extra?: SyliusTwigExtraConfig, * sylius_admin_ui?: SyliusAdminUiConfig, - * sylius_ui_translations?: SyliusUiTranslationsConfig, - * sylius_bootstrap_admin_ui?: SyliusBootstrapAdminUiConfig, * web_profiler?: WebProfilerConfig, * live_component?: LiveComponentConfig, * stimulus?: StimulusConfig, diff --git a/src/BootstrapAdminUi/config/app/grid/templates.php b/src/BootstrapAdminUi/config/app/grid/templates.php index 5e9a15b11..a10ef3591 100644 --- a/src/BootstrapAdminUi/config/app/grid/templates.php +++ b/src/BootstrapAdminUi/config/app/grid/templates.php @@ -32,6 +32,7 @@ 'exists' => '@SyliusBootstrapAdminUi/shared/grid/filter/exists.html.twig', 'select' => '@SyliusBootstrapAdminUi/shared/grid/filter/select.html.twig', 'string' => '@SyliusBootstrapAdminUi/shared/grid/filter/string.html.twig', + 'enum' => '@SyliusBootstrapAdminUi/shared/grid/filter/enum.html.twig', ], ], ]); diff --git a/src/BootstrapAdminUi/templates/shared/grid/filter/enum.html.twig b/src/BootstrapAdminUi/templates/shared/grid/filter/enum.html.twig new file mode 100644 index 000000000..d308c68b0 --- /dev/null +++ b/src/BootstrapAdminUi/templates/shared/grid/filter/enum.html.twig @@ -0,0 +1,3 @@ +{% form_theme form '@SyliusBootstrapAdminUi/shared/form_theme.html.twig' %} + +{{ form_row(form, { 'label': filter.label}) }} diff --git a/templates/book/show/content/page_body.html.twig b/templates/book/show/content/page_body.html.twig index ce6eb7c4a..ab63bc931 100644 --- a/templates/book/show/content/page_body.html.twig +++ b/templates/book/show/content/page_body.html.twig @@ -4,8 +4,14 @@
- {{ 'app.ui.author'|trans }}: - {{ book.authorName }} + +

+ {{ 'app.ui.author'|trans }}: {{ book.authorName }} +

+

+ {{ 'app.ui.category'|trans }}: + {{ book.category.value }} +

diff --git a/tests/Functional/BookTest.php b/tests/Functional/BookTest.php index 2edf8a13c..3577bbb73 100644 --- a/tests/Functional/BookTest.php +++ b/tests/Functional/BookTest.php @@ -59,12 +59,14 @@ public function testBrowsingBooks(): void BookFactory::new() ->withTitle('The Shining') ->withAuthorName('Stephen King') + ->withCategory('horror') ->create() ; BookFactory::new() ->withTitle('Carrie') ->withAuthorName('Stephen King') + ->withCategory('horror') ->create() ; @@ -82,17 +84,20 @@ public function testBrowsingBooks(): void // Validate Table header self::assertSelectorTextContains('.sylius-table-column-title', 'Title'); self::assertSelectorTextContains('.sylius-table-column-authorName', 'Author name'); + self::assertSelectorTextContains('.sylius-table-column-authorName', 'Category'); self::assertSelectorTextContains('.sylius-table-column-actions', 'Actions'); // Validate Table data self::assertSelectorTextContains('tr.item:first-child', 'Carrie'); self::assertSelectorTextContains('tr.item:first-child', 'Stephen King'); + self::assertSelectorTextContains('tr.item:first-child', 'horror'); self::assertSelectorExists('tr.item:first-child [data-bs-title=Show]'); self::assertSelectorExists('tr.item:first-child [data-bs-title=Edit]'); self::assertSelectorExists('tr.item:first-child [data-bs-title=Delete]'); self::assertSelectorTextContains('tr.item:last-child', 'The Shining'); self::assertSelectorTextContains('tr.item:last-child', 'Stephen King'); + self::assertSelectorTextContains('tr.item:last-child', 'horror'); self::assertSelectorExists('tr.item:last-child [data-bs-title=Show]'); self::assertSelectorExists('tr.item:last-child [data-bs-title=Edit]'); self::assertSelectorExists('tr.item:last-child [data-bs-title=Delete]'); diff --git a/translations/messages.de.yaml b/translations/messages.de.yaml index 5e8a37503..8b27f63ff 100644 --- a/translations/messages.de.yaml +++ b/translations/messages.de.yaml @@ -8,6 +8,7 @@ app: book: Buch books: Bücher browsing_speakers: Referenten durchsuchen + category: Kategorie company_name: Firmenname conference: Konferenz conferences: Konferenzen diff --git a/translations/messages.de_AT.yaml b/translations/messages.de_AT.yaml index 5e8a37503..8b27f63ff 100644 --- a/translations/messages.de_AT.yaml +++ b/translations/messages.de_AT.yaml @@ -8,6 +8,7 @@ app: book: Buch books: Bücher browsing_speakers: Referenten durchsuchen + category: Kategorie company_name: Firmenname conference: Konferenz conferences: Konferenzen diff --git a/translations/messages.de_CH.yaml b/translations/messages.de_CH.yaml index 5e8a37503..8b27f63ff 100644 --- a/translations/messages.de_CH.yaml +++ b/translations/messages.de_CH.yaml @@ -8,6 +8,7 @@ app: book: Buch books: Bücher browsing_speakers: Referenten durchsuchen + category: Kategorie company_name: Firmenname conference: Konferenz conferences: Konferenzen diff --git a/translations/messages.en.yaml b/translations/messages.en.yaml index 4ec6efa9f..618d27492 100644 --- a/translations/messages.en.yaml +++ b/translations/messages.en.yaml @@ -8,6 +8,7 @@ app: book: Book books: Books browsing_speakers: Browsing speakers + category: Category company_name: Company name conference: Conference conferences: Conferences diff --git a/translations/messages.fr.yaml b/translations/messages.fr.yaml index 7075c7c7e..45fb2e5d7 100644 --- a/translations/messages.fr.yaml +++ b/translations/messages.fr.yaml @@ -8,6 +8,7 @@ app: book: Livre books: Livres browsing_speakers: Parcourir les Conférencier-e-s + category: Catégorie company_name: Société conference: Conférence conferences: Conférences