From 91ff414b58e50b07fb461d63e32f8ef7e5eea4b1 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Mon, 23 Apr 2012 08:27:28 -0400 Subject: [PATCH 1/2] updated configuration reference --- reference/configuration/assetic.rst | 14 +- reference/configuration/doctrine.rst | 186 +++++++++++++++----- reference/configuration/framework.rst | 44 ++++- reference/configuration/monolog.rst | 12 +- reference/configuration/security.rst | 211 +++++++++++------------ reference/configuration/swiftmailer.rst | 2 +- reference/configuration/twig.rst | 5 +- reference/configuration/web_profiler.rst | 13 +- 8 files changed, 305 insertions(+), 182 deletions(-) diff --git a/reference/configuration/assetic.rst b/reference/configuration/assetic.rst index 107542713af..3387e15b107 100644 --- a/reference/configuration/assetic.rst +++ b/reference/configuration/assetic.rst @@ -12,13 +12,20 @@ Full Default Configuration .. code-block:: yaml assetic: - debug: true - use_controller: true + debug: %kernel.debug% + use_controller: + enabled: %kernel.debug% + profiler: false read_from: %kernel.root_dir%/../web write_to: %assetic.read_from% java: /usr/bin/java node: /usr/bin/node + ruby: /usr/bin/ruby sass: /usr/bin/sass + variables: + + # Prototype + name: [] bundles: # Defaults (all currently registered bundles): @@ -30,7 +37,6 @@ Full Default Configuration - DoctrineBundle - AsseticBundle - ... - assets: # Prototype @@ -49,4 +55,4 @@ Full Default Configuration functions: # Prototype - name: [] + name: [] \ No newline at end of file diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index b27d0852453..f1ef4689956 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -11,63 +11,159 @@ Configuration Reference doctrine: dbal: - default_connection: default + default_connection: ~ + types: + + # Prototype + name: + class: ~ # Required + commented: true connections: - default: - dbname: database + + # Prototype + name: + dbname: ~ host: localhost - port: 1234 - user: user - password: secret + port: ~ + user: root + password: ~ + charset: ~ + path: ~ + memory: ~ + + # The unix socket to use for MySQL + unix_socket: ~ + + # True to use as persistent connection for the ibm_db2 driver + persistent: ~ + + # The protocol to use for the ibm_db2 driver (default to TCPIP if ommited) + protocol: ~ + + # True to use dbname as service name instead of SID for Oracle + service: ~ + + # The session mode to use for the oci8 driver + sessionMode: ~ + + # True to use a pooled server with the oci8 driver + pooled: ~ + + # Configuring MultipleActiveResultSets for the pdo_sqlsrv driver + MultipleActiveResultSets: ~ driver: pdo_mysql - driver_class: MyNamespace\MyDriverImpl + platform_service: ~ + logging: true + profiling: true + driver_class: ~ + wrapper_class: ~ options: - foo: bar - path: %kernel.data_dir%/data.sqlite - memory: true - unix_socket: /tmp/mysql.sock - wrapper_class: MyDoctrineDbalConnectionWrapper - charset: UTF8 - logging: %kernel.debug% - platform_service: MyOwnDatabasePlatformService + + # Prototype + key: [] mapping_types: - enum: string - conn1: - # ... - types: - custom: Acme\HelloBundle\MyCustomType + + # Prototype + name: [] + slaves: + + # Prototype + name: + dbname: ~ + host: localhost + port: ~ + user: root + password: ~ + charset: ~ + path: ~ + memory: ~ + + # The unix socket to use for MySQL + unix_socket: ~ + + # True to use as persistent connection for the ibm_db2 driver + persistent: ~ + + # The protocol to use for the ibm_db2 driver (default to TCPIP if ommited) + protocol: ~ + + # True to use dbname as service name instead of SID for Oracle + service: ~ + + # The session mode to use for the oci8 driver + sessionMode: ~ + + # True to use a pooled server with the oci8 driver + pooled: ~ + + # Configuring MultipleActiveResultSets for the pdo_sqlsrv driver + MultipleActiveResultSets: ~ orm: - auto_generate_proxy_classes: false - proxy_namespace: Proxies - proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies - default_entity_manager: default # The first defined is used if not set + default_entity_manager: ~ + auto_generate_proxy_classes: false + proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies + proxy_namespace: Proxies entity_managers: - default: - # The name of a DBAL connection (the one marked as default is used if not set) - connection: conn1 - mappings: # Required - AcmeHelloBundle: ~ - class_metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory - # All cache drivers have to be array, apc, xcache or memcache - metadata_cache_driver: array - query_cache_driver: array + + # Prototype + name: + query_cache_driver: + type: array # Required + host: ~ + port: ~ + instance_class: ~ + class: ~ + metadata_cache_driver: + type: array # Required + host: ~ + port: ~ + instance_class: ~ + class: ~ result_cache_driver: - type: memcache - host: localhost - port: 11211 - instance_class: Memcache - class: Doctrine\Common\Cache\MemcacheCache + type: array # Required + host: ~ + port: ~ + instance_class: ~ + class: ~ + connection: ~ + class_metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory + default_repository_class: Doctrine\ORM\EntityRepository + auto_mapping: false + hydrators: + + # Prototype + name: [] + mappings: + + # Prototype + name: + mapping: true + type: ~ + dir: ~ + alias: ~ + prefix: ~ + is_bundle: ~ dql: string_functions: - test_string: Acme\HelloBundle\DQL\StringFunction + + # Prototype + name: [] numeric_functions: - test_numeric: Acme\HelloBundle\DQL\NumericFunction + + # Prototype + name: [] datetime_functions: - test_datetime: Acme\HelloBundle\DQL\DatetimeFunction - hydrators: - custom: Acme\HelloBundle\Hydrators\CustomHydrator - em2: - # ... + + # Prototype + name: [] + + # Register SQL Filters in the entity manager + filters: + + # Prototype + name: + class: ~ # Required + enabled: false .. code-block:: xml diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 5699218be04..a238254c269 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -246,11 +246,11 @@ Full Default Configuration # general configuration charset: ~ + trust_proxy_headers: false secret: ~ # Required ide: ~ test: ~ default_locale: en - trust_proxy_headers: false # form configuration form: @@ -267,13 +267,15 @@ Full Default Configuration profiler: only_exceptions: false only_master_requests: false - dsn: sqlite:%kernel.cache_dir%/profiler.db + dsn: file:%kernel.cache_dir%/profiler username: password: lifetime: 86400 matcher: ip: ~ - path: ~ + + # use the urldecoded format + path: ~ # Example: ^/path to resource/ service: ~ # router configuration @@ -285,26 +287,50 @@ Full Default Configuration # session configuration session: - auto_start: ~ + auto_start: false storage_id: session.storage.native + handler_id: session.handler.native_file name: ~ - lifetime: 0 + cookie_lifetime: ~ + cookie_path: ~ + cookie_domain: ~ + cookie_secure: ~ + cookie_httponly: ~ + gc_divisor: ~ + gc_probability: ~ + gc_maxlifetime: ~ + save_path: %kernel.cache_dir%/sessions + + # DEPRECATED! Please use: cookie_lifetime + lifetime: ~ + + # DEPRECATED! Please use: cookie_path path: ~ + + # DEPRECATED! Please use: cookie_domain domain: ~ + + # DEPRECATED! Please use: cookie_secure secure: ~ + + # DEPRECATED! Please use: cookie_httponly httponly: ~ # templating configuration templating: assets_version: ~ - assets_version_format: "%%s?%%s" + assets_version_format: %%s?%%s + hinclude_default_template: ~ + form: + resources: + + # Default: + - FrameworkBundle:Form assets_base_urls: http: [] ssl: [] cache: ~ engines: # Required - form: - resources: [FrameworkBundle:Form] # Example: - twig @@ -314,7 +340,7 @@ Full Default Configuration # Prototype name: version: ~ - version_format: ~ + version_format: %%s?%%s base_urls: http: [] ssl: [] diff --git a/reference/configuration/monolog.rst b/reference/configuration/monolog.rst index e700f6797ed..72d86096055 100644 --- a/reference/configuration/monolog.rst +++ b/reference/configuration/monolog.rst @@ -18,8 +18,10 @@ Configuration Reference level: ERROR bubble: false formatter: my_formatter + processors: + - some_callable main: - type: fingers_crossed + type: fingerscrossed action_level: WARNING buffer_size: 30 handler: custom @@ -39,6 +41,7 @@ Configuration Reference facility: user max_files: 0 action_level: WARNING + activation_strategy: ~ stop_buffering: true buffer_size: 0 handler: ~ @@ -47,8 +50,11 @@ Configuration Reference to_email: ~ subject: ~ email_prototype: - id: ~ # Required (when the email_prototype is used) - method: ~ + id: ~ # Required + factory-method: ~ + channels: + type: ~ + elements: [] formatter: ~ .. code-block:: xml diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 14f1b7a8da9..615d8965ec3 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -19,127 +19,118 @@ Each part will be explained in the next section. # app/config/security.yml security: - access_denied_url: /foo/error403 - - always_authenticate_before_granting: false - - # whether or not to call eraseCredentials on the token - erase_credentials: true + access_denied_url: ~ # Example: /foo/error403 # strategy can be: none, migrate, invalidate - session_fixation_strategy: migrate - + session_fixation_strategy: migrate + hide_user_not_found: true + always_authenticate_before_granting: false + erase_credentials: true access_decision_manager: - strategy: affirmative - allow_if_all_abstain: false - allow_if_equal_granted_denied: true - + strategy: affirmative + allow_if_all_abstain: false + allow_if_equal_granted_denied: true acl: - connection: default # any name configured in doctrine.dbal section - tables: - class: acl_classes - entry: acl_entries - object_identity: acl_object_identities - object_identity_ancestors: acl_object_identity_ancestors - security_identity: acl_security_identities + + # any name configured in doctrine.dbal section + connection: ~ cache: - id: service_id - prefix: sf2_acl_ + id: ~ + prefix: sf2_acl_ + provider: ~ + tables: + class: acl_classes + entry: acl_entries + object_identity: acl_object_identities + object_identity_ancestors: acl_object_identity_ancestors + security_identity: acl_security_identities voter: - allow_if_object_identity_unavailable: true - + allow_if_object_identity_unavailable: true encoders: - somename: - class: Acme\DemoBundle\Entity\User - Acme\DemoBundle\Entity\User: sha512 - Acme\DemoBundle\Entity\User: plaintext - Acme\DemoBundle\Entity\User: - algorithm: sha512 - encode_as_base64: true - iterations: 5000 - Acme\DemoBundle\Entity\User: - id: my.custom.encoder.service.id - - providers: - memory_provider_name: - memory: - users: - foo: { password: foo, roles: ROLE_USER } - bar: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } - entity_provider_name: - entity: { class: SecurityBundle:User, property: username } - - firewalls: - somename: - pattern: .* - request_matcher: some.service.id - access_denied_url: /foo/error403 - access_denied_handler: some.service.id - entry_point: some.service.id - provider: some_provider_key_from_above - context: name - stateless: false - x509: - provider: some_provider_key_from_above - http_basic: - provider: some_provider_key_from_above - http_digest: - provider: some_provider_key_from_above - form_login: - check_path: /login_check - login_path: /login - use_forward: false - always_use_default_target_path: false - default_target_path: / - target_path_parameter: _target_path - use_referer: false - failure_path: /foo - failure_forward: false - failure_handler: some.service.id - success_handler: some.service.id - username_parameter: _username - password_parameter: _password - csrf_parameter: _csrf_token - intention: authenticate - csrf_provider: my.csrf_provider.id - post_only: true - remember_me: false - remember_me: - token_provider: name - key: someS3cretKey - name: NameOfTheCookie - lifetime: 3600 # in seconds - path: /foo - domain: somedomain.foo - secure: true - httponly: true - always_remember_me: false - remember_me_parameter: _remember_me + + # Examples: + Acme\DemoBundle\Entity\User1: sha512 + Acme\DemoBundle\Entity\User2: + algorithm: sha512 + encode_as_base64: true + iterations: 5000 + + # Prototype + class: + algorithm: ~ + ignore_case: false + encode_as_base64: true + iterations: 5000 + id: ~ + providers: # Required + + # Examples: + memory: + name: memory + users: + foo: + password: foo + roles: ROLE_USER + bar: + password: bar + roles: [ROLE_USER, ROLE_ADMIN] + entity: + entity: + class: SecurityBundle:User + property: username + + # Prototype + name: + id: ~ + chain: + providers: [] + firewalls: # Required + + # Prototype + name: + pattern: ~ + security: true + request_matcher: ~ + access_denied_url: ~ + access_denied_handler: ~ + entry_point: ~ + provider: ~ + stateless: false + context: ~ logout: - path: /logout - target: / - invalidate_session: false + csrf_parameter: _csrf_token + csrf_provider: ~ + intention: logout + path: /logout + target: / + success_handler: ~ + invalidate_session: true delete_cookies: - a: { path: null, domain: null } - b: { path: null, domain: null } - handlers: [some.service.id, another.service.id] - success_handler: some.service.id - anonymous: ~ + # Prototype + name: + path: ~ + domain: ~ + handlers: [] + anonymous: + key: 4f954a0667e01 + switch_user: + provider: ~ + parameter: _switch_user + role: ROLE_ALLOWED_TO_SWITCH access_control: - - - path: ^/foo - host: mydomain.foo - ip: 192.0.0.0/8 - roles: [ROLE_A, ROLE_B] - requires_channel: https - + requires_channel: ~ + + # use the urldecoded format + path: ~ # Example: ^/path to resource/ + host: ~ + ip: ~ + methods: [] + roles: [] role_hierarchy: - ROLE_SUPERADMIN: ROLE_ADMIN - ROLE_SUPERADMIN: 'ROLE_ADMIN, ROLE_USER' - ROLE_SUPERADMIN: [ROLE_ADMIN, ROLE_USER] - anything: { id: ROLE_SUPERADMIN, value: 'ROLE_USER, ROLE_ADMIN' } - anything: { id: ROLE_SUPERADMIN, value: [ROLE_USER, ROLE_ADMIN] } + + # Prototype + id: [] .. _reference-security-firewall-form-login: @@ -165,7 +156,7 @@ The Login Form and Process This is the URL that your login form must submit to. The firewall will intercept any requests (``POST`` requests only, be default) to this URL and process the submitted login credentials. - + Be sure that this URL is covered by your main firewall (i.e. don't create a separate firewall just for ``check_path`` URL). diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index 35e3e67cc69..b28fa79ad37 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -193,4 +193,4 @@ Full Default Configuration sleep: 0 delivery_address: ~ disable_delivery: ~ - logging: %kernel.debug% \ No newline at end of file + logging: true \ No newline at end of file diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index b6fc8a41a82..21d8ba20024 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -9,11 +9,12 @@ TwigBundle Configuration Reference .. code-block:: yaml twig: + exception_controller: Symfony\Bundle\TwigBundle\Controller\ExceptionController::showAction form: resources: # Default: - - div_layout.html.twig + - form_div_layout.html.twig # Example: - MyBundle::form.html.twig @@ -35,7 +36,7 @@ TwigBundle Configuration Reference debug: %kernel.debug% strict_variables: ~ auto_reload: ~ - exception_controller: Symfony\Bundle\TwigBundle\Controller\ExceptionController::showAction + optimizations: ~ .. code-block:: xml diff --git a/reference/configuration/web_profiler.rst b/reference/configuration/web_profiler.rst index d6e472f0875..3bd508b864b 100644 --- a/reference/configuration/web_profiler.rst +++ b/reference/configuration/web_profiler.rst @@ -12,12 +12,9 @@ Full Default Configuration .. code-block:: yaml web_profiler: - - # display secondary information, disable to make the toolbar shorter - verbose: true - # display the web debug toolbar at the bottom of pages with a summary of profiler info - toolbar: false - - # gives you the opportunity to look at the collected data before following the redirect - intercept_redirects: false \ No newline at end of file + # DEPRECATED, it is not useful anymore and can be removed safely from your configuration + verbose: true + toolbar: false + position: bottom + intercept_redirects: false \ No newline at end of file From 505a694506d104aadad02949c8cbdcc437285eef Mon Sep 17 00:00:00 2001 From: kbond Date: Mon, 28 May 2012 08:40:49 -0400 Subject: [PATCH 2/2] added missing examples --- reference/configuration/doctrine.rst | 7 ++- reference/configuration/monolog.rst | 4 +- reference/configuration/security.rst | 62 +++++++++++++++++++++++- reference/configuration/swiftmailer.rst | 2 +- reference/configuration/web_profiler.rst | 2 + 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index f1ef4689956..4be4c33a04f 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -11,14 +11,16 @@ Configuration Reference doctrine: dbal: - default_connection: ~ + default_connection: default types: - # Prototype name: class: ~ # Required commented: true + connections: + default: + dbname: database # Prototype name: @@ -98,6 +100,7 @@ Configuration Reference # Configuring MultipleActiveResultSets for the pdo_sqlsrv driver MultipleActiveResultSets: ~ + orm: default_entity_manager: ~ auto_generate_proxy_classes: false diff --git a/reference/configuration/monolog.rst b/reference/configuration/monolog.rst index 72d86096055..2fb8ca7a105 100644 --- a/reference/configuration/monolog.rst +++ b/reference/configuration/monolog.rst @@ -21,7 +21,7 @@ Configuration Reference processors: - some_callable main: - type: fingerscrossed + type: fingers_crossed action_level: WARNING buffer_size: 30 handler: custom @@ -50,7 +50,7 @@ Configuration Reference to_email: ~ subject: ~ email_prototype: - id: ~ # Required + id: ~ # Required (when the email_prototype is used) factory-method: ~ channels: type: ~ diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index 615d8965ec3..c4ff536be14 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -46,8 +46,8 @@ Each part will be explained in the next section. security_identity: acl_security_identities voter: allow_if_object_identity_unavailable: true - encoders: + encoders: # Examples: Acme\DemoBundle\Entity\User1: sha512 Acme\DemoBundle\Entity\User2: @@ -62,8 +62,8 @@ Each part will be explained in the next section. encode_as_base64: true iterations: 5000 id: ~ - providers: # Required + providers: # Required # Examples: memory: name: memory @@ -84,7 +84,64 @@ Each part will be explained in the next section. id: ~ chain: providers: [] + firewalls: # Required + # Examples: + somename: + pattern: .* + request_matcher: some.service.id + access_denied_url: /foo/error403 + access_denied_handler: some.service.id + entry_point: some.service.id + provider: name + context: name + stateless: false + x509: + provider: name + http_basic: + provider: name + http_digest: + provider: name + form_login: + check_path: /login_check + login_path: /login + use_forward: false + always_use_default_target_path: false + default_target_path: / + target_path_parameter: _target_path + use_referer: false + failure_path: /foo + failure_forward: false + failure_handler: some.service.id + success_handler: some.service.id + username_parameter: _username + password_parameter: _password + csrf_parameter: _csrf_token + intention: authenticate + csrf_provider: my.csrf_provider.id + post_only: true + remember_me: false + remember_me: + token_provider: name + key: someS3cretKey + name: NameOfTheCookie + lifetime: 3600 # in seconds + path: /foo + domain: somedomain.foo + secure: false + httponly: true + always_remember_me: false + remember_me_parameter: _remember_me + logout: + path: /logout + target: / + invalidate_session: false + delete_cookies: + a: { path: null, domain: null } + b: { path: null, domain: null } + handlers: [some.service.id, another.service.id] + success_handler: some.service.id + anonymous: ~ # Prototype name: @@ -118,6 +175,7 @@ Each part will be explained in the next section. provider: ~ parameter: _switch_user role: ROLE_ALLOWED_TO_SWITCH + access_control: requires_channel: ~ diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index b28fa79ad37..35e3e67cc69 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -193,4 +193,4 @@ Full Default Configuration sleep: 0 delivery_address: ~ disable_delivery: ~ - logging: true \ No newline at end of file + logging: %kernel.debug% \ No newline at end of file diff --git a/reference/configuration/web_profiler.rst b/reference/configuration/web_profiler.rst index 3bd508b864b..06e79f37f30 100644 --- a/reference/configuration/web_profiler.rst +++ b/reference/configuration/web_profiler.rst @@ -15,6 +15,8 @@ Full Default Configuration # DEPRECATED, it is not useful anymore and can be removed safely from your configuration verbose: true + + # display the web debug toolbar at the bottom of pages with a summary of profiler info toolbar: false position: bottom intercept_redirects: false \ No newline at end of file pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy