Skip to content

Commit

Permalink
Merge branch '2.8' into 3.0
Browse files Browse the repository at this point in the history
* 2.8:
  fix list items
  use valid XML in code block
  added Javier as a merger for the WebProfiler bundle
  use single quotes for YAML strings
  Typo in When Things Get More Advanced
  Remove phrase "in order"
  Fix by_reference deprecated FormType::class
  Remove excessive pluses
  [Reference] add missing version number
  replace EOL with EOM
  remove versionadded for unmaintained versions
  • Loading branch information
xabbuh committed Jan 27, 2016
2 parents c97d5bf + 15003d8 commit 8b31d63
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 70 deletions.
2 changes: 1 addition & 1 deletion best_practices/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ also show a 404 page if no ``Post`` can be found.
When Things Get More Advanced
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This works without any configuration because the wildcard name ``{id}`` matches
The above example works without any configuration because the wildcard name ``{id}`` matches
the name of the property on the entity. If this isn't true, or if you have
even more complex logic, the easiest thing to do is just query for the entity
manually. In our application, we have this situation in ``CommentController``:
Expand Down
4 changes: 0 additions & 4 deletions book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1829,10 +1829,6 @@ section.
The ``csrf_token_id`` option is optional but greatly enhances the security
of the generated token by making it different for each form.

.. versionadded:: 2.4
The ``csrf_token_id`` option was introduced in Symfony 2.4. Prior, you
had to use the ``intention`` option.

.. caution::

CSRF tokens are meant to be different for every user. This is why you
Expand Down
2 changes: 1 addition & 1 deletion book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ parameter and uses it in the service definition.

.. code-block:: xml
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>
<argument type="string">http://symfony.com/?foo=%%s&amp;bar=%%d</argument>
The purpose of parameters is to feed information into services. Of course
there was nothing wrong with defining the service without using any parameters.
Expand Down
3 changes: 0 additions & 3 deletions book/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,6 @@ document::
// ...or simply check that the response is a redirect to any URL
$this->assertTrue($client->getResponse()->isRedirect());

.. versionadded:: 2.4
Support for HTTP status code constants was introduced in Symfony 2.4.

.. index::
single: Tests; Client

Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/configurators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ The service config for the above classes would look something like this:
newsletter_manager:
class: NewsletterManager
calls:
- [setMailer, ["@my_mailer"]]
- [setMailer, ['@my_mailer']]
configurator: ['@email_configurator', configure]
greeting_card_manager:
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ method in the previous example takes the ``templating`` service as an argument:
class: NewsletterManager
factory: ["@newsletter_manager.factory", createNewsletterManager]
arguments:
- "@templating"
- '@templating'
.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ config files:
newsletter_manager:
class: NewsletterManager
calls:
- [setMailer, ["@mailer"]]
- [setMailer, ['@mailer']]
.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ the parameter value in one place if needed.
.. code-block:: xml
<argument>http://symfony.com/?foo=%%s&bar=%%d</argument>
<argument>http://symfony.com/?foo=%%s&amp;bar=%%d</argument>
.. code-block:: php
Expand Down
14 changes: 7 additions & 7 deletions components/dependency_injection/parentservices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ a parent for a service.
mail_manager:
abstract: true
calls:
- [setMailer, ["@my_mailer"]]
- [setEmailFormatter, ["@my_email_formatter"]]
- [setMailer, ['@my_mailer']]
- [setEmailFormatter, ['@my_email_formatter']]
newsletter_manager:
class: "NewsletterManager"
Expand Down Expand Up @@ -319,17 +319,17 @@ to the ``NewsletterManager`` class, the config would look like this:
mail_manager:
abstract: true
calls:
- [setMailer, ["@my_mailer"]]
- [setEmailFormatter, ["@my_email_formatter"]]
- [setMailer, ['@my_mailer']]
- [setEmailFormatter, ['@my_email_formatter']]
newsletter_manager:
class: "NewsletterManager"
class: 'NewsletterManager'
parent: mail_manager
calls:
- [setMailer, ["@my_alternative_mailer"]]
- [setMailer, ['@my_alternative_mailer']]
greeting_card_manager:
class: "GreetingCardManager"
class: 'GreetingCardManager'
parent: mail_manager
.. code-block:: xml
Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ that accepts the dependency::
newsletter_manager:
class: NewsletterManager
calls:
- [setMailer, ["@my_mailer"]]
- [setMailer, ['@my_mailer']]
.. code-block:: xml
Expand Down
6 changes: 0 additions & 6 deletions components/form/form_events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ View data Normalized data transformed using a view transformer

.. sidebar:: ``FormEvents::POST_SET_DATA`` in the Form component

.. versionadded:: 2.4
The data collector extension was introduced in Symfony 2.4.

The ``Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener``
class is subscribed to listen to the ``FormEvents::POST_SET_DATA`` event
in order to collect information about the forms from the denormalized
Expand Down Expand Up @@ -226,9 +223,6 @@ View data Normalized data transformed using a view transformer

