Skip to content

Commit 7363c9b

Browse files
committed
Merge branch '2.6' into 2.7
* 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
2 parents dc25c65 + 0615928 commit 7363c9b

File tree

103 files changed

+681
-785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+681
-785
lines changed

best_practices/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ add an extra layer of configuration that's not needed because you don't need
7474
or want these configuration values to change on each server.
7575

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

8181
Constants vs Configuration Options

best_practices/controllers.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ For example:
139139
140140
use AppBundle\Entity\Post;
141141
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
142-
142+
143143
/**
144144
* @Route("/{id}", name="admin_post_show")
145145
*/
@@ -212,6 +212,7 @@ Pre and Post Hooks
212212
------------------
213213

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

217218
.. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html

best_practices/forms.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ fields:
165165

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

171172
Handling Form Submits
172173
---------------------

best_practices/security.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ Now you can reuse this method both in the template and in the security expressio
208208
{% endif %}
209209

210210
.. _best-practices-directly-isGranted:
211+
.. _checking-permissions-without-security:
212+
.. _manually-checking-permissions:
211213

212214
Checking Permissions without @Security
213215
--------------------------------------

book/controller.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,6 @@ content that's sent back to the client::
683683
$response = new Response(json_encode(array('name' => $name)));
684684
$response->headers->set('Content-Type', 'application/json');
685685

686-
.. versionadded:: 2.4
687-
Support for HTTP status code constants was introduced in Symfony 2.4.
688-
689686
The ``headers`` property is a :class:`Symfony\\Component\\HttpFoundation\\HeaderBag`
690687
object and has some nice methods for getting and setting the headers. The
691688
header names are normalized so that using ``Content-Type`` is equivalent to

book/from_flat_php_to_symfony2.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,6 @@ the HTTP response being returned. Use them to improve the blog:
484484
// echo the headers and send the response
485485
$response->send();
486486

487-
.. versionadded:: 2.4
488-
Support for HTTP status code constants was introduced in Symfony 2.4.
489-
490487
The controllers are now responsible for returning a ``Response`` object.
491488
To make this easier, you can add a new ``render_template()`` function, which,
492489
incidentally, acts quite a bit like the Symfony templating engine:

book/http_fundamentals.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,6 @@ interface to construct the response that needs to be returned to the client::
287287
// prints the HTTP headers followed by the content
288288
$response->send();
289289

290-
.. versionadded:: 2.4
291-
Support for HTTP status code constants was introduced in Symfony 2.4.
292-
293290
If Symfony offered nothing else, you would already have a toolkit for easily
294291
accessing request information and an object-oriented interface for creating
295292
the response. Even as you learn the many powerful features in Symfony, keep

book/internals.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,6 @@ processing must only occur on the master request).
208208
Events
209209
~~~~~~
210210

