Skip to content

Commit eb6d21d

Browse files
committed
Merge branch '2.2' into 2.3
Conflicts: book/forms.rst components/event_dispatcher/introduction.rst cookbook/configuration/front_controllers_and_kernel.rst cookbook/form/dynamic_form_modification.rst reference/configuration/framework.rst reference/constraints/Max.rst reference/constraints/MaxLength.rst reference/constraints/Min.rst reference/constraints/MinLength.rst reference/forms/types/choice.rst reference/forms/types/field.rst reference/forms/types/form.rst reference/forms/types/map.rst.inc
2 parents 43a5cec + eda6157 commit eb6d21d

File tree

130 files changed

+428
-428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+428
-428
lines changed

book/controller.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ see :ref:`controller-string-syntax`.
196196

197197
.. tip::
198198

199-
You can learn much more about the routing system in the :doc:`Routing chapter</book/routing>`.
199+
You can learn much more about the routing system in the :doc:`Routing chapter </book/routing>`.
200200

201201
.. index::
202202
single: Controller; Controller arguments
@@ -397,7 +397,7 @@ itself.
397397

398398
.. note::
399399

400-
You can also define your :doc:`Controllers as Services</cookbook/controller/service>`.
400+
You can also define your :doc:`Controllers as Services </cookbook/controller/service>`.
401401
This is optional, but can give you more control over the exact dependencies
402402
that are injected into your controllers.
403403

@@ -494,7 +494,7 @@ value to each variable.
494494
Like other base ``Controller`` methods, the ``forward`` method is just
495495
a shortcut for core Symfony2 functionality. A forward can be accomplished
496496
directly by duplicating the current request. When this
497-
:ref:`sub request<http-kernel-sub-requests>` is executed via the ``http_kernel``
497+
:ref:`sub request <http-kernel-sub-requests>` is executed via the ``http_kernel``
498498
service the ``HttpKernel`` returns a ``Response`` object::
499499
500500
use Symfony\Component\HttpKernel/HttpKernelInterface;
@@ -549,7 +549,8 @@ The Symfony templating engine is explained in great detail in the
549549
.. tip::
550550

551551
You can even avoid calling the ``render`` method by using the ``@Template``
552-
annotation. See the :doc:`FrameworkExtraBundle documentation</bundles/SensioFrameworkExtraBundle/annotations/view>`
552+
annotation. See the
553+
:doc:`FrameworkExtraBundle documentation </bundles/SensioFrameworkExtraBundle/annotations/view>`
553554
more details.
554555

555556
.. tip::

book/doctrine.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ in your application. To do this, run:
473473
new column to the existing ``product`` table.
474474

475475
An even better way to take advantage of this functionality is via
476-
:doc:`migrations</bundles/DoctrineMigrationsBundle/index>`, which allow you to
476+
:doc:`migrations </bundles/DoctrineMigrationsBundle/index>`, which allow you to
477477
generate these SQL statements and store them in migration classes that
478478
can be run systematically on your production server in order to track
479479
and migrate your database schema safely and reliably.
@@ -581,7 +581,7 @@ on its ``id`` value::
581581

582582
You can achieve the equivalent of this without writing any code by using
583583
the ``@ParamConverter`` shortcut. See the
584-
:doc:`FrameworkExtraBundle documentation</bundles/SensioFrameworkExtraBundle/annotations/converters>`
584+
:doc:`FrameworkExtraBundle documentation </bundles/SensioFrameworkExtraBundle/annotations/converters>`
585585
for more details.
586586

587587
When you query for a particular type of object, you always use what's known
@@ -758,7 +758,7 @@ for just one object, you can use the ``getSingleResult()`` method instead::
758758
// ...
759759

