Commit 1ffd4bab authored by Fabien Potencier's avatar Fabien Potencier

merged branch trompette/patch-1 (PR #468)

Commits
-------

9cf4b598 [FormServiceProvider] clarified doc

Discussion
----------

clarified doc about FormServiceProvider
parents 6d7cf048 9cf4b598
......@@ -36,8 +36,20 @@ Registering
.. note::
The Symfony Form Component comes with the "fat" Silex archive but not with
the regular one. If you are using Composer, add it as a dependency to your
If you don't want to create your own form layout, it's fine: a default one
will be used. But you will have to register the
:doc:`translation provider <providers/translation>` as the default form
layout requires it.
If you want to use validation with forms, do not forget to register the
:doc:`Validator provider <providers/validator>`.
.. note::
The Symfony Form Component and all its dependencies (optional or not) comes
with the "fat" Silex archive but not with the regular one.
If you are using Composer, add it as a dependency to your
``composer.json`` file:
.. code-block:: json
......@@ -46,29 +58,25 @@ Registering
"symfony/form": "2.1.*"
}
If you are going to use the validation extension with forms, you must also
register the ``symfony/config`` and ```symfony/translation`` components:
.. code-block:: json
"require": {
"symfony/config": "2.1.*",
"symfony/translation": "2.1.*"
}
If you are going to use the validation extension with forms, you must also
add a dependency to the ``symfony/config`` and ```symfony/translation``
components:
The Symfony Form Component relies on the PHP intl extension. If you don't have
it, you can install the Symfony Locale Component as a replacement:
.. code-block:: json
.. code-block:: json
"require": {
"symfony/config": "2.1.*",
"symfony/translation": "2.1.*"
}
"require": {
"symfony/locale": "2.1.*"
}
The Symfony Form Component relies on the PHP intl extension. If you don't have
it, you can install the Symfony Locale Component as a replacement:
.. note::
.. code-block:: json
If you want to benefit from the internationalization of your form, you
must install the PHP intl extension.
"require": {
"symfony/locale": "2.1.*"
}
Usage
-----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment