Skip to content

Commit

Permalink
Merge branch '2.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Nov 1, 2015
2 parents d7ae2a0 + 9068bc0 commit d8db51a
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 41 deletions.
2 changes: 1 addition & 1 deletion components/console/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,6 @@ Learn More!
* :doc:`/components/console/console_arguments`

.. _Packagist: https://packagist.org/packages/symfony/console
.. _ConEmu: https://code.google.com/p/conemu-maximus5/
.. _ConEmu: https://conemu.github.io/
.. _ANSICON: https://github.com/adoxa/ansicon/releases
.. _Mintty: https://mintty.github.io/
24 changes: 12 additions & 12 deletions components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ can be accessed via several public properties:

* ``server``: equivalent of ``$_SERVER``;

* ``headers``: mostly equivalent to a sub-set of ``$_SERVER``
* ``headers``: mostly equivalent to a subset of ``$_SERVER``
(``$request->headers->get('User-Agent')``).

Each property is a :class:`Symfony\\Component\\HttpFoundation\\ParameterBag`
Expand All @@ -90,7 +90,7 @@ instance (or a sub-class of), which is a data holder class:
* ``headers``: :class:`Symfony\\Component\\HttpFoundation\\HeaderBag`.

All :class:`Symfony\\Component\\HttpFoundation\\ParameterBag` instances have
methods to retrieve and update its data:
methods to retrieve and update their data:

:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::all`
Returns the parameters.
Expand Down Expand Up @@ -157,16 +157,16 @@ sometimes, you might want to get the value for the "original" parameter name:
:method:`Symfony\\Component\\HttpFoundation\\Request::get` via the third
argument::

// the query string is '?foo[bar]=bar'
// the query string is '?foo[bar]=bar'

$request->query->get('foo');
// returns array('bar' => 'bar')
$request->query->get('foo');
// returns array('bar' => 'bar')

$request->query->get('foo[bar]');
// returns null
$request->query->get('foo[bar]');
// returns null

$request->query->get('foo[bar]', null, true);
// returns 'bar'
$request->query->get('foo[bar]', null, true);
// returns 'bar'

.. _component-foundation-attributes:

Expand Down Expand Up @@ -255,8 +255,8 @@ by using the following methods:
:method:`Symfony\\Component\\HttpFoundation\\Request::getEncodings`
Returns the list of accepted encodings ordered by descending quality.

.. versionadded:: 2.4
The ``getEncodings()`` method was introduced in Symfony 2.4.
.. versionadded:: 2.4
The ``getEncodings()`` method was introduced in Symfony 2.4.

If you need to get full access to parsed data from ``Accept``, ``Accept-Language``,
``Accept-Charset`` or ``Accept-Encoding``, you can use
Expand Down Expand Up @@ -515,7 +515,7 @@ You can still set the ``Content-Type`` of the sent file, or change its ``Content
.. versionadded:: 2.6
The ``deleteFileAfterSend()`` method was introduced in Symfony 2.6.

It is possible to delete the file after the request is sent with the
It is possible to delete the file after the request is sent with the
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
Please note that this will not work when the ``X-Sendfile`` header is set.

Expand Down
3 changes: 2 additions & 1 deletion components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ The :class:`Symfony\\Component\\Process\\Process` class allows you to execute
a command in a sub-process::

use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;

$process = new Process('ls -lsa');
$process->run();

// executes after the command finishes
if (!$process->isSuccessful()) {
throw new \RuntimeException($process->getErrorOutput());
throw new ProcessFailedException($process);
}

echo $process->getOutput();
Expand Down
14 changes: 3 additions & 11 deletions cookbook/controller/error_pages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,16 @@ is undefined. The solution is to add the following check before using this funct
{# ... #}
{% endif %}
.. _testing-error-pages:

Testing Error Pages during Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

While you're in the development environment, Symfony shows the big *exception*
page instead of your shiny new customized error page. So, how can you see
what it looks like and debug it?

The recommended solution is to use a third-party bundle called `WebfactoryExceptionsBundle`_.
This bundle provides a special test controller that allows you to easily display
custom error pages for arbitrary HTTP status codes even when ``kernel.debug`` is
set to ``true``.

.. _testing-error-pages:

Testing Error Pages during Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The default ``ExceptionController`` also allows you to preview your
Fortunately, the default ``ExceptionController`` allows you to preview your
*error* pages during development.

.. versionadded:: 2.6
Expand Down
6 changes: 4 additions & 2 deletions cookbook/event_dispatcher/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ or a "sub request"::
Certain things, like checking information on the *real* request, may not need to
be done on the sub-request listeners.

Events or Subscribers
---------------------
.. _events-or-subscribers:

Listeners or Subscribers
------------------------

Listeners and subscribers can be used in the same application indistinctly. The
decision to use either of them is usually a matter of personal taste. However,
Expand Down
7 changes: 3 additions & 4 deletions cookbook/psr7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Installation

You can install the component in 2 different ways:

* :doc:`Install it via Composer </components/using_components>` (``symfony/psr-http-message-bridge`` on `Packagist`_);
* :doc:`Install it via Composer </components/using_components>` (`symfony/psr-http-message-bridge on Packagist <https://packagist.org/packages/symfony/psr-http-message-bridge>`_);
* Use the official Git repository (https://github.com/symfony/psr-http-message-bridge).

The bridge also needs a PSR-7 implementation to allow converting HttpFoundation
objects to PSR-7 objects. It provides native support for `Zend Diactoros`_.
Use Composer (``zendframework/zend-diactoros`` on `Packagist`_) or refer to
the project documentation to install it.
Use Composer (`zendframework/zend-diactoros on Packagist <https://packagist.org/packages/zendframework/zend-diactoros>`_)
or refer to the project documentation to install it.

Usage
-----
Expand Down Expand Up @@ -85,5 +85,4 @@ to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::
$symfonyResponse = $httpFoundationFactory->createResponse($psrResponse);

.. _`PSR-7`: http://www.php-fig.org/psr/psr-7/
.. _Packagist: https://packagist.org/packages/symfony/psr-http-message-bridge
.. _`Zend Diactoros`: https://github.com/zendframework/zend-diactoros
4 changes: 2 additions & 2 deletions cookbook/routing/custom_route_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A custom route loader does not enable your bundle to inject routes
without the need to modify the routing configuration
(e.g. ``app/config/routing.yml``) manually.
If your bundle provides routes, whether via a configuration file, like
the `WebProfilerBundle` does, or via a custom route loader, like the
the `WebProfilerBundle` does, or via a custom route loader, like the
`FOSRestBundle`_ does, an entry in the routing configuration is always
necessary.

Expand Down Expand Up @@ -46,7 +46,7 @@ Take these lines from the ``routing.yml`` in the Symfony Standard Edition:
# app/config/routing.yml
app:
resource: @AppBundle/Controller/
resource: "@AppBundle/Controller/"
type: annotation
When the main loader parses this, it tries all registered delegate loaders and calls
Expand Down
2 changes: 1 addition & 1 deletion cookbook/web_server/built_in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ can change the socket passing an IP address and a port as a command-line argumen

.. code-block:: bash
$ php app/console server:run 192.168.0.1:8080
$ php app/console server:start 192.168.0.1:8080
.. note::

Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/twig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TwigBundle Configuration ("twig")
# The following were added in Symfony 2.3.
# See http://twig.sensiolabs.org/doc/recipes.html#using-the-template-name-to-set-the-default-escaping-strategy
autoescape_service: ~ # Example: @my_service
autoescape_service: ~ # Example: "@my_service"
autoescape_service_method: ~ # use in combination with autoescape_service option
base_template_class: ~ # Example: Twig_Template
cache: "%kernel.cache_dir%/twig"
Expand Down
12 changes: 6 additions & 6 deletions reference/forms/types/collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ the empty values will be kept.
entry_options
~~~~~~~~~~~~~

.. versionadded:: 2.7
The ``entry_options`` option was introduced in Symfony 2.7 in favor of
``options``, which is available prior to 2.7.
.. versionadded:: 2.8
The ``entry_options`` option was introduced in Symfony 2.8 in favor of
``options``, which is available prior to 2.8.

**type**: ``array`` **default**: ``array()``

Expand All @@ -303,9 +303,9 @@ type::
entry_type
~~~~~~~~~~

.. versionadded:: 2.7
The ``entry_type`` option was introduced in Symfony 2.7 in favor of
``type``, which is available prior to 2.7.
.. versionadded:: 2.8
The ``entry_type`` option was introduced in Symfony 2.8 in favor of
``type``, which is available prior to 2.8.

**type**: ``string`` or :class:`Symfony\\Component\\Form\\FormTypeInterface` **required**

Expand Down

0 comments on commit d8db51a

Please sign in to comment.