Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bfd8488

Browse files
committedJun 7, 2014
Merge branch '2.4' into 2.5
2 parents 47ce3f1 + 1561f03 commit bfd8488

File tree

26 files changed

+358
-226
lines changed

26 files changed

+358
-226
lines changed
 

‎book/doctrine.rst‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,12 @@ doesn't replace your existing methods).
413413

414414
With the ``doctrine:generate:entities`` command you can:
415415

416-
* generate getters and setters;
416+
* generate getters and setters;
417417

418-
* generate repository classes configured with the
419-
``@ORM\Entity(repositoryClass="...")`` annotation;
418+
* generate repository classes configured with the
419+
``@ORM\Entity(repositoryClass="...")`` annotation;
420420

421-
* generate the appropriate constructor for 1:n and n:m relations.
421+
* generate the appropriate constructor for 1:n and n:m relations.
422422

423423
The ``doctrine:generate:entities`` command saves a backup of the original
424424
``Product.php`` named ``Product.php~``. In some cases, the presence of
@@ -631,7 +631,7 @@ Once you have your repository, you have access to all sorts of helpful methods::
631631
You can also take advantage of the useful ``findBy`` and ``findOneBy`` methods
632632
to easily fetch objects based on multiple conditions::
633633

634-
// query for one product matching be name and price
634+
// query for one product matching by name and price
635635
$product = $repository->findOneBy(
636636
array('name' => 'foo', 'price' => 19.99)
637637
);

‎book/http_cache.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ Cache Invalidation
10341034
------------------
10351035

10361036
"There are only two hard things in Computer Science: cache invalidation
1037-
and naming things." --Phil Karlton
1037+
and naming things." -- Phil Karlton
10381038

10391039
You should never need to invalidate cached data because invalidation is already
10401040
taken into account natively in the HTTP cache models. If you use validation,

‎book/security.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,8 @@ if ``ip``, ``host`` or ``method`` are not specified for an entry, that ``access_
854854
will match any ``ip``, ``host`` or ``method``:
855855

856856
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
857-
| **URI** | **IP** | **HOST** | **METHOD** | ``access_control`` | Why? |
858-
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
857+
| URI | IP | HOST | METHOD | ``access_control`` | Why? |
858+
+=================+=============+=============+============+================================+=============================================================+
859859
| ``/admin/user`` | 127.0.0.1 | example.com | GET | rule #1 (``ROLE_USER_IP``) | The URI matches ``path`` and the IP matches ``ip``. |
860860
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
861861
| ``/admin/user`` | 127.0.0.1 | symfony.com | GET | rule #1 (``ROLE_USER_IP``) | The ``path`` and ``ip`` still match. This would also match |

‎book/templating.rst‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,17 @@ to web designers and, in several ways, more powerful than PHP templates:
7575
</body>
7676
</html>
7777

78-
Twig defines two types of special syntax:
78+
Twig defines three types of special syntax:
7979

8080
* ``{{ ... }}``: "Says something": prints a variable or the result of an
8181
expression to the template;
8282

8383
* ``{% ... %}``: "Does something": a **tag** that controls the logic of the
8484
template; it is used to execute statements such as for-loops for example.
8585