211-
.. versionadded:: 2.4
212-
The ``isMasterRequest()`` method was introduced in Symfony 2.4.
213-
Prior, the ``getRequestType()`` method must be used.
214-
215211
Each event thrown by the Kernel is a subclass of
216212
:class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`. This means that
217213
each event has access to the same basic information:

book/routing.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ be added for each parameter. For example:
644644

645645
.. configuration-block::
646646

647-
.. code-block:: php
647+
.. code-block:: php-annotations
648648
649649
// src/AppBundle/Controller/BlogController.php
650650
@@ -915,9 +915,6 @@ component documentation.
915915
Completely Customized Route Matching with Conditions
916916
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
917917

918-
.. versionadded:: 2.4
919-
Route conditions were introduced in Symfony 2.4.
920-
921918
As you've seen, a route can be made to match only certain routing wildcards
922919
(via regular expressions), HTTP methods, or host names. But the routing system
923920
can be extended to have an almost infinite flexibility using ``conditions``:

book/security.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Security
55
========
66

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

925925
.. _book-security-template-expression:
926926

927-
.. versionadded:: 2.4
928-
The ``expression`` functionality was introduced in Symfony 2.4.
929-
930927
You can also use expressions inside your templates:
931928

932929
.. configuration-block::

book/service_container.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,6 @@ the work of instantiating the classes.
624624
Using the Expression Language
625625
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
626626

627-
.. versionadded:: 2.4
628-
The Expression Language functionality was introduced in Symfony 2.4.
629-
630627
The service container also supports an "expression" that allows you to inject
631628
very specific values into a service.
632629

@@ -818,9 +815,6 @@ Injecting the dependency by the setter method just needs a change of syntax:
818815
Injecting the Request
819816
~~~~~~~~~~~~~~~~~~~~~
820817

821-
.. versionadded:: 2.4
822-
The ``request_stack`` service was introduced in Symfony 2.4.
823-
824818
As of Symfony 2.4, instead of injecting the ``request`` service, you should
825819
inject the ``request_stack`` service and access the ``Request`` by calling
826820
the :method:`Symfony\\Component\\HttpFoundation\\RequestStack::getCurrentRequest`

book/testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ it has its own excellent `documentation`_.
1717

1818
.. note::
1919

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

2323
Each test - whether it's a unit test or a functional test - is a PHP class
2424
that should live in the ``Tests/`` subdirectory of your bundles. If you follow
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.. index::
22
single: ClassLoader; DebugClassLoader
3-
3+
44
Debugging a Class Loader
55
========================
66

7-
Since Symfony 2.4, the ``DebugClassLoader`` of the Class Loader component is
8-
deprecated. Use the
9-
:doc:`DebugClassLoader provided by the Debug component </components/debug/class_loader>`.
7+
.. caution::
8+
9+
The ``DebugClassLoader`` from the ClassLoader component was deprecated
10+
in Symfony 2.5 and will be removed in Symfony 3.0. Use the
11+
:doc:`DebugClassLoader provided by the Debug component </components/debug/class_loader>`.

components/console/helpers/debug_formatter.rst

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,23 @@ Debug Formatter Helper
99

1010
The :class:`Symfony\\Component\\Console\\Helper\\DebugFormatterHelper` provides
1111
functions to output debug information when running an external program, for
12-
instance a process or HTTP request. It is included in the default helper set
13-
and you can get it by calling
14-
:method:`Symfony\\Component\\Console\\Command\\Command::getHelper`::
12+
instance a process or HTTP request. For example, if you used it to output
13+
the results of running ``ls -la`` on a UNIX system, it might output something
14+
like this:
15+
16+
.. image:: /images/components/console/debug_formatter.png
17+
:align: center
18+
19+
Using the debug_formatter
20+
-------------------------
21+
22+
The formatter is included in the default helper set and you can get it by
23+
calling :method:`Symfony\\Component\\Console\\Command\\Command::getHelper`::
1524

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

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

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

4049
// ...
4150
$process = new Process(...);
42-
$process->run();
4351

44-
$output->writeln($debugFormatter->start(spl_object_hash($process), 'Some process description'));
52+
$output->writeln($debugFormatter->start(
53+
spl_object_hash($process),
54+
'Some process description')
55+
);
56+
57+
$process->run();
4558

4659
This will output:
4760

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

54-
$output->writeln($debugFormatter->start(spl_object_hash($process), 'Some process description', 'STARTED');
67+
$output->writeln($debugFormatter->start(
68+
spl_object_hash($process),
69+
'Some process description',
70+
'STARTED'
71+
);
5572
// will output:
5673
// STARTED Some process description
5774

@@ -69,7 +86,11 @@ using
6986

7087
$process->run(function ($type, $buffer) use ($output, $debugFormatter, $process) {
7188
$output->writeln(
72-
$debugFormatter->progress(spl_object_hash($process), $buffer, Process::ERR === $type)
89+
$debugFormatter->progress(
90+
spl_object_hash($process),
91+
$buffer,
92+
Process::ERR === $type
93+
)
7394
);
7495
});
7596
// ...
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
* :doc:`/components/console/helpers/dialoghelper`
1+
* :doc:`/components/console/helpers/dialoghelper` (deprecated as of 2.5)
22
* :doc:`/components/console/helpers/formatterhelper`
33
* :doc:`/components/console/helpers/processhelper`
44
* :doc:`/components/console/helpers/progressbar`
5-
* :doc:`/components/console/helpers/progresshelper`
5+
* :doc:`/components/console/helpers/progresshelper` (deprecated as of 2.5)
66
* :doc:`/components/console/helpers/questionhelper`
77
* :doc:`/components/console/helpers/table`
8-
* :doc:`/components/console/helpers/tablehelper`
8+
* :doc:`/components/console/helpers/tablehelper` (deprecated as of 2.5)
99
* :doc:`/components/console/helpers/debug_formatter` (new in 2.6)

components/console/helpers/progresshelper.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ Progress Helper
77
.. versionadded:: 2.3
88
The ``setCurrent`` method was introduced in Symfony 2.3.
99

10-
.. versionadded:: 2.4
11-
The ``clear`` method was introduced in Symfony 2.4.
12-
1310
.. caution::
1411

1512
The Progress Helper was deprecated in Symfony 2.5 and will be removed in

components/console/helpers/tablehelper.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ table rendering: using named layouts or by customizing rendering options.
3939
Customize Table Layout using Named Layouts
4040
------------------------------------------
4141

42-
.. versionadded:: 2.4
43-
The ``TableHelper::LAYOUT_COMPACT`` layout was introduced in Symfony 2.4.
44-
4542
The Table helper ships with three preconfigured table layouts:
4643

4744
* ``TableHelper::LAYOUT_DEFAULT``

components/console/introduction.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,6 @@ level. For example::
203203
$output->writeln(...);
204204
}
205205

206-
.. versionadded:: 2.4
207-
The :method:`Symfony\\Component\\Console\\Output\\Output::isQuiet`,
208-
:method:`Symfony\\Component\\Console\\Output\\Output::isVerbose`,
209-
:method:`Symfony\\Component\\Console\\Output\\Output::isVeryVerbose` and
210-
:method:`Symfony\\Component\\Console\\Output\\Output::isDebug`
211-
methods were introduced in Symfony 2.4
212-
213206
There are also more semantic methods you can use to test for each of the
214207
verbosity levels::
215208

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

410403
* :doc:`/components/console/helpers/questionhelper`: interactively ask the user for information
411404
* :doc:`/components/console/helpers/formatterhelper`: customize the output colorization
412-
* :doc:`/components/console/helpers/progresshelper`: shows a progress bar
413-
* :doc:`/components/console/helpers/tablehelper`: displays tabular data as a table
414-
* :doc:`/components/console/helpers/dialoghelper`: (deprecated) interactively ask the user for information
405+
* :doc:`/components/console/helpers/progressbar`: shows a progress bar
406+
* :doc:`/components/console/helpers/table`: displays tabular data as a table
407+
* :doc:`/components/console/helpers/questionhelper`: interactively ask the user for information
415408

416409
.. _component-console-testing-commands:
417410

components/debug/class_loader.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
Debugging a Class Loader
66
========================
77

8-
.. versionadded:: 2.4
9-
The ``DebugClassLoader`` of the Debug component was introduced in Symfony 2.4.
10-
Previously, it was located in the ClassLoader component.
11-
128
The :class:`Symfony\\Component\\Debug\\DebugClassLoader` attempts to
139
throw more helpful exceptions when a class isn't found by the registered
1410
autoloaders. All autoloaders that implement a ``findFile()`` method are replaced

components/dom_crawler.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ Both the :method:`Symfony\\Component\\DomCrawler\\Crawler::filterXPath` and
102102
XML namespaces, which can be either automatically discovered or registered
103103
explicitly.
104104

105-
.. versionadded:: 2.4
106-
Auto discovery and explicit registration of namespaces was introduced
107-
in Symfony 2.4.
108-
109105
Consider the XML below:
110106

111107
.. code-block:: xml
@@ -456,10 +452,6 @@ directly::
456452
Selecting Invalid Choice Values
457453
...............................
458454

459-
.. versionadded:: 2.4
460-
The :method:`Symfony\\Component\\DomCrawler\\Form::disableValidation`
461-
method was introduced in Symfony 2.4.
462-
463455
By default, choice fields (select, radio) have internal validation activated
464456
to prevent you from setting invalid values. If you want to be able to set
465457
invalid values, you can use the ``disableValidation()`` method on either

components/event_dispatcher/introduction.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,10 +489,6 @@ which returns a boolean value::
489489
EventDispatcher aware Events and Listeners
490490
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
491491

492-
.. versionadded:: 2.4
493-
Since Symfony 2.4, the current event name and the ``EventDispatcher``
494-
itself are passed to the listeners as additional arguments.
495-
496492
The ``EventDispatcher`` always passes the dispatched event, the event's name
497493
and a reference to itself to the listeners. This can be used in some advanced
498494
usages of the ``EventDispatcher`` like dispatching other events in listeners,

components/expression_language/introduction.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ The ExpressionLanguage Component
99
evaluate expressions. An expression is a one-liner that returns a value
1010
(mostly, but not limited to, Booleans).
1111

12-
.. versionadded:: 2.4
13-
The ExpressionLanguage component was introduced in Symfony 2.4.
14-
1512
Installation
1613
------------
1714

components/filesystem/introduction.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ endpoint for filesystem operations::
3636
echo "An error occurred while creating your directory at ".$e->getPath();
3737
}
3838

39-
.. versionadded:: 2.4
40-
The ``IOExceptionInterface`` and its ``getPath`` method were introduced in
41-
Symfony 2.4. Prior to 2.4, you would catch the ``IOException`` class.
42-
4339
.. note::
4440

4541
Methods :method:`Symfony\\Component\\Filesystem\\Filesystem::mkdir`,

0 commit comments

Comments
 (0)