Skip to content

Commit

Permalink
Merge branch '2.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Nov 19, 2014
2 parents 0c92fab + f8226e2 commit 51224e9
Show file tree
Hide file tree
Showing 12 changed files with 299 additions and 185 deletions.
6 changes: 3 additions & 3 deletions best_practices/business-logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Inside here, you can create whatever directories you want to organize things:

.. code-block:: text
symfoy2-project/
symfony2-project/
├─ app/
├─ src/
│ └─ AppBundle/
Expand All @@ -33,7 +33,7 @@ and put things there:

.. code-block:: text
symfoy2-project/
symfony2-project/
├─ app/
├─ src/
│ ├─ Acme/
Expand Down Expand Up @@ -299,7 +299,7 @@ Then, enable the bundle in ``AppKernel.php``, but only for the ``dev`` and
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
// ...
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}
return $bundles;
Expand Down
2 changes: 1 addition & 1 deletion best_practices/web-assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tools like GruntJS.
comfortable with frontend tools like GruntJS.

`Assetic`_ is an asset manager capable of compiling assets developed with
a lot of different frontend technologies like LESS, Sass and CoffeScript.
a lot of different frontend technologies like LESS, Sass and CoffeeScript.
Combining all your assets with Assetic is a matter of wrapping all the assets
with a single Twig tag:

Expand Down
4 changes: 2 additions & 2 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,8 @@ normal ``Query`` object, which can be used to get the result of the query.
(``:price`` in the example above) as it prevents SQL injection attacks.

The ``getResult()`` method returns an array of results. To get only one
result, you can use ``getSingleResult()`` (which throws exception there is no
result) or ``getOneOrNullResult()``::
result, you can use ``getSingleResult()`` (which throws an exception if there
is no result) or ``getOneOrNullResult()``::

$product = $query->getOneOrNullResult();

Expand Down
4 changes: 2 additions & 2 deletions book/http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,7 @@ at some interval (the expiration) to verify that the content is still valid.
.. tip::

You can also define HTTP caching headers for expiration and validation by using
annotations. See the
`FrameworkExtraBundle documentation <http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/cache.html>`_.
annotations. See the `FrameworkExtraBundle documentation`_.

