From 8076c401c4a2a17e645f432b3da0205536ad60fe Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 29 Nov 2016 17:01:36 +0100 Subject: [PATCH 1/5] Simplified the framework configuration reference --- reference/configuration/framework.rst | 164 +++----------------------- 1 file changed, 16 insertions(+), 148 deletions(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 93c4f31345b..8a524474ca4 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1,21 +1,26 @@ .. index:: single: Configuration reference; Framework -FrameworkBundle Configuration ("framework") -=========================================== +FrameworkBundle Configuration +============================= -The FrameworkBundle contains most of the "base" framework functionality -and can be configured under the ``framework`` key in your application -configuration. When using XML, you must use the -``http://symfony.com/schema/dic/symfony`` namespace. +The FrameworkBundle includes the main framework configuration, from sessions and +translations to forms, validation, routing and more. All these options are +configured under the ``framework`` key in your application configuration. -This includes settings related to sessions, translation, forms, validation, -routing and more. +.. code-block:: terminal -.. tip:: + # displays the default config values defined by Symfony + $ ./bin/console config:dump-reference framework + + # displays the actual config values used by your application + $ ./bin/console debug:config framework - The XSD schema is available at - ``http://symfony.com/schema/dic/symfony/symfony-1.0.xsd``. +.. note:: + + When using XML, you must use the ``http://symfony.com/schema/dic/symfony`` + namespace and the related XSD schema is available at: + ``http://symfony.com/schema/dic/symfony/symfony-1.0.xsd`` Configuration ------------- @@ -1477,143 +1482,6 @@ If this option is enabled, serialization groups can be defined using annotations For more information, see :ref:`serializer-using-serialization-groups-annotations`. -Full Default Configuration --------------------------- - -.. configuration-block:: - - .. code-block:: yaml - - framework: - secret: ~ - http_method_override: true - trusted_proxies: [] - ide: ~ - test: ~ - default_locale: en - - csrf_protection: - enabled: false - field_name: _token # Deprecated since 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead - - # form configuration - form: - enabled: false - csrf_protection: - enabled: true - field_name: ~ - - # esi configuration - esi: - enabled: false - - # fragments configuration - fragments: - enabled: false - path: /_fragment - - # profiler configuration - profiler: - enabled: false - collect: true - only_exceptions: false - only_master_requests: false - dsn: file:%kernel.cache_dir%/profiler - username: - password: - lifetime: 86400 - matcher: - ip: ~ - - # use the urldecoded format - path: ~ # Example: ^/path to resource/ - service: ~ - - # router configuration - router: - resource: ~ # Required - type: ~ - http_port: 80 - https_port: 443 - - # * set to true to throw an exception when a parameter does not - # match the requirements - # * set to false to disable exceptions when a parameter does not - # match the requirements (and return null instead) - # * set to null to disable parameter checks against requirements - # - # 'true' is the preferred configuration in development mode, while - # 'false' or 'null' might be preferred in production - strict_requirements: true - - # session configuration - session: - storage_id: session.storage.native - handler_id: session.handler.native_file - name: ~ - cookie_lifetime: ~ - cookie_path: ~ - cookie_domain: ~ - cookie_secure: ~ - cookie_httponly: ~ - gc_divisor: ~ - gc_probability: ~ - gc_maxlifetime: ~ - save_path: '%kernel.cache_dir%/sessions' - - # serializer configuration - serializer: - enabled: false - - # assets configuration - assets: - base_path: ~ - base_urls: [] - version: ~ - version_format: '%%s?%%s' - packages: - - # Prototype - name: - base_path: ~ - base_urls: [] - version: ~ - version_format: '%%s?%%s' - - # templating configuration - templating: - hinclude_default_template: ~ - form: - resources: - - # Default: - - FrameworkBundle:Form - cache: ~ - engines: # Required - - # Example: - - twig - loaders: [] - - # translator configuration - translator: - enabled: false - fallbacks: [en] - logging: "%kernel.debug%" - - # validation configuration - validation: - enabled: false - cache: ~ - enable_annotations: false - translation_domain: validators - - # annotation configuration - annotations: - cache: file - file_cache_dir: '%kernel.cache_dir%/annotations' - debug: '%kernel.debug%' - .. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html .. _`Security Advisory Blog post`: https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released#cve-2013-4752-request-gethost-poisoning .. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html From 396548cf6c011c304ed6890deb7d417ecbabe858 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 29 Nov 2016 17:24:02 +0100 Subject: [PATCH 2/5] Fixed an indentation issue --- reference/configuration/framework.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 8a524474ca4..ec484c4abb5 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -20,7 +20,7 @@ configured under the ``framework`` key in your application configuration. When using XML, you must use the ``http://symfony.com/schema/dic/symfony`` namespace and the related XSD schema is available at: - ``http://symfony.com/schema/dic/symfony/symfony-1.0.xsd`` + ``http://symfony.com/schema/dic/symfony/symfony-1.0.xsd`` Configuration ------------- From b91b1969ee0a6ceb9c83cb6fc266efee1bce5455 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 2 Jan 2017 09:58:10 +0100 Subject: [PATCH 3/5] Restored the "Full Default Configuration" dump --- reference/configuration/framework.rst | 139 +++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index ec484c4abb5..51a63486240 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -4,7 +4,7 @@ FrameworkBundle Configuration ============================= -The FrameworkBundle includes the main framework configuration, from sessions and +The FrameworkBundle defines the main framework configuration, from sessions and translations to forms, validation, routing and more. All these options are configured under the ``framework`` key in your application configuration. @@ -1482,6 +1482,143 @@ If this option is enabled, serialization groups can be defined using annotations For more information, see :ref:`serializer-using-serialization-groups-annotations`. +Full Default Configuration +-------------------------- + +.. configuration-block:: + + .. code-block:: yaml + + framework: + secret: ~ + http_method_override: true + trusted_proxies: [] + ide: ~ + test: ~ + default_locale: en + + csrf_protection: + enabled: false + field_name: _token # Deprecated since 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead + + # form configuration + form: + enabled: false + csrf_protection: + enabled: true + field_name: ~ + + # esi configuration + esi: + enabled: false + + # fragments configuration + fragments: + enabled: false + path: /_fragment + + # profiler configuration + profiler: + enabled: false + collect: true + only_exceptions: false + only_master_requests: false + dsn: file:%kernel.cache_dir%/profiler + username: + password: + lifetime: 86400 + matcher: + ip: ~ + + # use the urldecoded format + path: ~ # Example: ^/path to resource/ + service: ~ + + # router configuration + router: + resource: ~ # Required + type: ~ + http_port: 80 + https_port: 443 + + # * set to true to throw an exception when a parameter does not + # match the requirements + # * set to false to disable exceptions when a parameter does not + # match the requirements (and return null instead) + # * set to null to disable parameter checks against requirements + # + # 'true' is the preferred configuration in development mode, while + # 'false' or 'null' might be preferred in production + strict_requirements: true + + # session configuration + session: + storage_id: session.storage.native + handler_id: session.handler.native_file + name: ~ + cookie_lifetime: ~ + cookie_path: ~ + cookie_domain: ~ + cookie_secure: ~ + cookie_httponly: ~ + gc_divisor: ~ + gc_probability: ~ + gc_maxlifetime: ~ + save_path: '%kernel.cache_dir%/sessions' + + # serializer configuration + serializer: + enabled: false + + # assets configuration + assets: + base_path: ~ + base_urls: [] + version: ~ + version_format: '%%s?%%s' + packages: + + # Prototype + name: + base_path: ~ + base_urls: [] + version: ~ + version_format: '%%s?%%s' + + # templating configuration + templating: + hinclude_default_template: ~ + form: + resources: + + # Default: + - FrameworkBundle:Form + cache: ~ + engines: # Required + + # Example: + - twig + loaders: [] + + # translator configuration + translator: + enabled: false + fallbacks: [en] + logging: "%kernel.debug%" + + # validation configuration + validation: + enabled: false + cache: ~ + enable_annotations: false + translation_domain: validators + + # annotation configuration + annotations: + cache: file + file_cache_dir: '%kernel.cache_dir%/annotations' + debug: '%kernel.debug%' + .. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html .. _`Security Advisory Blog post`: https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released#cve-2013-4752-request-gethost-poisoning .. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html From 2d68dc394477be9a58c2f1b17470e151b8cc9919 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 29 Oct 2017 12:29:36 +0100 Subject: [PATCH 4/5] Last fixes --- reference/configuration/framework.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 51a63486240..37248cfc9ac 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1,8 +1,8 @@ .. index:: single: Configuration reference; Framework -FrameworkBundle Configuration -============================= +FrameworkBundle Configuration ("framework") +=========================================== The FrameworkBundle defines the main framework configuration, from sessions and translations to forms, validation, routing and more. All these options are @@ -11,10 +11,10 @@ configured under the ``framework`` key in your application configuration. .. code-block:: terminal # displays the default config values defined by Symfony - $ ./bin/console config:dump-reference framework + $ php bin/console config:dump-reference framework # displays the actual config values used by your application - $ ./bin/console debug:config framework + $ php bin/console debug:config framework .. note:: From a71ef9ddcc69e26d1414af24a4663b76622f15e0 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sun, 29 Oct 2017 13:04:59 -0400 Subject: [PATCH 5/5] Shortened command... easier to remember ;) --- reference/configuration/framework.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 37248cfc9ac..3959b7e0ff2 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -11,7 +11,7 @@ configured under the ``framework`` key in your application configuration. .. code-block:: terminal # displays the default config values defined by Symfony - $ php bin/console config:dump-reference framework + $ php bin/console config:dump framework # displays the actual config values used by your application $ php bin/console debug:config framework