760760
The DQL syntax is incredibly powerful, allowing you to easily join between
761-
entities (the topic of :ref:`relations<book-doctrine-relations>` will be
761+
entities (the topic of :ref:`relations <book-doctrine-relations>` will be
762762
covered later), group, etc. For more information, see the official Doctrine
763763
`Doctrine Query Language`_ documentation.
764764

@@ -1112,7 +1112,7 @@ table, and ``product.category_id`` column, and new foreign key:
11121112

11131113
This task should only be really used during development. For a more robust
11141114
method of systematically updating your production database, read about
1115-
:doc:`Doctrine migrations</bundles/DoctrineMigrationsBundle/index>`.
1115+
:doc:`Doctrine migrations </bundles/DoctrineMigrationsBundle/index>`.
11161116

11171117
Saving Related Entities
11181118
~~~~~~~~~~~~~~~~~~~~~~~
@@ -1300,7 +1300,7 @@ Configuration
13001300

13011301
Doctrine is highly configurable, though you probably won't ever need to worry
13021302
about most of its options. To find out more about configuring Doctrine, see
1303-
the Doctrine section of the :doc:`reference manual</reference/configuration/doctrine>`.
1303+
the Doctrine section of the :doc:`reference manual </reference/configuration/doctrine>`.
13041304

13051305
Lifecycle Callbacks
13061306
-------------------
@@ -1412,7 +1412,7 @@ These include thing such as *Sluggable*, *Timestampable*, *Loggable*, *Translata
14121412
and *Tree*.
14131413

14141414
For more information on how to find and use these extensions, see the cookbook
1415-
article about :doc:`using common Doctrine extensions</cookbook/doctrine/common_extensions>`.
1415+
article about :doc:`using common Doctrine extensions </cookbook/doctrine/common_extensions>`.
14161416

14171417
.. _book-doctrine-field-types:
14181418

@@ -1591,7 +1591,7 @@ that allow you to take different actions as objects go through their persistence
15911591
lifecycle.
15921592

15931593
For more information about Doctrine, see the *Doctrine* section of the
1594-
:doc:`cookbook</cookbook/index>`, which includes the following articles:
1594+
:doc:`cookbook </cookbook/index>`, which includes the following articles:
15951595

15961596
* :doc:`/bundles/DoctrineFixturesBundle/index`
15971597
* :doc:`/cookbook/doctrine/common_extensions`

book/forms.rst

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ corresponding errors printed out with the form.
421421
blank fields.
422422

423423
Validation is a very powerful feature of Symfony2 and has its own
424-
:doc:`dedicated chapter</book/validation>`.
424+
:doc:`dedicated chapter </book/validation>`.
425425

426426
.. index::
427427
single: Forms; Validation groups
@@ -438,7 +438,7 @@ you'll need to specify which validation group(s) your form should use::
438438
'validation_groups' => array('registration'),
439439
))->add(...);
440440

441-
If you're creating :ref:`form classes<book-form-creating-form-classes>` (a
441+
If you're creating :ref:`form classes <book-form-creating-form-classes>` (a
442442
good practice), then you'll need to add the following to the ``setDefaultOptions()``
443443
method::
444444

@@ -591,7 +591,7 @@ Field Type Options
591591

592592
Each field type has a number of options that can be used to configure it.
593593
For example, the ``dueDate`` field is currently being rendered as 3 select
594-
boxes. However, the :doc:`date field</reference/forms/types/date>` can be
594+
boxes. However, the :doc:`date field </reference/forms/types/date>` can be
595595
configured to be rendered as a single text box (where the user would enter
596596
the date as a string in the box)::
597597

@@ -610,7 +610,8 @@ the documentation for each type.
610610
any field. By default, the ``required`` option is set to ``true``, meaning
611611
that HTML5-ready browsers will apply client-side validation if the field
612612
is left blank. If you don't want this behavior, either set the ``required``
613-
option on your field to ``false`` or :ref:`disable HTML5 validation<book-forms-html5-validation-disable>`.
613+
option on your field to ``false`` or
614+
:ref:`disable HTML5 validation <book-forms-html5-validation-disable>`.
614615

615616
Also note that setting the ``required`` option to ``true`` will **not**
616617
result in server-side validation to be applied. In other words, if a
@@ -753,7 +754,7 @@ Take a look at each part:
753754

