added db to symfony

This commit is contained in:
Joren de Graaf
2026-07-25 22:06:43 +02:00
parent 11dca5a8e4
commit 919ef80e19
34 changed files with 4210 additions and 9 deletions
+6
View File
@@ -2,4 +2,10 @@
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
];
+46
View File
@@ -0,0 +1,46 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '16'
profiling_collect_backtrace: '%kernel.debug%'
orm:
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore
identity_generation_preferences:
Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
auto_mapping: true
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
orm:
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
+6
View File
@@ -0,0 +1,6 @@
doctrine_migrations:
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/migrations'
enable_profiler: false
+3
View File
@@ -0,0 +1,3 @@
framework:
property_info:
with_constructor_extractor: true
+54
View File
@@ -0,0 +1,54 @@
security:
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
providers:
# used to reload user from session & other features (e.g. switch_user)
app_user_provider:
entity:
class: App\Entity\User
property: email
firewalls:
dev:
# Ensure dev tools and static assets are always allowed
pattern: ^/(_profiler|_wdt|assets|build)/
security: false
main:
lazy: true
provider: app_user_provider
form_login:
login_path: app_login
check_path: app_login
enable_csrf: true
logout:
path: app_logout
# where to redirect after logout
# target: app_any_route
# Activate different ways to authenticate:
# https://symfony.com/doc/current/security.html#the-firewall
# https://symfony.com/doc/current/security/impersonating_user.html
# switch_user: true
# Note: Only the *first* matching rule is applied
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }
- { path: ^/login$, roles: PUBLIC_ACCESS }
- { path: ^/_profiler, roles: PUBLIC_ACCESS }
- { path: ^/_wdt, roles: PUBLIC_ACCESS }
- { path: ^/, roles: ROLE_USER }
when@test:
security:
password_hashers:
# Password hashers are resource-intensive by design to ensure security.
# In tests, it's safe to reduce their cost to improve performance.
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
algorithm: auto
cost: 4 # Lowest possible value for bcrypt
time_cost: 3 # Lowest possible value for argon
memory_cost: 10 # Lowest possible value for argon
+6
View File
@@ -0,0 +1,6 @@
twig:
file_name_pattern: '*.twig'
when@test:
twig:
strict_variables: true
+11
View File
@@ -0,0 +1,11 @@
when@dev:
web_profiler:
toolbar: true
framework:
profiler: true
when@test:
framework:
profiler:
collect: false
+584 -3
View File
@@ -369,7 +369,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* }>,
* },
* property_access?: bool|array{ // Property access configuration
* enabled?: bool|Param, // Default: false
* enabled?: bool|Param, // Default: true
* magic_call?: bool|Param, // Default: false
* magic_get?: bool|Param, // Default: true
* magic_set?: bool|Param, // Default: true
@@ -377,11 +377,11 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* throw_exception_on_invalid_property_path?: bool|Param, // Default: true
* },
* type_info?: bool|array{ // Type info configuration
* enabled?: bool|Param, // Default: false
* enabled?: bool|Param, // Default: true
* aliases?: array<string, scalar|Param|null>,
* },
* property_info?: bool|array{ // Property info configuration
* enabled?: bool|Param, // Default: false
* enabled?: bool|Param, // Default: true
* with_constructor_extractor?: bool|Param, // Registers the constructor extractor. // Default: true
* },
* cache?: array{ // Cache configuration
@@ -701,28 +701,609 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* },
* },
* }
* @psalm-type DoctrineConfig = array{
* dbal?: array{
* default_connection?: scalar|Param|null,
* types?: array<string, string|array{ // Default: []
* class?: scalar|Param|null,
* }>,
* driver_schemes?: array<string, scalar|Param|null>,
* connections?: array<string, array{ // Default: []
* url?: scalar|Param|null, // A URL with connection information; any parameter value parsed from this string will override explicitly set parameters
* dbname?: scalar|Param|null,
* host?: scalar|Param|null, // Defaults to "localhost" at runtime.
* port?: scalar|Param|null, // Defaults to null at runtime.
* user?: scalar|Param|null, // Defaults to "root" at runtime.
* password?: scalar|Param|null, // Defaults to null at runtime.
* dbname_suffix?: scalar|Param|null, // Adds the given suffix to the configured database name, this option has no effects for the SQLite platform
* application_name?: scalar|Param|null,
* charset?: scalar|Param|null,
* path?: scalar|Param|null,
* memory?: bool|Param,
* unix_socket?: scalar|Param|null, // The unix socket to use for MySQL
* persistent?: bool|Param, // True to use as persistent connection for the ibm_db2 driver
* protocol?: scalar|Param|null, // The protocol to use for the ibm_db2 driver (default to TCPIP if omitted)
* service?: bool|Param, // True to use SERVICE_NAME as connection parameter instead of SID for Oracle
* servicename?: scalar|Param|null, // Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter for Oracle depending on the service parameter.
* sessionMode?: scalar|Param|null, // The session mode to use for the oci8 driver
* server?: scalar|Param|null, // The name of a running database server to connect to for SQL Anywhere.
* default_dbname?: scalar|Param|null, // Override the default database (postgres) to connect to for PostgreSQL connection.
* sslmode?: scalar|Param|null, // Determines whether or with what priority a SSL TCP/IP connection will be negotiated with the server for PostgreSQL.
* sslrootcert?: scalar|Param|null, // The name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities.
* sslcert?: scalar|Param|null, // The path to the SSL client certificate file for PostgreSQL.
* sslkey?: scalar|Param|null, // The path to the SSL client key file for PostgreSQL.
* sslcrl?: scalar|Param|null, // The file name of the SSL certificate revocation list for PostgreSQL.
* pooled?: bool|Param, // True to use a pooled server with the oci8/pdo_oracle driver
* MultipleActiveResultSets?: bool|Param, // Configuring MultipleActiveResultSets for the pdo_sqlsrv driver
* instancename?: scalar|Param|null, // Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection. It is generally used to connect to an Oracle RAC server to select the name of a particular instance.
* connectstring?: scalar|Param|null, // Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.When using this option, you will still need to provide the user and password parameters, but the other parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods from Doctrine\DBAL\Connection will no longer function as expected.
* driver?: scalar|Param|null, // Default: "pdo_mysql"
* auto_commit?: bool|Param,
* schema_filter?: scalar|Param|null,
* logging?: bool|Param, // Default: true
* profiling?: bool|Param, // Default: true
* profiling_collect_backtrace?: bool|Param, // Enables collecting backtraces when profiling is enabled // Default: false
* profiling_collect_schema_errors?: bool|Param, // Enables collecting schema errors when profiling is enabled // Default: true
* server_version?: scalar|Param|null,
* idle_connection_ttl?: int|Param, // Default: 600
* driver_class?: scalar|Param|null,
* wrapper_class?: scalar|Param|null,
* keep_replica?: bool|Param,
* options?: array<string, mixed>,
* mapping_types?: array<string, scalar|Param|null>,
* default_table_options?: array<string, scalar|Param|null>,
* schema_manager_factory?: scalar|Param|null, // Default: "doctrine.dbal.default_schema_manager_factory"
* result_cache?: scalar|Param|null,
* replicas?: array<string, array{ // Default: []
* url?: scalar|Param|null, // A URL with connection information; any parameter value parsed from this string will override explicitly set parameters
* dbname?: scalar|Param|null,
* host?: scalar|Param|null, // Defaults to "localhost" at runtime.
* port?: scalar|Param|null, // Defaults to null at runtime.
* user?: scalar|Param|null, // Defaults to "root" at runtime.
* password?: scalar|Param|null, // Defaults to null at runtime.
* dbname_suffix?: scalar|Param|null, // Adds the given suffix to the configured database name, this option has no effects for the SQLite platform
* application_name?: scalar|Param|null,
* charset?: scalar|Param|null,
* path?: scalar|Param|null,
* memory?: bool|Param,
* unix_socket?: scalar|Param|null, // The unix socket to use for MySQL
* persistent?: bool|Param, // True to use as persistent connection for the ibm_db2 driver
* protocol?: scalar|Param|null, // The protocol to use for the ibm_db2 driver (default to TCPIP if omitted)
* service?: bool|Param, // True to use SERVICE_NAME as connection parameter instead of SID for Oracle
* servicename?: scalar|Param|null, // Overrules dbname parameter if given and used as SERVICE_NAME or SID connection parameter for Oracle depending on the service parameter.
* sessionMode?: scalar|Param|null, // The session mode to use for the oci8 driver
* server?: scalar|Param|null, // The name of a running database server to connect to for SQL Anywhere.
* default_dbname?: scalar|Param|null, // Override the default database (postgres) to connect to for PostgreSQL connection.
* sslmode?: scalar|Param|null, // Determines whether or with what priority a SSL TCP/IP connection will be negotiated with the server for PostgreSQL.
* sslrootcert?: scalar|Param|null, // The name of a file containing SSL certificate authority (CA) certificate(s). If the file exists, the server's certificate will be verified to be signed by one of these authorities.
* sslcert?: scalar|Param|null, // The path to the SSL client certificate file for PostgreSQL.
* sslkey?: scalar|Param|null, // The path to the SSL client key file for PostgreSQL.
* sslcrl?: scalar|Param|null, // The file name of the SSL certificate revocation list for PostgreSQL.
* pooled?: bool|Param, // True to use a pooled server with the oci8/pdo_oracle driver
* MultipleActiveResultSets?: bool|Param, // Configuring MultipleActiveResultSets for the pdo_sqlsrv driver
* instancename?: scalar|Param|null, // Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection. It is generally used to connect to an Oracle RAC server to select the name of a particular instance.
* connectstring?: scalar|Param|null, // Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.When using this option, you will still need to provide the user and password parameters, but the other parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods from Doctrine\DBAL\Connection will no longer function as expected.
* }>,
* }>,
* },
* orm?: array{
* 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
* auto_mapping?: bool|Param, // Deprecated: The "doctrine.orm.controller_resolver.auto_mapping.auto_mapping" option is deprecated and will be removed in DoctrineBundle 4.0, as it only accepts `false` since 3.0. // Set to true to enable using route placeholders as lookup criteria when the primary key doesn't match the argument name // Default: false
* evict_cache?: bool|Param, // Set to true to fetch the entity from the database instead of using the cache, if any // Default: false
* },
* entity_managers?: array<string, array{ // Default: []
* query_cache_driver?: string|array{
* type?: scalar|Param|null, // Default: null
* id?: scalar|Param|null,
* pool?: scalar|Param|null,
* },
* metadata_cache_driver?: string|array{
* type?: scalar|Param|null, // Default: null
* id?: scalar|Param|null,
* pool?: scalar|Param|null,
* },
* result_cache_driver?: string|array{
* type?: scalar|Param|null, // Default: null
* id?: scalar|Param|null,
* pool?: scalar|Param|null,
* },
* entity_listeners?: array{
* entities?: array<string, array{ // Default: []
* listeners?: array<string, array{ // Default: []
* events?: list<array{ // Default: []
* type?: scalar|Param|null,
* method?: scalar|Param|null, // Default: null
* }>,
* }>,
* }>,
* },
* 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<scalar|Param|null>,
* validate_xml_mapping?: bool|Param, // Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728. // Default: false
* second_level_cache?: array{
* region_cache_driver?: string|array{
* type?: scalar|Param|null, // Default: null
* id?: scalar|Param|null,
* pool?: scalar|Param|null,
* },
* region_lock_lifetime?: scalar|Param|null, // Default: 60
* log_enabled?: bool|Param, // Default: true
* region_lifetime?: scalar|Param|null, // Default: 3600
* enabled?: bool|Param, // Default: true
* factory?: scalar|Param|null,
* regions?: array<string, array{ // Default: []
* cache_driver?: string|array{
* type?: scalar|Param|null, // Default: null
* id?: scalar|Param|null,
* pool?: scalar|Param|null,
* },
* lock_path?: scalar|Param|null, // Default: "%kernel.cache_dir%/doctrine/orm/slc/filelock"
* lock_lifetime?: scalar|Param|null, // Default: 60
* type?: scalar|Param|null, // Default: "default"
* lifetime?: scalar|Param|null, // Default: null
* service?: scalar|Param|null,
* name?: scalar|Param|null,
* }>,
* loggers?: array<string, array{ // Default: []
* name?: scalar|Param|null,
* service?: scalar|Param|null,
* }>,
* },
* hydrators?: array<string, scalar|Param|null>,
* mappings?: array<string, bool|string|array{ // Default: []
* mapping?: scalar|Param|null, // Default: true
* type?: scalar|Param|null,
* dir?: scalar|Param|null,
* alias?: scalar|Param|null,
* prefix?: scalar|Param|null,
* is_bundle?: bool|Param,
* }>,
* dql?: array{
* string_functions?: array<string, scalar|Param|null>,
* numeric_functions?: array<string, scalar|Param|null>,
* datetime_functions?: array<string, scalar|Param|null>,
* },
* filters?: array<string, string|array{ // Default: []
* class?: scalar|Param|null,
* enabled?: bool|Param, // Default: false
* parameters?: array<string, mixed>,
* }>,
* identity_generation_preferences?: array<string, scalar|Param|null>,
* }>,
* resolve_target_entities?: array<string, scalar|Param|null>,
* },
* }
* @psalm-type DoctrineMigrationsConfig = array{
* enable_service_migrations?: bool|Param, // Whether to enable fetching migrations from the service container. // Default: false
* migrations_paths?: array<string, scalar|Param|null>,
* services?: array<string, scalar|Param|null>,
* factories?: array<string, scalar|Param|null>,
* storage?: array{ // Storage to use for migration status metadata.
* table_storage?: array{ // The default metadata storage, implemented as a table in the database.
* table_name?: scalar|Param|null, // Default: null
* version_column_name?: scalar|Param|null, // Default: null
* version_column_length?: scalar|Param|null, // Default: null
* executed_at_column_name?: scalar|Param|null, // Default: null
* execution_time_column_name?: scalar|Param|null, // Default: null
* },
* },
* migrations?: list<scalar|Param|null>,
* connection?: scalar|Param|null, // Connection name to use for the migrations database. // Default: null
* em?: scalar|Param|null, // Entity manager name to use for the migrations database (available when doctrine/orm is installed). // Default: null
* all_or_nothing?: scalar|Param|null, // Run all migrations in a transaction. // Default: false
* check_database_platform?: scalar|Param|null, // Adds an extra check in the generated migrations to allow execution only on the same platform as they were initially generated on. // Default: true
* custom_template?: scalar|Param|null, // Custom template path for generated migration classes. // Default: null
* organize_migrations?: scalar|Param|null, // Organize migrations mode. Possible values are: "BY_YEAR", "BY_YEAR_AND_MONTH", false // Default: false
* enable_profiler?: bool|Param, // Whether or not to enable the profiler collector to calculate and visualize migration status. This adds some queries overhead. // Default: false
* transactional?: bool|Param, // Whether or not to wrap migrations in a single transaction. // Default: true
* }
* @psalm-type MakerConfig = array{
* 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|Param|null, // Default: null
* session_fixation_strategy?: "none"|"migrate"|"invalidate"|Param, // Default: "migrate"
* expose_security_errors?: \Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::None|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::AccountStatus|\Symfony\Component\Security\Http\Authentication\ExposeSecurityLevel::All|Param, // Default: "none"
* erase_credentials?: bool|Param, // Deprecated: Setting the "security.erase_credentials.erase_credentials" configuration option is deprecated. It will be removed in Symfony 9.0, as the "eraseCredentials()" method was removed in Symfony 8.0. // Default: true
* access_decision_manager?: array{
* strategy?: "affirmative"|"consensus"|"unanimous"|"priority"|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<string, string|array{ // Default: []
* algorithm?: scalar|Param|null,
* migrate_from?: string|list<scalar|Param|null>,
* 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|Param|null, // Default: 5000
* cost?: int|Param, // Default: null
* memory_cost?: scalar|Param|null, // Default: null
* time_cost?: scalar|Param|null, // Default: null
* id?: scalar|Param|null,
* }>,
* providers?: array<string, array{ // Default: []
* id?: scalar|Param|null,
* chain?: array{
* providers?: string|list<scalar|Param|null>,
* },
* entity?: array{
* 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<string, array{ // Default: []
* password?: scalar|Param|null, // Default: null
* roles?: string|list<scalar|Param|null>,
* }>,
* },
* ldap?: array{
* 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<scalar|Param|null>,
* default_roles?: string|list<scalar|Param|null>,
* 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<string, array{ // Default: []
* pattern?: scalar|Param|null,
* host?: scalar|Param|null,
* methods?: string|list<scalar|Param|null>,
* security?: bool|Param, // Default: true
* 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|Param|null,
* logout?: array{
* 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?: string|list<"*"|"cache"|"cookies"|"storage"|"clientHints"|"executionContexts"|"prefetchCache"|"prerenderCache"|Param>,
* delete_cookies?: string|array<string, array{ // Default: []
* path?: scalar|Param|null, // Default: null
* domain?: scalar|Param|null, // Default: null
* secure?: scalar|Param|null, // Default: false
* samesite?: scalar|Param|null, // Default: null
* partitioned?: scalar|Param|null, // Default: false
* }>,
* },
* switch_user?: array{
* 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<scalar|Param|null>,
* custom_authenticators?: list<scalar|Param|null>,
* login_throttling?: array{
* limiter?: scalar|Param|null, // A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface".
* max_attempts?: int|Param, // Default: 5
* 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|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|Param|null,
* user?: scalar|Param|null, // Default: "REMOTE_USER"
* },
* login_link?: array{
* 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<scalar|Param|null>,
* 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|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|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|Param|null, // Default: null
* failure_forward?: bool|Param, // Default: false
* failure_path_parameter?: scalar|Param|null, // Default: "_failure_path"
* },
* form_login?: array{
* provider?: scalar|Param|null,
* remember_me?: bool|Param, // Default: true
* 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|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|Param|null, // Default: "/"
* target_path_parameter?: scalar|Param|null, // Default: "_target_path"
* use_referer?: bool|Param, // Default: false
* failure_path?: scalar|Param|null, // Default: null
* failure_forward?: bool|Param, // Default: false
* failure_path_parameter?: scalar|Param|null, // Default: "_failure_path"
* },
* form_login_ldap?: array{
* provider?: scalar|Param|null,
* remember_me?: bool|Param, // Default: true
* 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|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|Param|null, // Default: "/"
* target_path_parameter?: scalar|Param|null, // Default: "_target_path"
* use_referer?: bool|Param, // Default: false
* failure_path?: scalar|Param|null, // Default: null
* failure_forward?: bool|Param, // Default: false
* 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|Param|null,
* remember_me?: bool|Param, // Default: true
* 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|Param|null, // Default: "/login"
* username_path?: scalar|Param|null, // Default: "username"
* password_path?: scalar|Param|null, // Default: "password"
* },
* json_login_ldap?: array{
* provider?: scalar|Param|null,
* remember_me?: bool|Param, // Default: true
* 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|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|Param|null,
* remember_me?: bool|Param, // Default: true
* success_handler?: scalar|Param|null,
* failure_handler?: scalar|Param|null,
* realm?: scalar|Param|null, // Default: null
* token_extractors?: string|list<scalar|Param|null>,
* token_handler?: string|array{
* id?: scalar|Param|null,
* oidc_user_info?: string|array{
* 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|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
* },
* },
* 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?: string|list<scalar|Param|null>,
* cache?: array{
* id?: scalar|Param|null, // Cache service id to use to cache the OIDC discovery configuration.
* },
* enforce_key_usage_verification?: bool|Param, // When enabled (default), only keys explicitly designated for signature (via "use":"sig" or a "key_ops" entry containing "sign"/"verify") are accepted. When disabled, keys without any usage designation are also accepted; keys explicitly restricted to encryption are still rejected. // Default: true
* },
* 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<scalar|Param|null>,
* algorithms?: list<scalar|Param|null>,
* 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<scalar|Param|null>,
* 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|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|Param|null,
* },
* },
* http_basic?: array{
* provider?: scalar|Param|null,
* realm?: scalar|Param|null, // Default: "Secured Area"
* },
* http_basic_ldap?: array{
* 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|Param|null, // Default: "%kernel.secret%"
* service?: scalar|Param|null,
* user_providers?: string|list<scalar|Param|null>,
* catch_exceptions?: bool|Param, // Default: true
* signature_properties?: list<scalar|Param|null>,
* token_provider?: string|array{
* service?: scalar|Param|null, // The service ID of a custom remember-me token provider.
* doctrine?: bool|array{
* enabled?: bool|Param, // Default: false
* connection?: scalar|Param|null, // Default: null
* },
* },
* 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|Param|null, // Default: "/"
* domain?: scalar|Param|null, // Default: null
* secure?: true|false|"auto"|Param, // Default: false
* httponly?: bool|Param, // Default: true
* samesite?: null|"lax"|"strict"|"none"|Param, // Default: null
* always_remember_me?: bool|Param, // Default: false
* remember_me_parameter?: scalar|Param|null, // Default: "_remember_me"
* },
* }>,
* access_control?: list<array{ // Default: []
* request_matcher?: scalar|Param|null, // Default: null
* requires_channel?: scalar|Param|null, // Default: null
* path?: scalar|Param|null, // Use the urldecoded format. // Default: null
* host?: scalar|Param|null, // Default: null
* port?: int|Param, // Default: null
* ips?: string|list<scalar|Param|null>,
* attributes?: array<string, scalar|Param|null>,
* route?: scalar|Param|null, // Default: null
* methods?: string|list<scalar|Param|null>,
* allow_if?: scalar|Param|null, // Default: null
* roles?: string|list<scalar|Param|null>,
* }>,
* role_hierarchy?: array<string, string|list<scalar|Param|null>>,
* }
* @psalm-type TwigConfig = array{
* form_themes?: list<scalar|Param|null>,
* globals?: array<string, array{ // Default: []
* id?: scalar|Param|null,
* type?: scalar|Param|null,
* value?: mixed,
* }>,
* autoescape_service?: scalar|Param|null, // Default: null
* autoescape_service_method?: scalar|Param|null, // Default: null
* 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|Param|null,
* optimizations?: int|Param,
* default_path?: scalar|Param|null, // The default path used to load templates. // Default: "%kernel.project_dir%/templates"
* file_name_pattern?: string|list<scalar|Param|null>,
* paths?: array<string, mixed>,
* date?: array{ // The default format options used by the date filter.
* 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|Param|null, // Default: "."
* thousands_separator?: scalar|Param|null, // Default: ","
* },
* mailer?: array{
* html_to_text_converter?: scalar|Param|null, // A service implementing the "Symfony\Component\Mime\HtmlToTextConverter\HtmlToTextConverterInterface". // Default: null
* },
* }
* @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|Param|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt"
* }
* @psalm-type ConfigType = array{
* imports?: ImportsConfig,
* parameters?: ParametersConfig,
* services?: ServicesConfig,
* framework?: FrameworkConfig,
* doctrine?: DoctrineConfig,
* doctrine_migrations?: DoctrineMigrationsConfig,
* security?: SecurityConfig,
* twig?: TwigConfig,
* "when@dev"?: array{
* imports?: ImportsConfig,
* parameters?: ParametersConfig,
* services?: ServicesConfig,
* framework?: FrameworkConfig,
* doctrine?: DoctrineConfig,
* doctrine_migrations?: DoctrineMigrationsConfig,
* maker?: MakerConfig,
* security?: SecurityConfig,
* twig?: TwigConfig,
* web_profiler?: WebProfilerConfig,
* },
* "when@prod"?: array{
* imports?: ImportsConfig,
* parameters?: ParametersConfig,
* services?: ServicesConfig,
* framework?: FrameworkConfig,
* doctrine?: DoctrineConfig,
* doctrine_migrations?: DoctrineMigrationsConfig,
* security?: SecurityConfig,
* twig?: TwigConfig,
* },
* "when@test"?: array{
* imports?: ImportsConfig,
* parameters?: ParametersConfig,
* services?: ServicesConfig,
* framework?: FrameworkConfig,
* doctrine?: DoctrineConfig,
* doctrine_migrations?: DoctrineMigrationsConfig,
* security?: SecurityConfig,
* twig?: TwigConfig,
* web_profiler?: WebProfilerConfig,
* },
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
* imports?: ImportsConfig,
+3
View File
@@ -0,0 +1,3 @@
_security_logout:
resource: security.route_loader.logout
type: service
+8
View File
@@ -0,0 +1,8 @@
when@dev:
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
prefix: /_profiler