Skip to content

Commit

Permalink
Merge branch '2.3' into 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Apr 26, 2015
2 parents 134268e + cac0a9c commit e7d40c3
Show file tree
Hide file tree
Showing 18 changed files with 375 additions and 347 deletions.
2 changes: 1 addition & 1 deletion best_practices/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ everywhere in your application. When using parameters, they are only available
from places with access to the Symfony container.

Constants can be used for example in your Twig templates thanks to the
``constant()`` function:
`constant() function`_:

.. code-block:: html+jinja

Expand Down
2 changes: 1 addition & 1 deletion best_practices/i18n.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ English in the application would be:

.. code-block:: xml
<!-- app/Resources/translations/messages.en.xliff -->
<!-- app/Resources/translations/messages.en.xlf -->
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" target-language="en" datatype="plaintext" original="file.ext">
Expand Down
14 changes: 7 additions & 7 deletions book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ different formats, XLIFF being the recommended format:

.. code-block:: xml
<!-- messages.fr.xliff -->
<!-- messages.fr.xlf -->
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
Expand Down Expand Up @@ -356,18 +356,18 @@ must be named according to the following path: ``domain.locale.loader``:

* **locale**: The locale that the translations are for (e.g. ``en_GB``, ``en``, etc);

* **loader**: How Symfony should load and parse the file (e.g. ``xliff``,
* **loader**: How Symfony should load and parse the file (e.g. ``xlf``,
``php``, ``yml``, etc).

The loader can be the name of any registered loader. By default, Symfony
provides many loaders, including:

* ``xliff``: XLIFF file;
* ``xlf``: XLIFF file;
* ``php``: PHP file;
* ``yml``: YAML file.

The choice of which loader to use is entirely up to you and is a matter of
taste. The recommended option is to use ``xliff`` for translations.
taste. The recommended option is to use ``xlf`` for translations.
For more options, see :ref:`component-translator-message-catalogs`.

.. note::
Expand Down Expand Up @@ -397,10 +397,10 @@ key ``Symfony is great``. To find the French translation, Symfony actually
checks translation resources for several locales:

#. First, Symfony looks for the translation in a ``fr_FR`` translation resource
(e.g. ``messages.fr_FR.xliff``);
(e.g. ``messages.fr_FR.xlf``);

#. If it wasn't found, Symfony looks for the translation in a ``fr`` translation
resource (e.g. ``messages.fr.xliff``);
resource (e.g. ``messages.fr.xlf``);

#. If the translation still isn't found, Symfony uses the ``fallbacks`` configuration
parameter, which defaults to ``en`` (see `Configuration`_).
Expand Down Expand Up @@ -662,7 +662,7 @@ bundle.

.. code-block:: xml
<!-- validators.en.xliff -->
<!-- validators.en.xlf -->
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
Expand Down
1 change: 1 addition & 0 deletions components/security/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ Sections
* :doc:`/components/security/firewall`
* :doc:`/components/security/authentication`
* :doc:`/components/security/authorization`
* :doc:`/components/security/secure_tools`

.. _Packagist: https://packagist.org/packages/symfony/security
10 changes: 5 additions & 5 deletions components/translation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ organization, translations were split into three different domains:
loaded like this::

// ...
$translator->addLoader('xliff', new XliffFileLoader());
$translator->addLoader('xlf', new XliffFileLoader());

$translator->addResource('xliff', 'messages.fr.xliff', 'fr_FR');
$translator->addResource('xliff', 'admin.fr.xliff', 'fr_FR', 'admin');
$translator->addResource('xlf', 'messages.fr.xlf', 'fr_FR');
$translator->addResource('xlf', 'admin.fr.xlf', 'fr_FR', 'admin');
$translator->addResource(
'xliff',
'navigation.fr.xliff',
'xlf',
'navigation.fr.xlf',
'fr_FR',
'navigation'
);
Expand Down
12 changes: 8 additions & 4 deletions cookbook/composer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
Installing Composer
===================

`Composer`_ is the package manager used by modern PHP applications and the
recommended way to install Symfony2.
`Composer`_ is the package manager used by modern PHP applications. Use Composer
to manage dependencies in your Symfony applications and to install Symfony Components
in your PHP projects.

It's recommended to install Composer globally in your system as explained in the
following sections.

Install Composer on Linux and Mac OS X
--------------------------------------
Expand Down Expand Up @@ -37,8 +41,8 @@ the instructions.
Learn more
----------

You can read more about Composer in `its documentation`_.
Read the `Composer documentation`_ to learn more about its usage and features.

.. _`Composer`: https://getcomposer.org/
.. _`getcomposer.org/download`: https://getcomposer.org/download
.. _`its documentation`: https://getcomposer.org/doc/00-intro.md
.. _`Composer documentation`: https://getcomposer.org/doc/00-intro.md
6 changes: 3 additions & 3 deletions cookbook/configuration/configuration_organization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class::

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}

