Skip to content

Commit 6f286e1

Browse files
committed
Merge branch '2.3' into 2.4
Conflicts: reference/forms/types/integer.rst reference/forms/types/number.rst
2 parents fb781dd + bb97656 commit 6f286e1

File tree

75 files changed

+385
-281
lines changed

Some content is hidden

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

75 files changed

+385
-281
lines changed

README.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Contributing
88

99
>**Note**
1010
>Unless you're documenting a feature that's new to a specific version of Symfony
11-
>(e.g. Symfony 2.3), all pull requests must be based off of the **2.2** branch,
11+
>(e.g. Symfony 2.3), all pull requests must be based off of the **2.2** branch,
1212
>**not** the master or 2.3 branch.
1313
1414
We love contributors! For more information on how you can contribute to the
15-
Symfony documentation, please read
16-
[Contributing to the Documentation](http://symfony.com/doc/current/contributing/documentation/overview.html)
15+
Symfony documentation, please read
16+
[Contributing to the Documentation](http://symfony.com/doc/current/contributing/documentation/overview.html)

book/controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ the ``notice`` message:
726726

727727
.. code-block:: html+php
728728

729-
<?php foreach ($view['session']->getFlashBag()->get('notice') as $message): ?>
729+
<?php foreach ($view['session']->getFlash('notice') as $message): ?>
730730
<div class="flash-notice">
731731
<?php echo "<div class='flash-error'>$message</div>" ?>
732732
</div>

book/forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ form with many ``Product`` sub-forms). This is done by using the ``collection``
13601360
field type.
13611361
13621362
For more information see the ":doc:`/cookbook/form/form_collections`" cookbook
1363-
entry and the :doc:`collection </reference/forms/types/collection>` field type reference.
1363+
entry and the :doc:`collection </reference/forms/types/collection>` field type reference.
13641364
13651365
.. index::
13661366
single: Forms; Theming

book/http_cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,12 +904,12 @@ matter), Symfony2 uses the standard ``render`` helper to configure ESI tags:
904904

905905
<?php echo $view['actions']->render(
906906
new ControllerReference('...:news', array('max' => 5)),
907-
array('renderer' => 'esi'))
907+
array('strategy' => 'esi'))
908908
?>
909909

910910
<?php echo $view['actions']->render(
911911
$view['router']->generate('latest_news', array('max' => 5), true),
912-
array('renderer' => 'esi'),
912+
array('strategy' => 'esi'),
913913
) ?>
914914

915915
By using the ``esi`` renderer (via the ``render_esi`` Twig function), you

book/installation.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ have curl installed, it's as easy as:
4444

4545
.. code-block:: bash
4646
47-
curl -s https://getcomposer.org/installer | php
47+
$ curl -s https://getcomposer.org/installer | php
4848
4949
.. note::
5050

@@ -135,7 +135,7 @@ Updating Vendors
135135

136136
At this point, you've downloaded a fully-functional Symfony project in which
137137
you'll start to develop your own application. A Symfony project depends on
138-
a number of external libraries. These are downloaded into the `vendor/` directory
138+
a number of external libraries. These are downloaded into the ``vendor/`` directory
139139
of your project via a library called `Composer`_.
140140

141141
Depending on how you downloaded Symfony, you may or may not need to update
@@ -146,7 +146,7 @@ Step 1: Get `Composer`_ (The great new PHP packaging system)
146146