.. sidebar:: ``FormEvents::POST_SUBMIT`` in the Form component

.. versionadded:: 2.4
The data collector extension was introduced in Symfony 2.4.

The ``Symfony\Component\Form\Extension\DataCollector\EventListener\DataCollectorListener``
subscribes to the ``FormEvents::POST_SUBMIT`` event in order to collect
information about the forms.
Expand Down
3 changes: 0 additions & 3 deletions components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ 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.

If you need to get full access to parsed data from ``Accept``, ``Accept-Language``,
``Accept-Charset`` or ``Accept-Encoding``, you can use
:class:`Symfony\\Component\\HttpFoundation\\AcceptHeader` utility class::
Expand Down
9 changes: 7 additions & 2 deletions contributing/code/core_team.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ Active Core Members
* **Abdellatif AitBoudad** (`aitboudad`_) can merge into the Translation_
component;

* **Jakub Zalas** (`jakzal`_) can merge into the DomCrawler_ component.
* **Jakub Zalas** (`jakzal`_) can merge into the DomCrawler_ component;

* **Christian Flothmann** (`xabbuh`_) can merge into the Yaml_ component.
* **Christian Flothmann** (`xabbuh`_) can merge into the Yaml_ component;

* **Javier Eguiluz** (`javiereguiluz`_) can merge into the WebProfilerBundle_
bundle.

* **Deciders** (``@symfony/deciders`` on GitHub):

Expand Down Expand Up @@ -177,6 +180,7 @@ discretion of the **Project Leader**.
.. _Validator: https://github.com/symfony/validator
.. _VarDumper: https://github.com/symfony/var-dumper
.. _Yaml: https://github.com/symfony/yaml
.. _WebProfilerBundle: https://github.com/symfony/web-profiler-bundle
.. _`fabpot`: https://github.com/fabpot/
.. _`webmozart`: https://github.com/webmozart/
.. _`Tobion`: https://github.com/Tobion/
Expand All @@ -190,3 +194,4 @@ discretion of the **Project Leader**.
.. _`weaverryan`: https://github.com/weaverryan/
.. _`aitboudad`: https://github.com/aitboudad/
.. _`xabbuh`: https://github.com/xabbuh/
.. _`javiereguiluz`: https://github.com/javiereguiluz/
4 changes: 2 additions & 2 deletions contributing/documentation/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ how the behavior has changed:
Whenever a new minor version of Symfony is released (e.g. 2.4, 2.5, etc),
a new branch of the documentation is created from the ``master`` branch.
At this point, all the ``versionadded`` tags for Symfony versions that have
reached end-of-life will be removed. For example, if Symfony 2.5 were released
today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded``
reached end-of-maintenance will be removed. For example, if Symfony 2.5 were
released today, and 2.2 had recently reached its end-of-life, the 2.2 ``versionadded``
tags would be removed from the new ``2.5`` branch.

Testing Documentation
Expand Down
2 changes: 1 addition & 1 deletion cookbook/assetic/apply_to_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ In this case you can specify that the ``coffee`` filter is applied to all
bin: /usr/bin/coffee
node: /usr/bin/node
node_paths: [/usr/lib/node_modules/]
apply_to: "\.coffee$"
apply_to: '\.coffee$'
.. code-block:: xml
Expand Down
2 changes: 0 additions & 2 deletions cookbook/configuration/override_dir_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ The change in the ``composer.json`` will look like this:
.. code-block:: json
{
...
"config": {
"bin-dir": "bin",
"vendor-dir": "/some/dir/vendor"
},
...
}
Then, update the path to the ``autoload.php`` file in ``app/autoload.php``::
Expand Down
2 changes: 1 addition & 1 deletion cookbook/deployment/heroku.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ variables, you can issue a single command to prepare your app for a deployment:
Next up, it's finally time to deploy your application to Heroku. If you are
doing this for the very first time, you may see a message such as the following:

.. code-block:: bash
.. code-block:: text
The authenticity of host 'heroku.com (50.19.85.132)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Expand Down
2 changes: 1 addition & 1 deletion cookbook/doctrine/mongodb_session_storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Because MongoDB uses dynamic collection schemas, you do not need to do anything
session collection. However, you may want to add an index to improve garbage collection performance.
From the `MongoDB shell`_:

.. code-block:: sql
.. code-block:: text
use session_db
db.session.ensureIndex( { "expires_at": 1 }, { expireAfterSeconds: 0 } )
Expand Down
8 changes: 4 additions & 4 deletions cookbook/form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ It often happens that you use some options that are added by
:doc:`form extensions </cookbook/form/create_form_type_extension>`. One of the
cases may be the ``ValidatorExtension`` with its ``invalid_message`` option.
The ``TypeTestCase`` only loads the core form extension, which means an
+:class:`Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException`
+will be raised if you try to test a class that depends on other extensions.
+The :method:`Symfony\\Component\\Form\\Test\\TypeTestCase::getExtensions` method
+allows you to return a list of extensions to register::
:class:`Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException`
will be raised if you try to test a class that depends on other extensions.
The :method:`Symfony\\Component\\Form\\Test\\TypeTestCase::getExtensions` method
allows you to return a list of extensions to register::