754755
* ``form_end()`` - Renders the end tag of the form and any fields that have not
755756
yet been rendered. This is useful for rendering hidden fields and taking
756-
advantage of the automatic :ref:`CSRF Protection<forms-csrf>`.
757+
advantage of the automatic :ref:`CSRF Protection <forms-csrf>`.
757758

758759
The majority of the work is done by the ``form_row`` helper, which renders
759760
the label, errors and HTML form widget of each field inside a ``div`` tag
@@ -893,7 +894,7 @@ Twig Template Function Reference
893894
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
894895

895896
If you're using Twig, a full reference of the form rendering functions is
896-
available in the :doc:`reference manual</reference/forms/twig_reference>`.
897+
available in the :doc:`reference manual </reference/forms/twig_reference>`.
897898
Read this to know everything about the helpers available and the options
898899
that can be used with each.
899900

@@ -1160,7 +1161,7 @@ HTML form and then translate user-submitted data back to the original object. As
11601161
such, the topic of persisting the ``Task`` object to the database is entirely
11611162
unrelated to the topic of forms. But, if you've configured the ``Task`` class
11621163
to be persisted via Doctrine (i.e. you've added
1163-
:ref:`mapping metadata<book-doctrine-adding-mapping>` for it), then persisting
1164+
:ref:`mapping metadata <book-doctrine-adding-mapping>` for it), then persisting
11641165
it after a form submission can be done when the form is valid::
11651166
11661167
if ($form->isValid()) {
@@ -1176,7 +1177,7 @@ you can fetch it from the form::
11761177
11771178
$task = $form->getData();
11781179
1179-
For more information, see the :doc:`Doctrine ORM chapter</book/doctrine>`.
1180+
For more information, see the :doc:`Doctrine ORM chapter </book/doctrine>`.
11801181
11811182
The key thing to understand is that when the form is submitted, the submitted
11821183
data is transferred to the underlying object immediately. If you want to
@@ -1339,7 +1340,7 @@ form with many ``Product`` sub-forms). This is done by using the ``collection``
13391340
field type.
13401341
13411342
For more information see the ":doc:`/cookbook/form/form_collections`" cookbook
1342-
entry and the :doc:`collection</reference/forms/types/collection>` field type reference.
1343+
entry and the :doc:`collection </reference/forms/types/collection>` field type reference.
13431344
13441345
.. index::
13451346
single: Forms; Theming
@@ -1522,7 +1523,7 @@ override the default error rendering for *all* fields, copy and customize the
15221523
.. tip::
15231524
15241525
The "parent" type of each field type is available in the
1525-
:doc:`form type reference</reference/forms/types>` for each field type.
1526+
:doc:`form type reference </reference/forms/types>` for each field type.
15261527
15271528
.. index::
15281529
single: Forms; Global Theming
@@ -1812,7 +1813,7 @@ simple array of your submitted data, how can you add constraints to the data of
18121813
your form?
18131814
18141815
The answer is to setup the constraints yourself, and attach them to the individual
1815-
fields. The overall approach is covered a bit more in the :ref:`validation chapter<book-validation-raw-values>`,
1816+
fields. The overall approach is covered a bit more in the :ref:`validation chapter <book-validation-raw-values>`,
18161817
but here's a short example:
18171818
18181819
.. versionadded:: 2.1
@@ -1857,12 +1858,12 @@ HTML form so that the user can modify that data. The second goal of a form is to
18571858
take the data submitted by the user and to re-apply it to the object.
18581859
18591860
There's still much more to learn about the powerful world of forms, such as
1860-
how to handle :doc:`file uploads with Doctrine
1861-
</cookbook/doctrine/file_uploads>` or how to create a form where a dynamic
1862-
number of sub-forms can be added (e.g. a todo list where you can keep adding
1863-
more fields via Javascript before submitting). See the cookbook for these
1864-
topics. Also, be sure to lean on the
1865-
:doc:`field type reference documentation</reference/forms/types>`, which
1861+
how to handle
1862+
:doc:`file uploads with Doctrine </cookbook/doctrine/file_uploads>` or how
1863+
to create a form where a dynamic number of sub-forms can be added (e.g. a
1864+
todo list where you can keep adding more fields via Javascript before submitting).
1865+
See the cookbook for these topics. Also, be sure to lean on the
1866+
:doc:`field type reference documentation </reference/forms/types>`, which
18661867
includes examples of how to use each field type and its options.
18671868
18681869
Learn more from the Cookbook

