From ee6291c2eb86e484975d879b368fbaff50d30c1e Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 23 Dec 2014 23:08:24 +0100 Subject: [PATCH] [Reference] update the configuration reference Move some `versionadded` directive to right position and add missing type information. --- reference/configuration/doctrine.rst | 64 ++++++++++------- reference/configuration/framework.rst | 26 +++---- reference/configuration/security.rst | 94 ++++++++++++++++--------- reference/configuration/swiftmailer.rst | 4 +- 4 files changed, 114 insertions(+), 74 deletions(-) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 2a04200b361..5a7afc42dca 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -314,31 +314,45 @@ Explicit definition of all the mapped entities is the only necessary configuration for the ORM and there are several configuration options that you can control. The following configuration options exist for a mapping: -* ``type`` One of ``annotation``, ``xml``, ``yml``, ``php`` or ``staticphp``. - This specifies which type of metadata type your mapping uses. - -* ``dir`` Path to the mapping or entity files (depending on the driver). - If this path is relative it is assumed to be relative to the bundle root. - This only works if the name of your mapping is a bundle name. If you want - to use this option to specify absolute paths you should prefix the path - with the kernel parameters that exist in the DIC (for example ``%kernel.root_dir%``). - -* ``prefix`` A common namespace prefix that all entities of this mapping - share. This prefix should never conflict with prefixes of other defined - mappings otherwise some of your entities cannot be found by Doctrine. - This option defaults to the bundle namespace + ``Entity``, for example - for an application bundle called ``AcmeHelloBundle`` prefix would be - ``Acme\HelloBundle\Entity``. - -* ``alias`` Doctrine offers a way to alias entity namespaces to simpler, - shorter names to be used in DQL queries or for Repository access. When - using a bundle the alias defaults to the bundle name. - -* ``is_bundle`` This option is a derived value from ``dir`` and by default - is set to true if dir is relative proved by a ``file_exists()`` check - that returns false. It is false if the existence check returns true. In - this case an absolute path was specified and the metadata files are most - likely in a directory outside of a bundle. +type +.... + +One of ``annotation``, ``xml``, ``yml``, ``php`` or ``staticphp``. This specifies +which type of metadata type your mapping uses. + +dir +... + +Path to the mapping or entity files (depending on the driver). If this path +is relative it is assumed to be relative to the bundle root. This only works +if the name of your mapping is a bundle name. If you want to use this option +to specify absolute paths you should prefix the path with the kernel parameters +that exist in the DIC (for example ``%kernel.root_dir%``). + +prefix +...... + +A common namespace prefix that all entities of this mapping share. This prefix +should never conflict with prefixes of other defined mappings otherwise some +of your entities cannot be found by Doctrine. This option defaults to the +bundle namespace + ``Entity``, for example for an application bundle called +``AcmeHelloBundle`` prefix would be ``Acme\HelloBundle\Entity``. + +alias +..... + +Doctrine offers a way to alias entity namespaces to simpler, shorter names +to be used in DQL queries or for Repository access. When using a bundle the +alias defaults to the bundle name. + +is_bundle +......... + +This option is a derived value from ``dir`` and by default is set to ``true`` +if dir is relative proved by a ``file_exists()`` check that returns ``false``. +It is ``false`` if the existence check returns ``true``. In this case an +absolute path was specified and the metadata files are most likely in a directory +outside of a bundle. .. index:: single: Configuration; Doctrine DBAL diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index bdbaf06aa96..dacdb535b76 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -464,19 +464,24 @@ would be ``/images/logo.png?version=5``. profiler ~~~~~~~~ -.. versionadded:: 2.2 - The ``enabled`` option was introduced in Symfony 2.2. Previously, the profiler - could only be disabled by omitting the ``framework.profiler`` configuration - entirely. - .. _profiler.enabled: enabled ....... -**default**: ``true`` in the ``dev`` and ``test`` environments +.. versionadded:: 2.2 + The ``enabled`` option was introduced in Symfony 2.2. Prior to Symfony + 2.2, the profiler could only be disabled by omitting the ``framework.profiler`` + configuration entirely. + +**type**: ``boolean`` **default**: ``false`` -The profiler can be disabled by setting this key to ``false``. +The profiler can be enabled by setting this key to ``true``. When you are +using the Symfony Standard Edition, the profiler is enabled in the ``dev`` +and ``test`` environments. + +collect +....... .. versionadded:: 2.3 The ``collect`` option was introduced in Symfony 2.3. Previously, when @@ -484,10 +489,7 @@ The profiler can be disabled by setting this key to ``false``. but the collectors were disabled. Now, the profiler and the collectors can be controlled independently. -collect -....... - -**default**: ``true`` +**type**: ``boolean`` **default**: ``true`` This option configures the way the profiler behaves when it is enabled. If set to ``true``, the profiler collects data for all requests. If you want to only @@ -511,7 +513,7 @@ Whether or not to enable the ``translator`` service in the service container. fallback ........ -**default**: ``en`` +**type**: ``string`` **default**: ``en`` This option is used when the translation key for the current locale wasn't found. diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index c680bba3d4f..c6418805901 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -248,41 +248,65 @@ For even more details, see :doc:`/cookbook/security/form_login`. The Login Form and Process ~~~~~~~~~~~~~~~~~~~~~~~~~~ -* ``login_path`` (type: ``string``, default: ``/login``) - This is the route or path that the user will be redirected to (unless - ``use_forward`` is set to ``true``) when they try to access a - protected resource but isn't fully authenticated. - - This path **must** be accessible by a normal, un-authenticated user, - else you may create a redirect loop. For details, see - ":ref:`Avoid Common Pitfalls `". - -* ``check_path`` (type: ``string``, default: ``/login_check``) - This is the route or path that your login form must submit to. The - firewall will intercept any requests (``POST`` requests only, by 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). - -* ``use_forward`` (type: ``Boolean``, default: ``false``) - If you'd like the user to be forwarded to the login form instead of - being redirected, set this option to ``true``. - -* ``username_parameter`` (type: ``string``, default: ``_username``) - This is the field name that you should give to the username field of - your login form. When you submit the form to ``check_path``, the security - system will look for a POST parameter with this name. - -* ``password_parameter`` (type: ``string``, default: ``_password``) - This is the field name that you should give to the password field of - your login form. When you submit the form to ``check_path``, the security - system will look for a POST parameter with this name. - -* ``post_only`` (type: ``Boolean``, default: ``true``) - By default, you must submit your login form to the ``check_path`` URL - as a POST request. By setting this option to ``false``, you can send a - GET request to the ``check_path`` URL. +login_path +.......... + +**type**: ``string`` **default**: ``/login`` + +This is the route or path that the user will be redirected to (unless ``use_forward`` +is set to ``true``) when they try to access a protected resource but isn't +fully authenticated. + +This path **must** be accessible by a normal, un-authenticated user, else +you may create a redirect loop. For details, see +":ref:`Avoid Common Pitfalls `". + +check_path +.......... + +**type**: ``string`` **default**: ``/login_check`` + +This is the route or path that your login form must submit to. The firewall +will intercept any requests (``POST`` requests only, by 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). + +use_forward +........... + +**type**: ``Boolean`` **default**: ``false`` + +If you'd like the user to be forwarded to the login form instead of being +redirected, set this option to ``true``. + +username_parameter +.................. + +**type**: ``string`` **default**: ``_username`` + +This is the field name that you should give to the username field of your +login form. When you submit the form to ``check_path``, the security system +will look for a POST parameter with this name. + +password_parameter +.................. + +**type**: ``string`` **default**: ``_password`` + +This is the field name that you should give to the password field of your +login form. When you submit the form to ``check_path``, the security system +will look for a POST parameter with this name. + +post_only +......... + +**type**: ``Boolean`` **default**: ``true`` + +By default, you must submit your login form to the ``check_path`` URL as +a POST request. By setting this option to ``false``, you can send a GET request +to the ``check_path`` URL. Redirecting after Login ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index 9295493eb68..3aaf52b858a 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -130,7 +130,7 @@ antiflood threshold ......... -**type**: ``string`` **default**: ``99`` +**type**: ``integer`` **default**: ``99`` Used with ``Swift_Plugins_AntiFloodPlugin``. This is the number of emails to send before restarting the transport. @@ -138,7 +138,7 @@ to send before restarting the transport. sleep ..... -**type**: ``string`` **default**: ``0`` +**type**: ``integer`` **default**: ``0`` Used with ``Swift_Plugins_AntiFloodPlugin``. This is the number of seconds to sleep for during a transport restart.