Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1202ea

Browse filesBrowse files
committed
Merge branch '2.2' into 2.3
Conflicts: components/console/introduction.rst reference/forms/types/date.rst reference/forms/types/time.rst
2 parents 6ddc1bf + 7d7e459 commit e1202ea
Copy full SHA for e1202ea
Expand file treeCollapse file tree

38 files changed

+427
-32
lines changed

‎book/forms.rst

Copy file name to clipboardExpand all lines: book/forms.rst
+12-9Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,18 @@ object.
357357
.. code-block:: xml
358358
359359
<!-- Acme/TaskBundle/Resources/config/validation.xml -->
360-
<class name="Acme\TaskBundle\Entity\Task">
361-
<property name="task">
362-
<constraint name="NotBlank" />
363-
</property>
364-
<property name="dueDate">
365-
<constraint name="NotBlank" />
366-
<constraint name="Type">\DateTime</constraint>
367-
</property>
368-
</class>
360+
<?xml version="1.0" charset="UTF-8"?>
361+
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
362+
<class name="Acme\TaskBundle\Entity\Task">
363+
<property name="task">
364+
<constraint name="NotBlank" />
365+
</property>
366+
<property name="dueDate">
367+
<constraint name="NotBlank" />
368+
<constraint name="Type">\DateTime</constraint>
369+
</property>
370+
</class>
371+
<constraint-mapping>
369372
370373
.. code-block:: php
371374

‎book/page_creation.rst

Copy file name to clipboardExpand all lines: book/page_creation.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ application should greet you:
245245
246246
http://localhost/app_dev.php/hello/Ryan
247247
248+
.. _book-page-creation-prod-cache-clear:
249+
248250
.. tip::
249251

250252
You can also view your app in the "prod" :ref:`environment<environments-summary>`

‎book/routing.rst

Copy file name to clipboardExpand all lines: book/routing.rst
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,11 @@ instead of simply ``/hello/{name}``:
10261026
use Symfony\Component\Routing\RouteCollection;
10271027
10281028
$collection = new RouteCollection();
1029-
$collection->addCollection($loader->import("@AcmeHelloBundle/Resources/config/routing.php"), '/admin');
1029+
1030+
$acmeHello = $loader->import("@AcmeHelloBundle/Resources/config/routing.php");
1031+
$acmeHello->setPrefix('/admin');
1032+
1033+
$collection->addCollection($acmeHello);
10301034
10311035
return $collection;
10321036

‎components/console/introduction.rst

Copy file name to clipboardExpand all lines: components/console/introduction.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ The console has 5 levels of verbosity. These are defined in the
171171
:class:`Symfony\\Component\\Console\\Output\\OutputInterface`:
172172

173173
======================================= ==================================
174-
Option Value
174+
Mode Value
175175
======================================= ==================================
176176
OutputInterface::VERBOSITY_QUIET Do not output any messages
177177
OutputInterface::VERBOSITY_NORMAL The default verbosity level
@@ -262,11 +262,11 @@ You can access the ``names`` argument as an array::
262262
There are 3 argument variants you can use:
263263

264264
=========================== ===============================================================================================================
265-
Option Value
265+
Mode Value
266266
=========================== ===============================================================================================================
267267
InputArgument::REQUIRED The argument is required
268268
InputArgument::OPTIONAL The argument is optional and therefore can be omitted
269-
InputArgument::IS_ARRAY The argument can can contain an indefinite number of arguments and must be used at the end of the argument list
269+
InputArgument::IS_ARRAY The argument can contain an indefinite number of arguments and must be used at the end of the argument list
270270
=========================== ===============================================================================================================
271271

272272
You can combine ``IS_ARRAY`` with ``REQUIRED`` and ``OPTIONAL`` like this::

‎components/dom_crawler.rst

Copy file name to clipboardExpand all lines: components/dom_crawler.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ and uploading files::
316316
// select an option
317317
$form['registration[birthday][year]']->select(1984);
318318

319-
// select many options from a "multiple" select or checkboxes
319+
// select many options from a "multiple" select
320320
$form['registration[interests]']->select(array('symfony', 'cookies'));
321321

322322
// even fake a file upload

‎components/http_foundation/introduction.rst

Copy file name to clipboardExpand all lines: components/http_foundation/introduction.rst
+17-14Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You can install the component in 2 different ways:
2727
Request
2828
-------
2929

30-
The most common way to create request is to base it on the current PHP global
30+
The most common way to create a request is to base it on the current PHP global
3131
variables with
3232
:method:`Symfony\\Component\\HttpFoundation\\Request::createFromGlobals`::
3333

@@ -66,7 +66,7 @@ can be accessed via several public properties:
6666
* ``server``: equivalent of ``$_SERVER``;
6767

6868
* ``headers``: mostly equivalent to a sub-set of ``$_SERVER``
69-
(``$request->headers->get('Content-Type')``).
69+
(``$request->headers->get('User-Agent')``).
7070

7171
Each property is a :class:`Symfony\\Component\\HttpFoundation\\ParameterBag`
7272
instance (or a sub-class of), which is a data holder class:
@@ -128,7 +128,7 @@ has some methods to filter the input values:
128128
parameter value converted to integer;
129129