book/from_flat_php_to_symfony2.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ them for you. Here's the same sample application, now built in Symfony2::
582582
}
583583
}
584584

585-
The two controllers are still lightweight. Each uses the :doc:`Doctrine ORM library</book/doctrine>`
585+
The two controllers are still lightweight. Each uses the :doc:`Doctrine ORM library </book/doctrine>`
586586
to retrieve objects from the database and the ``Templating`` component to
587587
render a template and return a ``Response`` object. The list template is
588588
now quite a bit simpler:
@@ -667,7 +667,7 @@ controller method is responsible for returning the final ``Response`` object.
667667
There's really not much else to it.
668668

669669
For a visual representation of how Symfony2 handles each request, see the
670-
:ref:`request flow diagram<request-flow-figure>`.
670+
:ref:`request flow diagram <request-flow-figure>`.
671671

672672
Where Symfony2 Delivers
673673
~~~~~~~~~~~~~~~~~~~~~~~
@@ -681,8 +681,8 @@ migrating the blog from flat PHP to Symfony2 has improved life:
681681
allows for new developers to be productive in your project more quickly;
682682

683683
* 100% of the code you write is for *your* application. You **don't need
684-
to develop or maintain low-level utilities** such as :ref:`autoloading<autoloading-introduction-sidebar>`,
685-
:doc:`routing</book/routing>`, or rendering :doc:`controllers</book/controller>`;
684+
to develop or maintain low-level utilities** such as :ref:`autoloading <autoloading-introduction-sidebar>`,
685+
:doc:`routing </book/routing>`, or rendering :doc:`controllers </book/controller>`;
686686