86-
.. note::
87-
88-
There is a third syntax used for creating comments: ``{# this is a comment #}``.
89-
This syntax can be used across multiple lines like the PHP-equivalent
90-
``/* comment */`` syntax.
86+
* ``{# ... #}``: "Comment something": it's the equivalent of the PHP
87+
``/* comment */`` syntax. It's used to add single or multi-line comments.
88+
The content of the comments isn't included in the rendered pages.
9189

9290
Twig also contains **filters**, which modify content before being rendered.
9391
The following makes the ``title`` variable all uppercase before rendering
@@ -394,14 +392,14 @@ lives in a specific location:
394392
template for a specific page. The three parts of the string, each separated
395393
by a colon (``:``), mean the following:
396394

397-
* ``AcmeBlogBundle``: (*bundle*) the template lives inside the
398-
``AcmeBlogBundle`` (e.g. ``src/Acme/BlogBundle``);
395+
* ``AcmeBlogBundle``: (*bundle*) the template lives inside the
396+
``AcmeBlogBundle`` (e.g. ``src/Acme/BlogBundle``);
399397

400-
* ``Blog``: (*controller*) indicates that the template lives inside the
401-
``Blog`` subdirectory of ``Resources/views``;
398+
* ``Blog``: (*controller*) indicates that the template lives inside the
399+
``Blog`` subdirectory of ``Resources/views``;
402400

403-
* ``index.html.twig``: (*template*) the actual name of the file is
404-
``index.html.twig``.
401+
* ``index.html.twig``: (*template*) the actual name of the file is
402+
``index.html.twig``.
405403

406404
Assuming that the ``AcmeBlogBundle`` lives at ``src/Acme/BlogBundle``, the
407405
final path to the layout would be ``src/Acme/BlogBundle/Resources/views/Blog/index.html.twig``.

‎components/config/introduction.rst‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
The Config Component
66
====================
77

8-
Introduction
9-
------------
10-
11-
The Config component provides several classes to help you find, load, combine,
12-
autofill and validate configuration values of any kind, whatever their source
13-
may be (YAML, XML, INI files, or for instance a database).
8+
The Config component provides several classes to help you find, load,
9+
combine, autofill and validate configuration values of any kind, whatever
10+
their source may be (YAML, XML, INI files, or for instance a database).
1411

1512
.. caution::
1613

‎components/css_selector.rst‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This gives the following output:
5555

5656
.. code-block:: text
5757
58-
descendant-or-self::div[contains(concat(' ',normalize-space(@class), ' '), ' item ')]/h4/a
58+
descendant-or-self::div[@class and contains(concat(' ',normalize-space(@class), ' '), ' item ')]/h4/a
5959
6060
You can use this expression with, for instance, :phpclass:`DOMXPath` or
6161
:phpclass:`SimpleXMLElement` to find elements in a document.
@@ -76,17 +76,15 @@ web-browser.
7676

7777
* link-state selectors: ``:link``, ``:visited``, ``:target``
7878
* selectors based on user action: ``:hover``, ``:focus``, ``:active``
79-
* UI-state selectors: ``:enabled``, ``:disabled``, ``:indeterminate``
80-
(however, ``:checked`` and ``:unchecked`` are available)
79+
* UI-state selectors: ``:invalid``, ``:indeterminate`` (however, ``:enabled``,
80+
``:disabled``, ``:checked`` and ``:unchecked`` are available)
8181

8282
Pseudo-elements (``:before``, ``:after``, ``:first-line``,
8383
``:first-letter``) are not supported because they select portions of text
8484
rather than elements.
8585

8686
Several pseudo-classes are not yet supported:
8787

88-
* ``:lang(language)``
89-
* ``root``
9088
* ``*:first-of-type``, ``*:last-of-type``, ``*:nth-of-type``,
9189
``*:nth-last-of-type``, ``*:only-of-type``. (These work with an element
9290
name (e.g. ``li:first-of-type``) but not with ``*``.

‎components/event_dispatcher/introduction.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
The EventDispatcher Component
66
=============================
77

8+
The EventDispatcher component provides tools that allow your application
9+
components to communicate with each other by dispatching events and listening
10+
to them.
11+
812
Introduction
913
------------
1014

‎components/form/form_events.rst‎

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ The ``FormEvents::PRE_SET_DATA`` event is dispatched at the beginning of the
6262
:ref:`Form Events Information Table<component-form-event-table>`
6363

6464
+-----------------+-----------+
65-
| **Data type** | **Value** |
66-
+-----------------+-----------+
65+
| Data type | Value |
66+
+=================+===========+
6767
| Model data | ``null`` |
6868
+-----------------+-----------+
6969
| Normalized data | ``null`` |
@@ -99,8 +99,8 @@ the form.
9999
:ref:`Form Events Information Table<component-form-event-table>`
100100

101101
+-----------------+------------------------------------------------------+
102-
| **Data type** | **Value** |
103-
+-----------------+------------------------------------------------------+
102+
| Data type | Value |
103+
+=================+======================================================+
104104
| Model data | Model data injected into ``setData()`` |
105105
+-----------------+------------------------------------------------------+
106106
| Normalized data | Model data transformed using a model transformer |
@@ -110,6 +110,9 @@ the form.
110110

111111
.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component
112112

113+
.. versionadded:: 2.4
114+
The data collector extension was introduced in Symfony 2.4.
115+
113116
The :class:`Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener`
114117
class is subscribed to listen to the ``FormEvents::POST_SET_DATA`` event
115118
in order to collect information about the forms from the denormalized
@@ -141,8 +144,8 @@ It can be used to:
141144
:ref:`Form Events Information Table<component-form-event-table>`
142145

143146
+-----------------+------------------------------------------+
144-
| **Data type** | **Value** |
145-
+-----------------+------------------------------------------+
147+
| Data type | Value |
148+
+=================+==========================================+
146149
| Model data | Same as in ``FormEvents::POST_SET_DATA`` |
147150
+-----------------+------------------------------------------+
148151
| Normalized data | Same as in ``FormEvents::POST_SET_DATA`` |
@@ -171,8 +174,8 @@ It can be used to change data from the normalized representation of the data.
171174
:ref:`Form Events Information Table<component-form-event-table>`
172175

173176
+-----------------+-------------------------------------------------------------------------------------+
174-
| **Data type** | **Value** |
175-
+-----------------+-------------------------------------------------------------------------------------+
177+
| Data type | Value |
178+
+=================+=====================================================================================+
176179
| Model data | Same as in ``FormEvents::POST_SET_DATA`` |
177180
+-----------------+-------------------------------------------------------------------------------------+
178181
| Normalized data | Data from the request reverse-transformed from the request using a view transformer |
@@ -203,8 +206,8 @@ It can be used to fetch data after denormalization.
203206
:ref:`Form Events Information Table<component-form-event-table>`
204207

205208
+-----------------+---------------------------------------------------------------+
206-
| **Data type** | **Value** |
207-
+-----------------+---------------------------------------------------------------+
209+
| Data type | Value |
210+
+=================+===============================================================+
208211
| Model data | Normalized data reverse-transformed using a model transformer |
209212
+-----------------+---------------------------------------------------------------+
210213
| Normalized data | Same as in ``FormEvents::POST_SUBMIT`` |
@@ -218,6 +221,9 @@ It can be used to fetch data after denormalization.
218221

219222
.. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component
220223

224+
.. versionadded:: 2.4
225+
The data collector extension was introduced in Symfony 2.4.
226+
221227
The :class:`Symfony\\Component\\Form\\Extension\\DataCollector\\EventListener\\DataCollectorListener`
222228
subscribes to the ``FormEvents::POST_SUBMIT`` event in order to collect
223229
information about the forms.
@@ -242,19 +248,19 @@ processed.
242248

243249
.. _component-form-event-table:
244250

245-
+--------------------+-------------------------------+------------------+
246-
| **Name** | ``FormEvents`` **Constant** | **Event's data** |
247-
+--------------------+-------------------------------+------------------+
248-
| form.pre_set_data | ``FormEvents::PRE_SET_DATA`` | Model data |
249-
+--------------------+-------------------------------+------------------+
250-
| form.post_set_data | ``FormEvents::POST_SET_DATA`` | Model data |
251-
+--------------------+-------------------------------+------------------+
252-
| form.pre_bind | ``FormEvents::PRE_SUBMIT`` | Request data |
253-
+--------------------+-------------------------------+------------------+
254-
| form.bind | ``FormEvents::SUBMIT`` | Normalized data |
255-
+--------------------+-------------------------------+------------------+
256-
| form.post_bind | ``FormEvents::POST_SUBMIT`` | View data |
257-
+--------------------+-------------------------------+------------------+
251+
+------------------------+-------------------------------+------------------+
252+
| Name | ``FormEvents`` Constant | Event's data |
253+
+========================+===============================+==================+
254+
| ``form.pre_set_data`` | ``FormEvents::PRE_SET_DATA`` | Model data |
255+
+------------------------+-------------------------------+------------------+
256+
| ``form.post_set_data`` | ``FormEvents::POST_SET_DATA`` | Model data |
257+
+------------------------+-------------------------------+------------------+
258+
| ``form.pre_bind`` | ``FormEvents::PRE_SUBMIT`` | Request data |
259+
+------------------------+-------------------------------+------------------+
260+
| ``form.bind`` | ``FormEvents::SUBMIT`` | Normalized data |
261+
+------------------------+-------------------------------+------------------+
262+
| ``form.post_bind`` | ``FormEvents::POST_SUBMIT`` | View data |
263+
+------------------------+-------------------------------+------------------+
258264

259265
.. versionadded:: 2.3
260266

‎components/http_foundation/session_configuration.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ activate these in the same way as it does for custom handlers.
3737

3838
Symfony2 provides drivers for the following native save handler as an example:
3939

40-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler`
40+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler`
4141

4242
Example usage::
4343

@@ -71,11 +71,11 @@ various points in the session workflow.
7171
Symfony2 HttpFoundation provides some by default and these can easily serve as
7272
examples if you wish to write your own.
7373

74-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler`
75-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler`
76-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler`
77-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler`
78-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler`
74+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler`
75+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler`
76+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler`
77+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler`
78+
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler`
7979

8080
Example usage::
8181

0 commit comments

Comments
 (0)
Please sign in to comment.