130130
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::filter`: Filters the
131-
parameter by using the PHP ``filter_var()`` function.
131+
parameter by using the PHP :phpfunction:`filter_var` function.
132132

133133
All getters takes up to three arguments: the first one is the parameter name
134134
and the second one is the default value to return if the parameter does not
@@ -150,7 +150,7 @@ When PHP imports the request query, it handles request parameters like
150150
``foo[bar]=bar`` in a special way as it creates an array. So you can get the
151151
``foo`` parameter and you will get back an array with a ``bar`` element. But
152152
sometimes, you might want to get the value for the "original" parameter name:
153-
``foo[bar]``. This is possible with all the `ParameterBag` getters like
153+
``foo[bar]``. This is possible with all the ``ParameterBag`` getters like
154154
:method:`Symfony\\Component\\HttpFoundation\\Request::get` via the third
155155
argument::
156156

@@ -172,7 +172,8 @@ thanks to the public ``attributes`` property, which is also an instance of
172172
:class:`Symfony\\Component\\HttpFoundation\\ParameterBag`. This is mostly used
173173
to attach information that belongs to the Request and that needs to be
174174
accessed from many different points in your application. For information
175-
on how this is used in the Symfony2 framework, see :ref:`read more<book-fundamentals-attributes>`.
175+
on how this is used in the Symfony2 framework, see
176+
:ref:`the Symfony2 book<book-fundamentals-attributes>`.
176177

177178
Identifying a Request
178179
~~~~~~~~~~~~~~~~~~~~~
@@ -188,8 +189,8 @@ this is done via the "path info" of the request, which can be accessed via the
188189
Simulating a Request
189190
~~~~~~~~~~~~~~~~~~~~
190191

191-
Instead of creating a Request based on the PHP globals, you can also simulate
192-
a Request::
192+
Instead of creating a request based on the PHP globals, you can also simulate
193+
a request::
193194

194195
$request = Request::create(
195196
'/hello-world',
@@ -198,7 +199,7 @@ a Request::
198199
);
199200

200201
The :method:`Symfony\\Component\\HttpFoundation\\Request::create` method
201-
creates a request based on a path info, a method and some parameters (the
202+
creates a request based on a URI, a method and some parameters (the
202203
query parameters or the request ones depending on the HTTP method); and of
203204
course, you can also override all other variables as well (by default, Symfony
204205
creates sensible defaults for all the PHP global variables).
@@ -210,19 +211,19 @@ Based on such a request, you can override the PHP global variables via
210211

211212
.. tip::
212213

213-
You can also duplicate an existing query via
214+
You can also duplicate an existing request via
214215
:method:`Symfony\\Component\\HttpFoundation\\Request::duplicate` or
215216
change a bunch of parameters with a single call to
216217
:method:`Symfony\\Component\\HttpFoundation\\Request::initialize`.
217218

218219
Accessing the Session
219220
~~~~~~~~~~~~~~~~~~~~~
220221

221-
If you have a session attached to the Request, you can access it via the
222+
If you have a session attached to the request, you can access it via the
222223
:method:`Symfony\\Component\\HttpFoundation\\Request::getSession` method;
223224
the
224225
:method:`Symfony\\Component\\HttpFoundation\\Request::hasPreviousSession`
225-
method tells you if the request contains a Session which was started in one of
226+
method tells you if the request contains a session which was started in one of
226227
the previous requests.
227228

228229
Accessing `Accept-*` Headers Data
@@ -238,7 +239,7 @@ by using the following methods:
238239
returns the list of accepted languages ordered by descending quality;
239240

240241
* :method:`Symfony\\Component\\HttpFoundation\\Request::getCharsets`:
241-
returns the list of accepted charsets ordered by descending quality;
242+
returns the list of accepted charsets ordered by descending quality.
242243

243244
.. versionadded:: 2.2
244245
The :class:`Symfony\\Component\\HttpFoundation\\AcceptHeader` class is new in Symfony 2.2.
@@ -262,8 +263,10 @@ If you need to get full access to parsed data from ``Accept``, ``Accept-Language
262263
Accessing other Data
263264
~~~~~~~~~~~~~~~~~~~~
264265

265-
The Request class has many other methods that you can use to access the
266-
request information. Have a look at the API for more information about them.
266+
The ``Request`` class has many other methods that you can use to access the
267+
request information. Have a look at
268+
:class:`the Request API<Symfony\\Component\\HttpFoundation\\Request>`
269+
for more information about them.
267270

268271
Response
269272
--------

‎cookbook/assetic/asset_management.rst

Copy file name to clipboardExpand all lines: cookbook/assetic/asset_management.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ by Symfony (as the asset files are in the ``dev`` environment). This is on
359359
purpose - letting Symfony generate these files dynamically in a production
360360
environment is just too slow.
361361

362+
.. _cookbook-asetic-dump-prod:
363+
362364
Instead, each time you use your app in the ``prod`` environment (and therefore,
363365
each time you deploy), you should run the following task:
364366

‎cookbook/assetic/index.rst

Copy file name to clipboardExpand all lines: cookbook/assetic/index.rst
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Assetic
55
:maxdepth: 2
66

77
asset_management
8+
uglifyjs
89
yuicompressor
910
jpeg_optimize
1011
apply_to_option

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.