687687
* Symfony2 gives you **access to open source tools** such as Doctrine and the
688688
Templating, Security, Form, Validation and Translation components (to name
@@ -694,7 +694,7 @@ migrating the blog from flat PHP to Symfony2 has improved life:
694694
* Symfony2's HTTP-centric architecture gives you access to powerful tools
695695
such as **HTTP caching** powered by **Symfony2's internal HTTP cache** or
696696
more powerful tools such as `Varnish`_. This is covered in a later chapter
697-
all about :doc:`caching</book/http_cache>`.
697+
all about :doc:`caching </book/http_cache>`.
698698

699699
And perhaps best of all, by using Symfony2, you now have access to a whole
700700
set of **high-quality open source tools developed by the Symfony2 community**!
@@ -745,7 +745,7 @@ The corresponding ``layout.html.twig`` template is also easier to write:
745745

746746
Twig is well-supported in Symfony2. And while PHP templates will always
747747
be supported in Symfony2, the many advantages of Twig will continue to
748-
be discussed. For more information, see the :doc:`templating chapter</book/templating>`.
748+
be discussed. For more information, see the :doc:`templating chapter </book/templating>`.
749749

750750
Learn more from the Cookbook
751751
----------------------------

book/http_fundamentals.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,12 @@ by adding an entry for ``/contact`` to your routing configuration file:
455455
456456
.. note::
457457

458-
This example uses :doc:`YAML</components/yaml/yaml_format>` to define the routing
458+
This example uses :doc:`YAML </components/yaml/yaml_format>` to define the routing
459459
configuration. Routing configuration can also be written in other formats
460460
such as XML or PHP.
461461

462462
When someone visits the ``/contact`` page, this route is matched, and the
463-
specified controller is executed. As you'll learn in the :doc:`routing chapter</book/routing>`,
463+
specified controller is executed. As you'll learn in the :doc:`routing chapter </book/routing>`,
464464
the ``AcmeDemoBundle:Main:contact`` string is a short syntax that points to a
465465
specific PHP method ``contactAction`` inside a class called ``MainController``::
466466

@@ -479,7 +479,7 @@ specific PHP method ``contactAction`` inside a class called ``MainController``::
479479

480480
In this very simple example, the controller simply creates a
481481
:class:`Symfony\\Component\\HttpFoundation\\Response` object with the HTML
482-
"``<h1>Contact us!</h1>"``. In the :doc:`controller chapter</book/controller>`,
482+
``<h1>Contact us! </h1>``. In the :doc:`controller chapter </book/controller>`,
483483
you'll learn how a controller can render templates, allowing your "presentation"
484484
code (i.e. anything that actually writes out HTML) to live in a separate
485485
template file. This frees up the controller to worry only about the hard
@@ -512,11 +512,11 @@ libraries that can be used inside *any* PHP project. These libraries, called
512512
the *Symfony2 Components*, contain something useful for almost any situation,
513513
regardless of how your project is developed. To name a few:
514514

515-
* :doc:`HttpFoundation</components/http_foundation/introduction>` - Contains
515+
* :doc:`HttpFoundation </components/http_foundation/introduction>` - Contains
516516
the ``Request`` and ``Response`` classes, as well as other classes for handling
517517
sessions and file uploads;
518518

519-
* :doc:`Routing</components/routing/introduction>` - Powerful and fast routing system that
519+
* :doc:`Routing </components/routing/introduction>` - Powerful and fast routing system that
520520
allows you to map a specific URI (e.g. ``/contact``) to some information
521521
about how that request should be handled (e.g. execute the ``contactAction()``
522522
method);
@@ -527,11 +527,11 @@ regardless of how your project is developed. To name a few:
527527
* `Validator`_ A system for creating rules about data and then validating
528528
whether or not user-submitted data follows those rules;
529529

530-
* :doc:`ClassLoader</components/class_loader/introduction>` An autoloading library that allows
530+
* :doc:`ClassLoader </components/class_loader/introduction>` An autoloading library that allows
531531
PHP classes to be used without needing to manually ``require`` the files
532532
containing those classes;
533533

534-
* :doc:`Templating</components/templating/introduction>` A toolkit for rendering
534+
* :doc:`Templating </components/templating/introduction>` A toolkit for rendering
535535
templates, handling template inheritance (i.e. a template is decorated with
536536
a layout) and performing other common template tasks;
537537

book/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Installing a Symfony2 Distribution
2121

2222
First, check that you have installed and configured a Web server (such
2323
as Apache) with PHP 5.3.8 or higher. For more information on Symfony2
24-
requirements, see the :doc:`requirements reference</reference/requirements>`.
24+
requirements, see the :doc:`requirements reference </reference/requirements>`.
2525

2626
Symfony2 packages "distributions", which are fully-functional applications
2727
that include the Symfony2 core libraries, a selection of useful bundles, a
@@ -308,7 +308,7 @@ If you're new to Symfony, check out ":doc:`page_creation`", where you'll
308308
learn how to create pages, change configuration, and do everything else you'll
309309
need in your new application.
310310

311-
Be sure to also check out the :doc:`Cookbook</cookbook/index>`, which contains
311+
Be sure to also check out the :doc:`Cookbook </cookbook/index>`, which contains
312312
a wide variety of articles about solving specific problems with Symfony.
313313

314314
.. note::

book/internals.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ add the following code at the beginning of your listener method::
236236
.. tip::
237237

238238
If you are not yet familiar with the Symfony2 Event Dispatcher, read the
239-
:doc:`Event Dispatcher Component Documentation</components/event_dispatcher/introduction>`
239+
:doc:`Event Dispatcher Component Documentation </components/event_dispatcher/introduction>`
240240
section first.
241241

242242
.. index::
@@ -429,7 +429,7 @@ The Event Dispatcher
429429

430430
The event dispatcher is a standalone component that is responsible for much
431431
of the underlying logic and flow behind a Symfony request. For more information,
432-
see the :doc:`Event Dispatcher Component Documentation</components/event_dispatcher/introduction>`.
432+
see the :doc:`Event Dispatcher Component Documentation </components/event_dispatcher/introduction>`.
433433

434434
.. seealso::
435435

0 commit comments

Comments
 (0)