.. index::
pair: Cache; Configuration
Expand Down Expand Up @@ -1130,4 +1129,5 @@ Learn more from the Cookbook
.. _`HTTP Bis`: http://tools.ietf.org/wg/httpbis/
.. _`P4 - Conditional Requests`: http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional
.. _`P6 - Caching: Browser and intermediary caches`: http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache
.. _`FrameworkExtraBundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/cache.html
.. _`ESI`: http://www.w3.org/TR/esi-lang
2 changes: 1 addition & 1 deletion book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ see :ref:`route-parameters-controller-arguments`.
.. tip::

The special ``$_route`` variable is set to the name of the route that was
matced.
matched.

You can even add extra information to your route definition and access it
within your controller. For more information on this topic,
Expand Down
16 changes: 8 additions & 8 deletions components/dependency_injection/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ custom tag::
$taggedServices = $container->findTaggedServiceIds(
'acme_mailer.transport'
);
foreach ($taggedServices as $id => $attributes) {
foreach ($taggedServices as $id => $tags) {
$definition->addMethodCall(
'addTransport',
array(new Reference($id))
Expand All @@ -178,7 +178,7 @@ run when the container is compiled::
use Symfony\Component\DependencyInjection\ContainerBuilder;

$container = new ContainerBuilder();
$container->addCompilerPass(new TransportCompilerPass);
$container->addCompilerPass(new TransportCompilerPass());

.. note::

Expand Down Expand Up @@ -291,8 +291,8 @@ use this, update the compiler::
$taggedServices = $container->findTaggedServiceIds(
'acme_mailer.transport'
);
foreach ($taggedServices as $id => $tagAttributes) {
foreach ($tagAttributes as $attributes) {
foreach ($taggedServices as $id => $tags) {
foreach ($tags as $attributes) {
$definition->addMethodCall(
'addTransport',
array(new Reference($id), $attributes["alias"])
Expand All @@ -302,7 +302,7 @@ use this, update the compiler::
}
}

The trickiest part is the ``$attributes`` variable. Because you can use the
same tag many times on the same service (e.g. you could theoretically tag
the same service 5 times with the ``acme_mailer.transport`` tag), ``$attributes``
is an array of the tag information for each tag on that service.
The double loop may be confusing. This is because a service can have more than one
tag. You tag a service twice or more with the ``acme_mailer.transport`` tag. The
second foreach loop iterates over the ``acme_mailer.transport`` tags set for the
current service and gives you the attributes.
8 changes: 4 additions & 4 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

# adding PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers.compiled import CLexer
from pygments.lexers.web import PhpLexer
from pygments.lexers.agile import RubyLexer

# -- General configuration -----------------------------------------------------

Expand Down Expand Up @@ -101,9 +101,9 @@
lexers['php-annotations'] = PhpLexer(startinline=True)
lexers['php-standalone'] = PhpLexer(startinline=True)
lexers['php-symfony'] = PhpLexer(startinline=True)
lexers['varnish2'] = RubyLexer()
lexers['varnish3'] = RubyLexer()
lexers['varnish4'] = RubyLexer()
lexers['varnish2'] = CLexer()
lexers['varnish3'] = CLexer()
lexers['varnish4'] = CLexer()

config_block = {
'varnish2': 'Varnish 2',
Expand Down
8 changes: 6 additions & 2 deletions contributing/community/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,16 @@ Version Feature Freeze Release End of Maintenance End of Life
2.4 09/2013 11/2013 09/2014 (10 months [1]_) 01/2015
2.5 02/2014 05/2014 01/2015 (8 months) 07/2015
2.6 09/2014 11/2014 07/2015 (8 months) 01/2016
**2.7** 02/2015 05/2015 05/2018 (36 months) 05/2019
2.8 09/2015 11/2015 07/2016 (8 months) 01/2017
**2.7** 02/2015 05/2015 05/2018 (36 months [2]_) 05/2019
3.0 09/2015 11/2015 07/2016 (8 months) 01/2017
3.1 02/2016 05/2016 01/2017 (8 months) 07/2017
3.2 09/2016 11/2016 07/2017 (8 months) 01/2018
**3.3** 02/2017 05/2017 05/2020 (36 months) 05/2021
... ... ... ... ...
======= ============== ======= ======================== ===========

.. [1] Symfony 2.4 maintenance has been `extended to September 2014`_.
.. [2] Symfony 2.7 is the last version of the Symfony 2.x branch.
.. tip::

Expand Down
8 changes: 4 additions & 4 deletions cookbook/cache/varnish.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ First, configure Varnish so that it advertises its ESI support by adding a
``Surrogate-Capability`` header to requests forwarded to the backend
application:

.. code-block:: text
.. code-block:: varnish4
sub vcl_recv {
// Add a Surrogate-Capability header to announce ESI support.
Expand Down Expand Up @@ -137,7 +137,7 @@ proxy before it has expired, it adds complexity to your caching setup.
Varnish can be configured to accept a special HTTP ``PURGE`` method
that will invalidate the cache for a given resource:

.. code-block:: text
.. code-block:: varnish4
/*
Connect to the backend server
Expand Down Expand Up @@ -186,7 +186,7 @@ that will invalidate the cache for a given resource:
You must protect the ``PURGE`` HTTP method somehow to avoid random people
purging your cached data. You can do this by setting up an access list:

.. code-block:: text
.. code-block:: varnish4
/*
Connect to the backend server
Expand Down Expand Up @@ -252,7 +252,7 @@ is 80 and not 8080.
If this header weren't set properly, Symfony may append ``8080`` when generating
absolute URLs:

.. code-block:: text
.. code-block:: varnish4
sub vcl_recv {
if (req.http.X-Forwarded-Proto == "https" ) {
Expand Down
Loading

0 comments on commit 51224e9

Please sign in to comment.