Skip to content

Commit b4bcd86

Browse files
committed
Merge branch '2.2' into 2.3
Conflicts: book/templating.rst quick_tour/the_big_picture.rst
2 parents a17de55 + 02ff9f0 commit b4bcd86

File tree

10 files changed

+167
-158
lines changed

10 files changed

+167
-158
lines changed

book/http_fundamentals.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
430430
.. code-block:: xml
431431
432432
<route id="contact" path="/contact">
433-
<default key="_controller">AcmeBlogBundle:Main:contact</default>
433+
<default key="_controller">AcmeDemoBundle:Main:contact</default>
434434
</route>
435435
436436
.. code-block:: php
@@ -441,7 +441,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
441441
442442
$collection = new RouteCollection();
443443
$collection->add('contact', new Route('/contact', array(
444-
'_controller' => 'AcmeBlogBundle:Main:contact',
444+
'_controller' => 'AcmeDemoBundle:Main:contact',
445445
)));
446446
447447
return $collection;

book/installation.rst

-6
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ All public files and the front controller that handles incoming requests in
127127
a Symfony2 application live in the ``Symfony/web/`` directory. So, assuming
128128
you unpacked the archive into your web server's or virtual host's document root,
129129
your application's URLs will start with ``http://localhost/Symfony/web/``.
130-
To get nice and short URLs you should point the document root of your web
131-
server or virtual host to the ``Symfony/web/`` directory. Though this is not
132-
required for development it is recommended when your application goes into
133-
production as all system and configuration files become inaccessible to clients.
134-
For information on configuring your specific web server document root, see
135-
the following documentation: `Apache`_ | `Nginx`_ .
136130

137131
.. note::
138132

book/page_creation.rst

+36
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,42 @@ HTTP response.
2222
Symfony2 follows this philosophy and provides you with tools and conventions
2323
to keep your application organized as it grows in users and complexity.
2424

25+
.. index::
26+
single: Page creation; Environments & Front Controllers
27+
28+
.. _page-creation-environments:
29+
30+
Environments & Front Controllers
31+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
33+
Every Symfony application runs within an :term:`environment`. An environment
34+
is a specific set of configuration and loaded bundles, represented by a string.
35+
The same application can be run with different configurations by running the
36+
application in different environments. Symfony2 comes with three environments
37+
defined — ``dev``, ``test`` and ``prod`` — but you can create your own as well.
38+
39+
Environments are useful by allowing a single application to have a dev environment
40+
built for debugging and a production environment optimized for speed. You might
41+
also load specific bundles based on the selected environment. For example,
42+
Symfony2 comes with the WebProfilerBundle (described below), enabled only
43+
in the ``dev`` and ``test`` environments.
44+
45+
Symfony2 comes with two web-accessible front controllers: ``app_dev.php``
46+
provides the ``dev`` environment, and ``app.php`` provides the ``prod`` environment.
47+
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
49+
doesn't have a dedicated front controller. The console tool also provides a
50+
front controller that can be used with any environment.)
51+
52+
When the front controller initializes the kernel, it provides two parameters:
53+
the environment, and also whether the kernel should run in debug mode.
54+
To make your application respond faster, Symfony2 maintains a cache under the
55+
``app/cache/`` directory. When in debug mode is enabled (such as ``app_dev.php``
56+
does by default), this cache is flushed automatically whenever you make changes
57+
to any code or configuration. When running in debug mode, Symfony2 runs
58+
slower, but your changes are reflected without having to manually clear the
59+
cache.
60+
2561
.. index::
2662
single: Page creation; Example
2763

book/propel.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ Create the classes:
353353
354354
$ php app/console propel:model:build
355355
356-
Assuming you have products in your database, you don't want lose them. Thanks to
356+
Assuming you have products in your database, you don't want to lose them. Thanks to
357357
migrations, Propel will be able to update your database without losing existing
358358
data.
359359

@@ -362,7 +362,7 @@ data.
362362
$ php app/console propel:migration:generate-diff
363363
$ php app/console propel:migration:migrate
364364
365-
Your database has been updated, you can continue to write your application.
365+
Your database has been updated, you can continue writing your application.
366366

367367
Saving Related Objects
368368
~~~~~~~~~~~~~~~~~~~~~~

book/templating.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ template name follows the same typical convention. The ``articleDetails.html.twi
564564
template uses an ``article`` variable, which we pass to it. In this case,
565565
you could avoid doing this entirely, as all of the variables available in
566566
``list.html.twig`` are also available in ``articleDetails.html.twig`` (unless
567-
you set `with_context<twig_include_function>`_ to false).
567+
you set `with_context`_ to false).
568568

569569
.. tip::
570570

@@ -573,9 +573,8 @@ you set `with_context<twig_include_function>`_ to false).
573573
elements, it would look like this: ``{'foo': foo, 'bar': bar}``.
574574

575575
.. versionadded:: 2.2
576-
The `include()<twig_include_function>`_ function is a new Twig feature
577-
that's available in Symfony 2.2. Prior, the `{% include %}<twig_include_tag>`_
578-
tag was used.
576+
The `include() function`_ is a new Twig feature that's available in Symfony
577+
2.2. Prior, the `{% include %} tag`_ tag was used.
579578

580579
.. index::
581580
single: Templating; Embedding action
@@ -1532,5 +1531,6 @@ Learn more from the Cookbook
15321531
.. _`filters`: http://twig.sensiolabs.org/doc/filters/index.html
15331532
.. _`add your own extensions`: http://twig.sensiolabs.org/doc/advanced.html#creating-an-extension
15341533
.. _`hinclude.js`: http://mnot.github.com/hinclude/
1535-
.. _`twig_include_function`: http://twig.sensiolabs.org/doc/functions/include.html
1536-
.. _`twig_include_tag`: http://twig.sensiolabs.org/doc/tags/include.html
1534+
.. _`with_context`: http://twig.sensiolabs.org/doc/functions/include.html
1535+
.. _`include() function`: http://twig.sensiolabs.org/doc/functions/include.html
1536+
.. _`{% include %} tag`: http://twig.sensiolabs.org/doc/tags/include.html

book/testing.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,7 @@ narrow down your node selection by chaining the method calls::
544544

545545
$crawler
546546
->filter('h1')
547-
->reduce(function ($node, $i)
548-
{
547+
->reduce(function ($node, $i) {
549548
if (!$node->getAttribute('class')) {
550549
return false;
551550
}

components/http_foundation/introduction.rst

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ You can install the component in 2 different ways:
2424
* Use the official Git repository (https://github.com/symfony/HttpFoundation);
2525
* :doc:`Install it via Composer </components/using_components>` (``symfony/http-foundation`` on `Packagist`_).
2626

27+
.. _component-http-foundation-request:
28+
2729
Request
2830
-------
2931

@@ -267,6 +269,8 @@ request information. Have a look at
267269
:class:`the Request API<Symfony\\Component\\HttpFoundation\\Request>`
268270
for more information about them.
269271

272+
.. _component-http-foundation-response:
273+
270274
Response
271275
--------
272276

cookbook/security/entity_provider.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ of the application::
632632
For brevity, the getter and setter methods are hidden, but you can
633633
:ref:`generate them <book-doctrine-generating-getters-and-setters>`:
634634
635-
.. code-block:: bas
635+
.. code-block:: bash
636636
637637
$ php app/console doctrine:generate:entities Acme/UserBundle/Entity/User
638638

0 commit comments

Comments
 (0)