Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 64f8a1e

Browse filesBrowse files
committed
Merge branch '2.8' into 3.0
2 parents ae53c89 + ddd3478 commit 64f8a1e
Copy full SHA for 64f8a1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

69 files changed

+487
-403
lines changed

‎best_practices/forms.rst

Copy file name to clipboardExpand all lines: best_practices/forms.rst
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,17 @@ form in its own PHP class::
4747
}
4848
}
4949

50+
.. best-practice::
51+
52+
Put the form type classes in the ``AppBundle\Form`` namespace, unless you
53+
use other custom form classes like data transformers.
54+
5055
To use the class, use ``createForm`` and pass the fully qualified class name::
5156

52-
use AppBundle\Form\PostType;
5357
// ...
58+
use AppBundle\Form\PostType;
5459

60+
// ...
5561
public function newAction(Request $request)
5662
{
5763
$post = new Post();

‎book/controller.rst

Copy file name to clipboardExpand all lines: book/controller.rst
+4-17Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,6 @@ If you want to redirect the user to another page, use the ``redirectToRoute()``
441441
// return $this->redirect($this->generateUrl('homepage'), 301);
442442
}
443443

444-
.. versionadded:: 2.6
445-
The ``redirectToRoute()`` method was introduced in Symfony 2.6. Previously (and still now), you
446-
could use ``redirect()`` and ``generateUrl()`` together for this (see the example above).
447-
448444
Or, if you want to redirect externally, just use ``redirect()`` and pass it the URL::
449445

450446
public function indexAction()
@@ -536,9 +532,6 @@ console command:
536532
537533
$ php bin/console debug:container
538534
539-
.. versionadded:: 2.6
540-
Prior to Symfony 2.6, this command was called ``container:debug``.
541-
542535
For more information, see the :doc:`/book/service_container` chapter.
543536

544537
.. index::
@@ -825,16 +818,10 @@ method to check the CSRF token::
825818
// ... do something, like deleting an object
826819
}
827820

828-
.. versionadded:: 2.6
829-
The ``isCsrfTokenValid()`` shortcut method was introduced in Symfony 2.6.
830-
It is equivalent to executing the following code:
831-
832-
.. code-block:: php
833-
834-
use Symfony\Component\Security\Csrf\CsrfToken;
835-
836-
$this->get('security.csrf.token_manager')
837-
->isTokenValid(new CsrfToken('token_id', 'TOKEN'));
821+
// isCsrfTokenValid() is equivalent to:
822+
// $this->get('security.csrf.token_manager')->isTokenValid()
823+
// new \Symfony\Component\Security\Csrf\CsrfToken\CsrfToken('token_id', $token)
824+
// );
838825

839826
Final Thoughts
840827
--------------

‎book/routing.rst

Copy file name to clipboardExpand all lines: book/routing.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,9 +1403,6 @@ the command by running the following from the root of your project.
14031403
14041404
$ php bin/console debug:router
14051405
1406-
.. versionadded:: 2.6
1407-
Prior to Symfony 2.6, this command was called ``router:debug``.
1408-
14091406
This command will print a helpful list of *all* the configured routes in
14101407
your application:
14111408

‎book/security.rst

Copy file name to clipboardExpand all lines: book/security.rst
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -844,15 +844,6 @@ You can easily deny access from inside a controller::
844844
// ...
845845
}
846846

847-
.. versionadded:: 2.6
848-
The ``denyAccessUnlessGranted()`` method was introduced in Symfony 2.6. Previously (and
849-
still now), you could check access directly and throw the ``AccessDeniedException`` as shown
850-
in the example above).
851-
852-
.. versionadded:: 2.6
853-
The ``security.authorization_checker`` service was introduced in Symfony 2.6. Prior
854-
to Symfony 2.6, you had to use the ``isGranted()`` method of the ``security.context`` service.
855-
856847
In both cases, a special
857848
:class:`Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException`
858849
is thrown, which ultimately triggers a 403 HTTP response inside Symfony.
@@ -1017,10 +1008,6 @@ shown above.
10171008
Retrieving the User Object
10181009
--------------------------
10191010

1020-
.. versionadded:: 2.6
1021-
The ``security.token_storage`` service was introduced in Symfony 2.6. Prior
1022-
to Symfony 2.6, you had to use the ``getToken()`` method of the ``security.context`` service.
1023-
10241011
After authentication, the ``User`` object of the current user can be accessed
10251012
via the ``security.token_storage`` service. From inside a controller, this will
10261013
look like::
@@ -1221,9 +1208,6 @@ in the following way from a controller::
12211208

12221209
$user->setPassword($encoded);
12231210

1224-
.. versionadded:: 2.6
1225-
The ``security.password_encoder`` service was introduced in Symfony 2.6.
1226-
12271211
In order for this to work, just make sure that you have the encoder for your
12281212
user class (e.g. ``AppBundle\Entity\User``) configured under the ``encoders``
12291213
key in ``app/config/security.yml``.

‎book/service_container.rst

