Skip to content

Commit ba13c61

Browse files
committed
Remove more Symfony 2.x references
1 parent 52d020c commit ba13c61

File tree

89 files changed

+90
-1244
lines changed

Some content is hidden

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

89 files changed

+90
-1244
lines changed

best_practices/configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Canonical Parameters
5252
Define all your application's parameters in the
5353
``app/config/parameters.yml.dist`` file.
5454

55-
Since version 2.3, Symfony includes a configuration file called ``parameters.yml.dist``,
56-
which stores the canonical list of configuration parameters for the application.
55+
Symfony includes a configuration file called ``parameters.yml.dist``, which
56+
stores the canonical list of configuration parameters for the application.
5757

5858
Whenever a new configuration parameter is defined for the application, you
5959
should also add it to this file and submit the changes to your version control

best_practices/creating-the-project.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ ProductBundle, then there's no advantage to having two separate bundles.
114114
Create only one bundle called AppBundle for your application logic
115115

116116
Implementing a single AppBundle bundle in your projects will make your code
117-
more concise and easier to understand. Starting in Symfony 2.6, the official
118-
Symfony documentation uses the AppBundle name.
117+
more concise and easier to understand.
119118

120119
.. note::
121120

best_practices/forms.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ makes them easier to re-use later.
8585

8686
Add buttons in the templates, not in the form classes or the controllers.
8787

88-
Since Symfony 2.3, you can add buttons as fields on your form. This is a nice
89-
way to simplify the template that renders your form. But if you add the buttons
90-
directly in your form class, this would effectively limit the scope of that form:
88+
The Symfony Form component allows you to add buttons as fields on your form.
89+
This is a nice way to simplify the template that renders your form. But if you
90+
add the buttons directly in your form class, this would effectively limit the
91+
scope of that form:
9192

9293
.. code-block:: php
9394

best_practices/i18n.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Of all the available translation formats, only XLIFF and gettext have broad
3232
support in the tools used by professional translators. And since it's based
3333
on XML, you can validate XLIFF file contents as you write them.
3434

35-
Symfony 2.6 added support for notes inside XLIFF files, making them more
36-
user-friendly for translators. At the end, good translations are all about
37-
context, and these XLIFF notes allow you to define that context.
35+
Symfony supports notes in XLIFF files, making them more user-friendly for
36+
translators. At the end, good translations are all about context, and these
37+
XLIFF notes allow you to define that context.
3838

3939
.. tip::
4040

best_practices/security.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ the same ``getAuthorEmail`` logic you used above:
270270
use Symfony\Component\Security\Core\User\UserInterface;
271271
use AppBundle\Entity\Post;
272272
273-
// Voter class requires Symfony 2.8 or higher version
274273
class PostVoter extends Voter
275274
{
276275
const CREATE = 'create';

book/forms.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,6 @@ to the ``form()`` or the ``form_start()`` helper:
10141014

10151015
<!-- app/Resources/views/default/newAction.html.php -->
10161016
<?php echo $view['form']->start($form, array(
1017-
// The path() method was introduced in Symfony 2.8. Prior to 2.8,
1018-
// you had to use generate().
10191017
'action' => $view['router']->path('target_route'),
10201018
'method' => 'GET',
10211019
)) ?>
@@ -1951,4 +1949,3 @@ Learn more from the Cookbook
19511949
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
19521950
.. _`Cross-site request forgery`: http://en.wikipedia.org/wiki/Cross-site_request_forgery
19531951
.. _`view on GitHub`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
1954-
.. _`2.8 UPGRADE Log`: https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form

book/from_flat_php_to_symfony2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ content:
417417
418418
{
419419
"require": {
420-
"symfony/symfony": "2.6.*"
420+
"symfony/symfony": "3.0.*"
421421
},
422422
"autoload": {
423423
"files": ["model.php","controllers.php"]

book/http_cache.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,12 +1095,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
10951095

10961096
<!-- ... or a URL -->
10971097
<?php echo $view['actions']->render(
1098-
// The url() method was introduced in Symfony 2.8. Prior to 2.8,
1099-
// you had to use generate($name, $parameters, UrlGeneratorInterface::ABSOLUTE_URL)
1100-
$view['router']->url(
1101-
'latest_news',
1102-
array('maxPerPage' => 5),
1103-
),
1098+
$view['router']->url('latest_news', array('maxPerPage' => 5)),
11041099
array('strategy' => 'esi'),
11051100
) ?>
11061101

book/page_creation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,6 @@ There's also a :doc:`Cookbook </cookbook/index>` *packed* with more advanced
582582
Have fun!
583583

584584
.. _`Joyful Development with Symfony`: http://knpuniversity.com/screencast/symfony/first-page
585-
.. _`app/Resources/views/base.html.twig`: https://github.com/symfony/symfony-standard/blob/2.7/app/Resources/views/base.html.twig
585+
.. _`app/Resources/views/base.html.twig`: https://github.com/symfony/symfony-standard/blob/3.0/app/Resources/views/base.html.twig
586586
.. _`Composer`: https://getcomposer.org
587587
.. _`find open source bundles`: http://knpbundles.com

book/security.rst

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ else, you'll want to encode their passwords. The best algorithm to use is
511511
));
512512
513513
Of course, your users' passwords now need to be encoded with this exact algorithm.
514-
For hardcoded users, since 2.7 you can use the built-in command:
514+
For hardcoded users, you can use the built-in command:
515515

516516
.. code-block:: bash
517517
@@ -894,18 +894,6 @@ the built-in ``is_granted()`` helper function:
894894
<a href="...">Delete</a>
895895
<?php endif ?>
896896

897-
.. note::
898-
899-
In Symfony versions previous to 2.8, using the ``is_granted()`` function
900-
in a page that wasn't behind a firewall resulted in an exception. That's why
901-
you also needed to check first for the existence of the user:
902-
903-
.. code-block:: html+twig
904-
905-
{% if app.user and is_granted('ROLE_ADMIN') %}
906-
907-
Starting from Symfony 2.8, the ``app.user and ...`` check is no longer needed.
908-
909897
Securing other Services
910898
.......................
911899

0 commit comments

Comments
 (0)