Expand Down Expand Up @@ -101,7 +101,7 @@ method::

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/'.$this->getEnvironment().'/config.yml');
$loader->load($this->getRootDir().'/config/'.$this->getEnvironment().'/config.yml');
}
}

Expand Down Expand Up @@ -199,7 +199,7 @@ make Symfony aware of the new file organization::

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/environments/'.$this->getEnvironment().'.yml');
$loader->load($this->getRootDir().'/config/environments/'.$this->getEnvironment().'.yml');
}
}

Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class:
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
}
}
Expand Down
8 changes: 4 additions & 4 deletions cookbook/configuration/web_server_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The **minimum configuration** to get your application running under Apache is:
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeScript assets
# <Directory /var/www/project>
# Option FollowSymlinks
# Options FollowSymlinks
# </Directory>
ErrorLog /var/log/apache2/project_error.log
Expand Down Expand Up @@ -90,7 +90,7 @@ and increase web server performance:
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeScript assets
# <Directory /var/www/project>
# Option FollowSymlinks
# Options FollowSymlinks
# </Directory>
ErrorLog /var/log/apache2/project_error.log
Expand Down Expand Up @@ -194,7 +194,7 @@ directive to pass requests for PHP files to PHP FPM:
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeScript assets
# <Directory /var/www/project>
# Option FollowSymlinks
# Options FollowSymlinks
# </Directory>
ErrorLog /var/log/apache2/project_error.log
Expand Down Expand Up @@ -230,7 +230,7 @@ should look something like this:
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeScript assets
# <Directory /var/www/project>
# Option FollowSymlinks
# Options FollowSymlinks
# </Directory>
ErrorLog /var/log/apache2/project_error.log
Expand Down
4 changes: 2 additions & 2 deletions cookbook/routing/slash_in_parameter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ a more permissive regex path.
class DemoController
{
/**
* @Route("/hello/{name}", name="_hello", requirements={"name"=".+"})
* @Route("/hello/{username}", name="_hello", requirements={"username"=".+"})
*/
public function helloAction($name)
public function helloAction($username)
{
// ...
}
Expand Down
10 changes: 5 additions & 5 deletions cookbook/security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,11 @@ and password ``admin`` (which has been encoded).
.. code-block:: bash
$ mysql> SELECT * FROM app_users;
+----+----------+------------------------------------------+--------------------+-----------+
| id | username | password | email | is_active |
+----+----------+------------------------------------------+--------------------+-----------+
| 1 | admin | d033e22ae348aeb5660fc2140aec35850c4da997 | admin@example.com | 1 |
+----+----------+------------------------------------------+--------------------+-----------+
+----+----------+--------------------------------------------------------------+--------------------+-----------+
| id | username | password | email | is_active |
+----+----------+--------------------------------------------------------------+--------------------+-----------+
| 1 | admin | $2a$08$jHZj/wJfcVKlIwr5AvR78euJxYK7Ku5kURNhNx.7.CSIJ3Pq6LEPC | admin@example.com | 1 |
+----+----------+--------------------------------------------------------------+--------------------+-----------+
.. sidebar:: Do you need to a Salt property?

Expand Down
2 changes: 1 addition & 1 deletion cookbook/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Here is an example on how to load the
# app/config/services.yml
services:
get_set_method_normalizer:
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
class: Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer
tags:
- { name: serializer.normalizer }
Expand Down
5 changes: 2 additions & 3 deletions cookbook/service_container/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ using a special "tag":
.. note::

There is an additional tag option ``priority`` that is optional and defaults
to 0. This value can be from -255 to 255, and the listeners will be executed
in the order of their priority (highest to lowest). This is useful when
you need to guarantee that one listener is executed before another.
to 0. The listeners will be executed in the order of their priority (highest to lowest).
This is useful when you need to guarantee that one listener is executed before another.

Request Events, Checking Types
------------------------------
Expand Down
Loading

0 comments on commit e7d40c3

Please sign in to comment.