Skip to content

Commit

Permalink
Merge branch '2.6' into 2.7
Browse files Browse the repository at this point in the history
* 2.6: (30 commits)
  fix merge after removing @Security in 2.3
  Reverting a commit on 2.5 branch, as it was only meant to be on 2.3 (so reverting after the merge)
  [#4735] Reverting what was left on the 2.5 branch after the merge conflict had already put back some of it
  Typo Fix: "allows to" should be "allows you to"
  Adding a link to log things in the prod environment
  [#4857] Adding missing word thanks to xabbuh
  move cautions to make them visible
  Fixing bad english thanks to xabbuh
  Adding missing words thanks to javiereguiluz
  language tweak thanks to xabbuh!
  Adding an example image of the debug_formatter
  [#4643] Minor english changes to make things even smoother (though they were correct before)
  replace API link for SwiftmailerBundle
  Update security.rst
  Update routing.rst
  don't output message from AuthenticationException
  Add custom link labels where Cookbook articles titles looked wrong
  Fix typo: BLOG => BLOB
  Fix code example
  Removed a leftover comma in security config sample
  ...

Conflicts:
	reference/configuration/security.rst
  • Loading branch information
weaverryan committed Jan 18, 2015
2 parents dc25c65 + 0615928 commit 7363c9b
Show file tree
Hide file tree
Showing 103 changed files with 681 additions and 785 deletions.
4 changes: 2 additions & 2 deletions best_practices/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ add an extra layer of configuration that's not needed because you don't need
or want these configuration values to change on each server.

The configuration options defined in the ``config.yml`` file usually vary from
one :doc:`/cookbook/configuration/environments` to another. That's why Symfony
already includes ``app/config/config_dev.yml`` and ``app/config/config_prod.yml``
one :doc:`environment </cookbook/configuration/environments>` to another. That's
why Symfony already includes ``app/config/config_dev.yml`` and ``app/config/config_prod.yml``
files so that you can override specific values for each environment.

Constants vs Configuration Options
Expand Down
5 changes: 3 additions & 2 deletions best_practices/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ For example:
use AppBundle\Entity\Post;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
/**
* @Route("/{id}", name="admin_post_show")
*/
Expand Down Expand Up @@ -212,6 +212,7 @@ Pre and Post Hooks
------------------

If you need to execute some code before or after the execution of your controllers,
you can use the EventDispatcher component to :doc:`/cookbook/event_dispatcher/before_after_filters`.
you can use the EventDispatcher component to
:doc:`set up before and after filters </cookbook/event_dispatcher/before_after_filters>`.

.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
5 changes: 3 additions & 2 deletions best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ fields:

If you need more control over how your fields are rendered, then you should
remove the ``form_widget(form)`` function and render your fields individually.
See :doc:`/cookbook/form/form_customization` for more information on this and how
you can control *how* the form renders at a global level using form theming.
See the :doc:`/cookbook/form/form_customization` article for more information
on this and how you can control *how* the form renders at a global level
using form theming.

Handling Form Submits
---------------------
Expand Down
2 changes: 2 additions & 0 deletions best_practices/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ Now you can reuse this method both in the template and in the security expressio
{% endif %}

.. _best-practices-directly-isGranted:
.. _checking-permissions-without-security:
.. _manually-checking-permissions:

Checking Permissions without @Security
--------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,6 @@ content that's sent back to the client::
$response = new Response(json_encode(array('name' => $name)));
$response->headers->set('Content-Type', 'application/json');

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

The ``headers`` property is a :class:`Symfony\\Component\\HttpFoundation\\HeaderBag`
object and has some nice methods for getting and setting the headers. The
header names are normalized so that using ``Content-Type`` is equivalent to
Expand Down
3 changes: 0 additions & 3 deletions book/from_flat_php_to_symfony2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,6 @@ the HTTP response being returned. Use them to improve the blog:
// echo the headers and send the response
$response->send();

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

The controllers are now responsible for returning a ``Response`` object.
To make this easier, you can add a new ``render_template()`` function, which,
incidentally, acts quite a bit like the Symfony templating engine:
Expand Down
3 changes: 0 additions & 3 deletions book/http_fundamentals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ interface to construct the response that needs to be returned to the client::
// prints the HTTP headers followed by the content
$response->send();

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

If Symfony offered nothing else, you would already have a toolkit for easily
accessing request information and an object-oriented interface for creating
the response. Even as you learn the many powerful features in Symfony, keep
Expand Down
4 changes: 0 additions & 4 deletions book/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ processing must only occur on the master request).
Events
~~~~~~

.. versionadded:: 2.4
The ``isMasterRequest()`` method was introduced in Symfony 2.4.
Prior, the ``getRequestType()`` method must be used.

Each event thrown by the Kernel is a subclass of
:class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`. This means that
each event has access to the same basic information:
Expand Down
5 changes: 1 addition & 4 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ be added for each parameter. For example:

.. configuration-block::

.. code-block:: php
.. code-block:: php-annotations
// src/AppBundle/Controller/BlogController.php
Expand Down Expand Up @@ -915,9 +915,6 @@ component documentation.
Completely Customized Route Matching with Conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.4
Route conditions were introduced in Symfony 2.4.

As you've seen, a route can be made to match only certain routing wildcards
(via regular expressions), HTTP methods, or host names. But the routing system
can be extended to have an almost infinite flexibility using ``conditions``:
Expand Down
7 changes: 2 additions & 5 deletions book/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Security
========

Symfony's security system is incredibly powerful, but it can also be confusing
to setup. In this chapter, you'll learn how to setup your application's security
to set up. In this chapter, you'll learn how to set up your application's security
step-by-step, from configuring your firewall and how you load users to denying
access and fetching the User object. Depending on what you need, sometimes
the initial setup can be tough. But once it's done, Symfony's security system
Expand Down Expand Up @@ -300,7 +300,7 @@ provider, but it's better to think of it as an "in configuration" provider:
memory:
users:
ryan:
password: ryanpass,
password: ryanpass
roles: 'ROLE_USER'
admin:
password: kitten
Expand Down Expand Up @@ -924,9 +924,6 @@ special attributes like this:

.. _book-security-template-expression:

.. versionadded:: 2.4
The ``expression`` functionality was introduced in Symfony 2.4.

You can also use expressions inside your templates:

.. configuration-block::
Expand Down
6 changes: 0 additions & 6 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,6 @@ the work of instantiating the classes.
Using the Expression Language
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.4
The Expression Language functionality was introduced in Symfony 2.4.

The service container also supports an "expression" that allows you to inject
very specific values into a service.

Expand Down Expand Up @@ -818,9 +815,6 @@ Injecting the dependency by the setter method just needs a change of syntax:
Injecting the Request
~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.4
The ``request_stack`` service was introduced in Symfony 2.4.

As of Symfony 2.4, instead of injecting the ``request`` service, you should
inject the ``request_stack`` service and access the ``Request`` by calling
the :method:`Symfony\\Component\\HttpFoundation\\RequestStack::getCurrentRequest`
Expand Down
4 changes: 2 additions & 2 deletions book/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ it has its own excellent `documentation`_.

.. note::

Symfony works with PHPUnit 3.5.11 or later, though version 3.6.4 is
needed to test the Symfony core code itself.
It's recommended to use the latest stable PHPUnit version (you will have
to use version 4.2 or higher to test the Symfony core code itself).

Each test - whether it's a unit test or a functional test - is a PHP class
that should live in the ``Tests/`` subdirectory of your bundles. If you follow
Expand Down
10 changes: 6 additions & 4 deletions components/class_loader/debug_class_loader.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.. index::
single: ClassLoader; DebugClassLoader

Debugging a Class Loader
========================

Since Symfony 2.4, the ``DebugClassLoader`` of the Class Loader component is
deprecated. Use the
:doc:`DebugClassLoader provided by the Debug component </components/debug/class_loader>`.
.. caution::

The ``DebugClassLoader`` from the ClassLoader component was deprecated
in Symfony 2.5 and will be removed in Symfony 3.0. Use the
:doc:`DebugClassLoader provided by the Debug component </components/debug/class_loader>`.
39 changes: 30 additions & 9 deletions components/console/helpers/debug_formatter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ Debug Formatter Helper

The :class:`Symfony\\Component\\Console\\Helper\\DebugFormatterHelper` provides
functions to output debug information when running an external program, for
instance a process or HTTP request. It is included in the default helper set
and you can get it by calling
:method:`Symfony\\Component\\Console\\Command\\Command::getHelper`::
instance a process or HTTP request. For example, if you used it to output
the results of running ``ls -la`` on a UNIX system, it might output something
like this:

.. image:: /images/components/console/debug_formatter.png
:align: center

Using the debug_formatter
-------------------------

The formatter is included in the default helper set and you can get it by
calling :method:`Symfony\\Component\\Console\\Command\\Command::getHelper`::

$debugFormatter = $this->getHelper('debug_formatter');

The formatter only formats strings, which you can use to output to the console,
but also to log the information or do anything else.
The formatter accepts strings and returns a formatted string, which you then
output to the console (or even log the information or do anything else).

All methods of this helper have an identifier as the first argument. This is a
unique value for each program. This way, the helper can debug information for
Expand All @@ -39,9 +48,13 @@ display information that the program is started::

// ...
$process = new Process(...);
$process->run();

$output->writeln($debugFormatter->start(spl_object_hash($process), 'Some process description'));
$output->writeln($debugFormatter->start(
spl_object_hash($process),
'Some process description')
);

$process->run();

This will output:

Expand All @@ -51,7 +64,11 @@ This will output:
You can tweak the prefix using the third argument::

$output->writeln($debugFormatter->start(spl_object_hash($process), 'Some process description', 'STARTED');
$output->writeln($debugFormatter->start(
spl_object_hash($process),
'Some process description',
'STARTED'
);
// will output:
// STARTED Some process description

Expand All @@ -69,7 +86,11 @@ using

$process->run(function ($type, $buffer) use ($output, $debugFormatter, $process) {
$output->writeln(
$debugFormatter->progress(spl_object_hash($process), $buffer, Process::ERR === $type)
$debugFormatter->progress(
spl_object_hash($process),
$buffer,
Process::ERR === $type
)
);
});
// ...
Expand Down
6 changes: 3 additions & 3 deletions components/console/helpers/map.rst.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
* :doc:`/components/console/helpers/dialoghelper`
* :doc:`/components/console/helpers/dialoghelper` (deprecated as of 2.5)
* :doc:`/components/console/helpers/formatterhelper`
* :doc:`/components/console/helpers/processhelper`
* :doc:`/components/console/helpers/progressbar`
* :doc:`/components/console/helpers/progresshelper`
* :doc:`/components/console/helpers/progresshelper` (deprecated as of 2.5)
* :doc:`/components/console/helpers/questionhelper`
* :doc:`/components/console/helpers/table`
* :doc:`/components/console/helpers/tablehelper`
* :doc:`/components/console/helpers/tablehelper` (deprecated as of 2.5)
* :doc:`/components/console/helpers/debug_formatter` (new in 2.6)
3 changes: 0 additions & 3 deletions components/console/helpers/progresshelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ Progress Helper
.. versionadded:: 2.3
The ``setCurrent`` method was introduced in Symfony 2.3.

.. versionadded:: 2.4
The ``clear`` method was introduced in Symfony 2.4.

.. caution::

The Progress Helper was deprecated in Symfony 2.5 and will be removed in
Expand Down
3 changes: 0 additions & 3 deletions components/console/helpers/tablehelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ table rendering: using named layouts or by customizing rendering options.
Customize Table Layout using Named Layouts
------------------------------------------

.. versionadded:: 2.4
The ``TableHelper::LAYOUT_COMPACT`` layout was introduced in Symfony 2.4.

The Table helper ships with three preconfigured table layouts:

* ``TableHelper::LAYOUT_DEFAULT``
Expand Down
13 changes: 3 additions & 10 deletions components/console/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,6 @@ level. For example::
$output->writeln(...);
}

.. versionadded:: 2.4
The :method:`Symfony\\Component\\Console\\Output\\Output::isQuiet`,
:method:`Symfony\\Component\\Console\\Output\\Output::isVerbose`,
:method:`Symfony\\Component\\Console\\Output\\Output::isVeryVerbose` and
:method:`Symfony\\Component\\Console\\Output\\Output::isDebug`
methods were introduced in Symfony 2.4

There are also more semantic methods you can use to test for each of the
verbosity levels::

Expand Down Expand Up @@ -409,9 +402,9 @@ tools capable of helping you with different tasks:

* :doc:`/components/console/helpers/questionhelper`: interactively ask the user for information
* :doc:`/components/console/helpers/formatterhelper`: customize the output colorization
* :doc:`/components/console/helpers/progresshelper`: shows a progress bar
* :doc:`/components/console/helpers/tablehelper`: displays tabular data as a table
* :doc:`/components/console/helpers/dialoghelper`: (deprecated) interactively ask the user for information
* :doc:`/components/console/helpers/progressbar`: shows a progress bar
* :doc:`/components/console/helpers/table`: displays tabular data as a table
* :doc:`/components/console/helpers/questionhelper`: interactively ask the user for information

.. _component-console-testing-commands:

Expand Down
4 changes: 0 additions & 4 deletions components/debug/class_loader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
Debugging a Class Loader
========================

.. versionadded:: 2.4
The ``DebugClassLoader`` of the Debug component was introduced in Symfony 2.4.
Previously, it was located in the ClassLoader component.

The :class:`Symfony\\Component\\Debug\\DebugClassLoader` attempts to
throw more helpful exceptions when a class isn't found by the registered
autoloaders. All autoloaders that implement a ``findFile()`` method are replaced
Expand Down
8 changes: 0 additions & 8 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ Both the :method:`Symfony\\Component\\DomCrawler\\Crawler::filterXPath` and
XML namespaces, which can be either automatically discovered or registered
explicitly.

.. versionadded:: 2.4
Auto discovery and explicit registration of namespaces was introduced
in Symfony 2.4.

Consider the XML below:

.. code-block:: xml
Expand Down Expand Up @@ -456,10 +452,6 @@ directly::
Selecting Invalid Choice Values
...............................

.. versionadded:: 2.4
The :method:`Symfony\\Component\\DomCrawler\\Form::disableValidation`
method was introduced in Symfony 2.4.

By default, choice fields (select, radio) have internal validation activated
to prevent you from setting invalid values. If you want to be able to set
invalid values, you can use the ``disableValidation()`` method on either
Expand Down
4 changes: 0 additions & 4 deletions components/event_dispatcher/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,6 @@ which returns a boolean value::
EventDispatcher aware Events and Listeners
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.4
Since Symfony 2.4, the current event name and the ``EventDispatcher``
itself are passed to the listeners as additional arguments.

The ``EventDispatcher`` always passes the dispatched event, the event's name
and a reference to itself to the listeners. This can be used in some advanced
usages of the ``EventDispatcher`` like dispatching other events in listeners,
Expand Down
3 changes: 0 additions & 3 deletions components/expression_language/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ The ExpressionLanguage Component
evaluate expressions. An expression is a one-liner that returns a value
(mostly, but not limited to, Booleans).

.. versionadded:: 2.4
The ExpressionLanguage component was introduced in Symfony 2.4.

Installation
------------

Expand Down
4 changes: 0 additions & 4 deletions components/filesystem/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ endpoint for filesystem operations::
echo "An error occurred while creating your directory at ".$e->getPath();
}

.. versionadded:: 2.4
The ``IOExceptionInterface`` and its ``getPath`` method were introduced in
Symfony 2.4. Prior to 2.4, you would catch the ``IOException`` class.

.. note::

Methods :method:`Symfony\\Component\\Filesystem\\Filesystem::mkdir`,
Expand Down
Loading

0 comments on commit 7363c9b

Please sign in to comment.