Skip to content

Commit

Permalink
[Reference] update the configuration reference
Browse files Browse the repository at this point in the history
Move some `versionadded` directive to right position and add missing
type information.
  • Loading branch information
xabbuh committed Dec 28, 2014
1 parent 9b4d747 commit ee6291c
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 74 deletions.
64 changes: 39 additions & 25 deletions reference/configuration/doctrine.rst
Expand Up @@ -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
Expand Down
26 changes: 14 additions & 12 deletions reference/configuration/framework.rst
Expand Up @@ -464,30 +464,32 @@ 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
``profiler.enabled`` was ``false``, the profiler *was* actually enabled,
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
Expand All @@ -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.

Expand Down
94 changes: 59 additions & 35 deletions reference/configuration/security.rst
Expand Up @@ -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 <book-security-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 <book-security-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
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions reference/configuration/swiftmailer.rst
Expand Up @@ -130,15 +130,15 @@ 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.

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.
Expand Down

0 comments on commit ee6291c

Please sign in to comment.