Copy file name to clipboardExpand all lines: book/service_container.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,9 +1136,6 @@ console. To show all services and the class for each service, run:
11361136
11371137
$ php bin/console debug:container
11381138
1139-
.. versionadded:: 2.6
1140-
Prior to Symfony 2.6, this command was called ``container:debug``.
1141-
11421139
By default, only public services are shown, but you can also view private services:
11431140

11441141
.. code-block:: bash

‎book/templating.rst

Copy file name to clipboardExpand all lines: book/templating.rst
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,12 +1269,6 @@ automatically:
12691269
<p>Application Environment: <?php echo $app->getEnvironment() ?></p>
12701270
<?php endif ?>
12711271

1272-
.. versionadded:: 2.6
1273-
The global ``app.security`` variable (or the ``$app->getSecurity()``
1274-
method in PHP templates) is deprecated as of Symfony 2.6. Use ``app.user``
1275-
(``$app->getUser()``) and ``is_granted()`` (``$view['security']->isGranted()``)
1276-
instead.
1277-
12781272
.. tip::
12791273

12801274
You can add your own global template variables. See the cookbook example

‎book/testing.rst

Copy file name to clipboardExpand all lines: book/testing.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,6 @@ Be warned that this does not work if you insulate the client or if you use an
470470
HTTP layer. For a list of services available in your application, use the
471471
``debug:container`` console task.
472472

473-
.. versionadded:: 2.6
474-
Prior to Symfony 2.6, this command was called ``container:debug``.
475-
476473
.. tip::
477474

478475
If the information you need to check is available from the profiler, use

‎book/translation.rst

Copy file name to clipboardExpand all lines: book/translation.rst
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ checks translation resources for several locales:
452452
#. If the translation still isn't found, Symfony uses the ``fallbacks`` configuration
453453
parameter, which defaults to ``en`` (see `Configuration`_).
454454

455-
.. versionadded:: 2.6
456-
The ability to log missing translations was introduced in Symfony 2.6.
457-
458455
.. note::
459456

460457
When Symfony doesn't find a translation in the given locale, it will
@@ -746,9 +743,6 @@ For more information, see the documentation for these libraries.
746743
Debugging Translations
747744
----------------------
748745

749-
.. versionadded:: 2.6
750-
Prior to Symfony 2.6, this command was called ``translation:debug``.
751-
752746
When maintaining a bundle, you may use or remove the usage of a translation
753747
message without updating all message catalogues. The ``debug:translation``
754748
command helps you to find these missing or unused translation messages for a

‎book/validation.rst

Copy file name to clipboardExpand all lines: book/validation.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ this method must return ``true``:
644644
AppBundle\Entity\Author:
645645
getters:
646646
passwordLegal:
647-
- 'True': { message: 'The password cannot match your first name' }
647+
- 'IsTrue': { message: 'The password cannot match your first name' }
648648
649649
.. code-block:: xml
650650
@@ -656,7 +656,7 @@ this method must return ``true``:
656656
657657
<class name="AppBundle\Entity\Author">
658658
<getter property="passwordLegal">
659-
<constraint name="True">
659+
<constraint name="IsTrue">
660660
<option name="message">The password cannot match your first name</option>
661661
</constraint>
662662
</getter>
@@ -954,7 +954,7 @@ username and the password are different only if all other validation passes
954954
- Strict
955955
getters:
956956
passwordLegal:
957-
- 'True':
957+
- 'IsTrue':
958958
message: 'The password cannot match your username'
959959
groups: [Strict]
960960
properties:
@@ -981,7 +981,7 @@ username and the password are different only if all other validation passes
981981
</property>
982982
983983
<getter property="passwordLegal">
984-
<constraint name="True">
984+
<constraint name="IsTrue">
985985
<option name="message">The password cannot match your username</option>
986986
<option name="groups">
987987
<value>Strict</value>

‎components/config/definition.rst

Copy file name to clipboardExpand all lines: components/config/definition.rst
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,6 @@ method.
421421
The info will be printed as a comment when dumping the configuration tree
422422
with the ``config:dump-reference`` command.
423423

424-
.. versionadded:: 2.6
425-
Since Symfony 2.6, the info will also be added to the exception message
426-
when an invalid type is given.
427-
428424
Optional Sections
429425
-----------------
430426

‎components/console/events.rst

Copy file name to clipboardExpand all lines: components/console/events.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ dispatched. Listeners receive a
5959
Disable Commands inside Listeners
6060
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6161

62-
.. versionadded:: 2.6
63-
Disabling commands inside listeners was introduced in Symfony 2.6.
64-
6562
Using the
6663
:method:`Symfony\\Component\\Console\\Event\\ConsoleCommandEvent::disableCommand`
6764
method, you can disable a command inside a listener. The application

‎components/console/helpers/debug_formatter.rst

Copy file name to clipboardExpand all lines: components/console/helpers/debug_formatter.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
Debug Formatter Helper
55
======================
66

7-
.. versionadded:: 2.6
8-
The Debug Formatter helper was introduced in Symfony 2.6.
9-
107
The :class:`Symfony\\Component\\Console\\Helper\\DebugFormatterHelper` provides
118
functions to output debug information when running an external program, for
129
instance a process or HTTP request. For example, if you used it to output