// tests/AppBundle/Form/Type/TestedTypeTests.php
namespace Tests\AppBundle\Form\Type;
Expand Down
1 change: 0 additions & 1 deletion cookbook/install/unstable_versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dependency as follows:
{
"require": {
// ...
"symfony/symfony" : "2.7.*@dev"
}
}
Expand Down
21 changes: 13 additions & 8 deletions cookbook/logging/monolog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,22 @@ option of your handler to ``rotating_file``:
.. code-block:: xml
<!-- app/config/config_dev.xml -->
<?xml version="1.0" charset="UTF-8" ?>
<container xmlns=''http://symfony.com/schema/dic/services"
xmlns:monolog="http://symfony.com/schema/dic/monolog">
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
<monolog:config>
<!-- "max_files": max number of log files to keep
defaults to zero, which means infinite files -->
<monolog:handler name="main"
type="rotating_file"
path="%kernel.logs_dir%/%kernel.environment%.log"
level="debug"
<!-- max number of log files to keep
defaults to zero, which means infinite files -->
max_files="10"
/>
</monolog:config>
Expand Down Expand Up @@ -346,7 +351,7 @@ using a processor.
monolog.processor.session_request:
class: AppBundle\SessionRequestProcessor
arguments: ["@session"]
arguments: ['@session']
tags:
- { name: monolog.processor, method: processRecord }
Expand Down Expand Up @@ -445,7 +450,7 @@ the ``monolog.processor`` tag:
services:
monolog.processor.session_request:
class: AppBundle\SessionRequestProcessor
arguments: ["@session"]
arguments: ['@session']
tags:
- { name: monolog.processor, method: processRecord, handler: main }
Expand Down Expand Up @@ -496,7 +501,7 @@ the ``monolog.processor`` tag:
services:
monolog.processor.session_request:
class: AppBundle\SessionRequestProcessor
arguments: ["@session"]
arguments: ['@session']
tags:
- { name: monolog.processor, method: processRecord, channel: main }
Expand Down
13 changes: 7 additions & 6 deletions cookbook/logging/monolog_email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,25 @@ it is broken down.
.. code-block:: xml
<!-- app/config/config_prod.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
<monolog:config>
<!--
To also log 400 level errors (but not 404's):
action-level="error"
And add this child inside this monolog:handler
<monolog:excluded-404>^/</monolog:excluded-404>
-->
<monolog:handler
name="mail"
type="fingers_crossed"
action-level="critical"
handler="buffered"
<!--
To also log 400 level errors (but not 404's):
action-level="error"
And add this child inside this monolog:handler
<monolog:excluded-404>^/</monolog:excluded-404>
-->
/>
<monolog:handler
name="buffered"
Expand Down
8 changes: 0 additions & 8 deletions cookbook/security/csrf_in_login_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ provider available in the Security component:
),
));
.. versionadded:: 2.4
The ``csrf_token_generator`` option was introduced in Symfony 2.4. Prior,
you had to use the ``csrf_provider`` option.

The Security component can be configured further, but this is all information
it needs to be able to use CSRF in the login form.

Expand Down Expand Up @@ -186,9 +182,5 @@ After this, you have protected your login form against CSRF attacks.
),
));
.. versionadded:: 2.4
The ``csrf_token_id`` option was introduced in Symfony 2.4. Prior, you
had to use the ``intention`` option.

.. _`Cross-site request forgery`: https://en.wikipedia.org/wiki/Cross-site_request_forgery
.. _`Forging Login Requests`: https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests
2 changes: 1 addition & 1 deletion cookbook/security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Next, make sure to :ref:`create the database table <book-doctrine-creating-the-d
What's this UserInterface?
~~~~~~~~~~~~~~~~~~~~~~~~~~

So far, this is just a normal entity. But in order to use this class in the
So far, this is just a normal entity. But to use this class in the
security system, it must implement
:class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`. This
forces the class to have the five following methods:
Expand Down
1 change: 0 additions & 1 deletion cookbook/testing/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ with ``tests.bootstrap.php``:
<!-- ... -->
<phpunit
...
bootstrap = "tests.bootstrap.php"
>
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/twig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TwigBundle Configuration ("twig")
globals:
# Examples:
foo: "@bar"
foo: '@bar'
pi: 3.14
# Example options, but the easiest use is as seen above
Expand Down
3 changes: 2 additions & 1 deletion reference/forms/types/options/by_reference.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ To explain this further, here's a simple example::

use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\FormType;
// ...

$builder = $this->createFormBuilder($article);
$builder
->add('title', TextType::class)
->add(
$builder->create('author', 'form', array('by_reference' => ?))
$builder->create('author', FormType::class, array('by_reference' => ?))
->add('name', TextType::class)
->add('email', EmailType::class)
)
Expand Down

0 comments on commit 8b31d63

Please sign in to comment.