147147
.. code-block:: bash
148148
149-
curl -s http://getcomposer.org/installer | php
149+
$ curl -s http://getcomposer.org/installer | php
150150
151151
Make sure you download ``composer.phar`` in the same folder where
152152
the ``composer.json`` file is located (this is your Symfony project
@@ -169,8 +169,8 @@ Symfony itself - into the ``vendor/`` directory.
169169

170170
.. code-block:: bash
171171
172-
php installer
173-
php composer.phar install
172+
$ php installer
173+
$ php composer.phar install
174174
175175
.. tip::
176176

@@ -231,7 +231,7 @@ If there are any issues, correct them now before moving on.
231231
$ rm -rf app/cache/*
232232
$ rm -rf app/logs/*
233233
234-
$ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1`
234+
$ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data' | grep -v root | head -1 | cut -d\ -f1`
235235
$ sudo chmod +a "$APACHEUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
236236
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
237237
@@ -246,7 +246,7 @@ If there are any issues, correct them now before moving on.
246246

247247
.. code-block:: bash
248248
249-
$ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1`
249+
$ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data' | grep -v root | head -1 | cut -d\ -f1`
250250
$ sudo setfacl -R -m u:"$APACHEUSER":rwX -m u:`whoami`:rwX app/cache app/logs
251251
$ sudo setfacl -dR -m u:"$APACHEUSER":rwX -m u:`whoami`:rwX app/cache app/logs
252252

book/page_creation.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ also load specific bundles based on the selected environment. For example,
4242
Symfony2 comes with the WebProfilerBundle (described below), enabled only
4343
in the ``dev`` and ``test`` environments.
4444

45-
Symfony2 comes with two web-accessible front controllers: ``app_dev.php``
45+
Symfony2 comes with two web-accessible front controllers: ``app_dev.php``
4646
provides the ``dev`` environment, and ``app.php`` provides the ``prod`` environment.
4747
All web accesses to Symfony2 normally go through one of these front controllers.
48-
(The ``test`` environment is normally only used when running unit tests, and so
48+
(The ``test`` environment is normally only used when running unit tests, and so
4949
doesn't have a dedicated front controller. The console tool also provides a
5050
front controller that can be used with any environment.)
5151

@@ -555,7 +555,7 @@ You'll learn more about each of these directories in later chapters.
555555

556556
When Symfony is loading, a special file - ``vendor/autoload.php`` - is
557557
included. This file is created by Composer and will autoload all
558-
application files living in the `src/` folder as well as all
558+
application files living in the ``src/`` folder as well as all
559559
third-party libraries mentioned in the ``composer.json`` file.
560560

561561
Because of the autoloader, you never need to worry about using ``include``
@@ -864,18 +864,18 @@ Default Configuration Dump
864864
~~~~~~~~~~~~~~~~~~~~~~~~~~
865865

866866
You can dump the default configuration for a bundle in YAML to the console using
867-
the ``config:dump-reference`` command. Here is an example of dumping the default
867+
the ``config:dump-reference`` command. Here is an example of dumping the default
868868
FrameworkBundle configuration:
869869

870-
.. code-block:: text
870+
.. code-block:: bash
871871
872-
app/console config:dump-reference FrameworkBundle
872+
$ app/console config:dump-reference FrameworkBundle
873873
874874
The extension alias (configuration key) can also be used:
875875

876-
.. code-block:: text
876+
.. code-block:: bash
877877
878-
app/console config:dump-reference framework
878+
$ app/console config:dump-reference framework
879879
880880
.. note::
881881

book/performance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ command line, and might become part of your deploy process:
6060

6161
.. code-block:: bash
6262
63-
php composer.phar dump-autoload --optimize
63+
$ php composer.phar dump-autoload --optimize
6464
6565
Internally, this builds the big class map array in ``vendor/composer/autoload_classmap.php``.
6666

book/propel.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Creating the Database Tables/Schema
134134
Now you have a usable ``Product`` class and all you need to persist it. Of
135135
course, you don't yet have the corresponding ``product`` table in your
136136
database. Fortunately, Propel can automatically create all the database tables
137-
needed for every known model in your application. To do this, run:
137+
needed for every known model in your application. To do this, run:
138138

139139
.. code-block:: bash
140140
@@ -153,7 +153,7 @@ Persisting Objects to the Database
153153
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154154

155155
Now that you have a ``Product`` object and corresponding ``product`` table,
156-
you're ready to persist data to the database. From inside a controller, this
156+
you're ready to persist data to the database. From inside a controller, this
157157
is pretty easy. Add the following method to the ``DefaultController`` of the
158158
bundle::
159159

@@ -406,7 +406,7 @@ Fetching Related Objects
406406
~~~~~~~~~~~~~~~~~~~~~~~~
407407

408408
When you need to fetch associated objects, your workflow looks just like it did
409-
before. First, fetch a ``$product`` object and then access its related
409+
before. First, fetch a ``$product`` object and then access its related
410410
``Category``::
411411

412412
// ...
@@ -435,7 +435,7 @@ Lifecycle Callbacks
435435
-------------------
436436

437437
Sometimes, you need to perform an action right before or after an object is
438-
inserted, updated, or deleted. These types of actions are known as "lifecycle"
438+
inserted, updated, or deleted. These types of actions are known as "lifecycle"
439439
callbacks or "hooks", as they're callback methods that you need to execute
440440
during different stages of the lifecycle of an object (e.g. the object is
441441
inserted, updated, deleted, etc).

book/security.rst

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,59 +1593,6 @@ Now, all authentication mechanisms will use the ``chain_provider``, since
15931593
it's the first specified. The ``chain_provider`` will, in turn, try to load
15941594
the user from both the ``in_memory`` and ``user_db`` providers.
15951595

1596-
.. tip::
1597-
1598-
If you have no reasons to separate your ``in_memory`` users from your
1599-
``user_db`` users, you can accomplish this even more easily by combining
1600-
the two sources into a single provider:
1601-
1602-
.. configuration-block::
1603-
1604-
.. code-block:: yaml
1605-
1606-
# app/config/security.yml
1607-
security:
1608-
providers:
1609-
main_provider:
1610-
memory:
1611-
users:
1612-
foo: { password: test }
1613-
entity:
1614-
class: Acme\UserBundle\Entity\User,
1615-
property: username
1616-
1617-
.. code-block:: xml
1618-
1619-
<!-- app/config/security.xml -->
1620-
<config>
1621-
<provider name=="main_provider">
1622-
<memory>
1623-
<user name="foo" password="test" />
1624-
</memory>
1625-
1626-
<entity class="Acme\UserBundle\Entity\User"
1627-
property="username" />
1628-
</provider>
1629-
</config>
1630-
1631-
.. code-block:: php
1632-
1633-
// app/config/security.php
1634-
$container->loadFromExtension('security', array(
1635-
'providers' => array(
1636-
'main_provider' => array(
1637-
'memory' => array(
1638-
'users' => array(
1639-
'foo' => array('password' => 'test'),
1640-
),
1641-
),
1642-
'entity' => array(
1643-
'class' => 'Acme\UserBundle\Entity\User',
1644-
'property' => 'username'),
1645-
),
1646-
),
1647-
));
1648-
16491596
You can also configure the firewall or individual authentication mechanisms
16501597
to use a specific provider. Again, unless a provider is specified explicitly,
16511598
the first provider is always used:

book/templating.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ Global Template Variables
10881088
-------------------------
10891089

10901090
During each request, Symfony2 will set a global template variable ``app``
1091-
in both Twig and PHP template engines by default. The ``app`` variable
1091+
in both Twig and PHP template engines by default. The ``app`` variable
10921092
is a :class:`Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables`
10931093
instance which will give you access to some application specific variables
10941094
automatically:
@@ -1361,7 +1361,7 @@ this classic example:
13611361

13621362
Imagine the user enters the following code for their name:
13631363

1364-
.. code-block:: text
1364+
.. code-block:: html
13651365

13661366
<script>alert('hello!')</script>
13671367

0 commit comments

Comments
 (0)