‎components/console/helpers/processhelper.rst

Copy file name to clipboardExpand all lines: components/console/helpers/processhelper.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
Process Helper
55
==============
66

7-
.. versionadded:: 2.6
8-
The Process Helper was introduced in Symfony 2.6.
9-
107
The Process Helper shows processes as they're running and reports
118
useful information about process status.
129

‎components/console/helpers/progressbar.rst

Copy file name to clipboardExpand all lines: components/console/helpers/progressbar.rst
-14Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ Instead of advancing the bar by a number of steps (with the
4040
you can also set the current progress by calling the
4141
:method:`Symfony\\Component\\Console\\Helper\\ProgressBar::setProgress` method.
4242

43-
.. versionadded:: 2.6
44-
The ``setProgress()`` method was called ``setCurrent()`` prior to Symfony 2.6.
45-
46-
.. caution::
47-
48-
Prior to version 2.6, the progress bar only works if your platform
49-
supports ANSI codes; on other platforms, no output is generated.
50-
5143
.. tip::
5244

5345
If your platform doesn't support ANSI codes, updates to the progress
@@ -57,9 +49,6 @@ you can also set the current progress by calling the
5749
accordingly. By default, when using a ``max``, the redraw frequency
5850
is set to *10%* of your ``max``.
5951

60-
.. versionadded:: 2.6
61-
The ``setRedrawFrequency()`` method was introduced in Symfony 2.6.
62-
6352
If you don't know the number of steps in advance, just omit the steps argument
6453
when creating the :class:`Symfony\\Component\\Console\\Helper\\ProgressBar`
6554
instance::
@@ -307,9 +296,6 @@ that displays the number of remaining steps::
307296
}
308297
);
309298

310-
.. versionadded:: 2.6
311-
The ``getProgress()`` method was called ``getStep()`` prior to Symfony 2.6.
312-
313299
Custom Messages
314300
~~~~~~~~~~~~~~~
315301

‎components/dependency_injection/factories.rst

Copy file name to clipboardExpand all lines: components/dependency_injection/factories.rst
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ For this situation, you can use a factory to create the object and tell
1212
the service container to call a method on the factory rather than directly
1313
instantiating the class.
1414

15-
.. versionadded:: 2.6
16-
The new :method:`Symfony\\Component\\DependencyInjection\\Definition::setFactory`
17-
method was introduced in Symfony 2.6. Refer to older versions for the
18-
syntax for factories prior to 2.6.
19-
2015
Suppose you have a factory that configures and returns a new ``NewsletterManager``
2116
object::
2217

‎components/dom_crawler.rst

Copy file name to clipboardExpand all lines: components/dom_crawler.rst
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ Get all the child or parent nodes::
190190
Accessing Node Values
191191
~~~~~~~~~~~~~~~~~~~~~
192192

193-
.. versionadded:: 2.6
194-
The :method:`Symfony\\Component\\DomCrawler\\Crawler::nodeName`
195-
method was introduced in Symfony 2.6.
196-
197193
Access the node name (HTML tag name) of the first node of the current selection (eg. "p" or "div")::
198194

199195
// will return the node name (HTML tag name) of the first child element under <body>

‎components/event_dispatcher/introduction.rst

Copy file name to clipboardExpand all lines: components/event_dispatcher/introduction.rst
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,6 @@ and so on...
628628
Event Name Introspection
629629
~~~~~~~~~~~~~~~~~~~~~~~~
630630

631-
.. versionadded:: 2.4
632-
Before Symfony 2.4, the event name and the event dispatcher had to be
633-
requested from the ``Event`` instance. These methods are now deprecated.
634-
635631
The ``EventDispatcher`` instance, as well as the name of the event that
636632
is dispatched, are passed as arguments to the listener::
637633

‎components/expression_language/extending.rst

Copy file name to clipboardExpand all lines: components/expression_language/extending.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ evaluating or the "names" if compiling).
5656
Using Expression Providers
5757
--------------------------
5858

59-
.. versionadded:: 2.6
60-
Expression providers were introduced in Symfony 2.6.
61-
6259
When you use the ``ExpressionLanguage`` class in your library, you often want
6360
to add custom functions. To do so, you can create a new expression provider by
6461
creating a class that implements

‎components/filesystem/lock_handler.rst

Copy file name to clipboardExpand all lines: components/filesystem/lock_handler.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
LockHandler
22
===========
33

4-
.. versionadded:: 2.6
5-
The lock handler feature was introduced in Symfony 2.6
6-
74
What is a Lock?
85
---------------
96

‎components/http_foundation/introduction.rst

Copy file name to clipboardExpand all lines: components/http_foundation/introduction.rst
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,6 @@ You can still set the ``Content-Type`` of the sent file, or change its ``Content
512512
'filename.txt'
513513
);
514514

515-
.. versionadded:: 2.6
516-
The ``deleteFileAfterSend()`` method was introduced in Symfony 2.6.
517-
518515
It is possible to delete the file after the request is sent with the
519516
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::deleteFileAfterSend` method.
520517
Please note that this will not work when the ``X-Sendfile`` header is set.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.