Skip to content

Commit 4567bc8

Browse files
committed
Merge branch '3.0'
* 3.0: (27 commits) Removed all 2.x versionadded directives removed duplicate lines Updated "Learn more from the Cookbook" section [#6072] some tweaks [Cookbook][Console] change API doc class name Improvement to the apache/mod_php configuration example Fixed a syntax issue Implemented changes suggested by Wouter Fixed a reference Minor fixes Fixed a syntax issue Finished the first version of the BrowserKit doc fix title underline spelling and formating Adding documentation for cookies added docs on histroy added form submissions and moved creating a client to top more outlines, fixed link, added more about creating a client added a link snippit fixed spelling ...
2 parents 3739fa5 + cf9ce3d commit 4567bc8

File tree

162 files changed

+365
-1766
lines changed

Some content is hidden

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

162 files changed

+365
-1766
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 & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,9 @@ You've also assigned each a "type" (e.g. ``TextType`` and ``DateType``),
123123
represented by its fully qualified class name. Among other things, it determines
124124
which HTML form tag(s) is rendered for that field.
125125

126-
.. versionadded:: 2.8
127-
To denote the form type, you have to use the fully qualified class name - like
128-
``TextType::class`` in PHP 5.5+ or ``Symfony\Component\Form\Extension\Core\Type\TextType``.
129-
Before Symfony 2.8, you could use an alias for each type like ``text`` or
130-
``date``. The old alias syntax will still work until Symfony 3.0. For more details,
131-
see the `2.8 UPGRADE Log`_.
132-
133126
Finally, you added a submit button with a custom label for submitting the form to
134127
the server.
135128

136-
.. versionadded:: 2.3
137-
Support for submit buttons was introduced in Symfony 2.3. Before that, you had
138-
to add buttons to the form's HTML manually.
139-
140129
Symfony comes with many built-in types that will be discussed shortly
141130
(see :ref:`book-forms-type-reference`).
142131

@@ -259,12 +248,6 @@ your controller::
259248
is called. Otherwise, changes done in the ``*_SUBMIT`` events aren't applied to the
260249
view (like validation errors).
261250

262-
.. versionadded:: 2.3
263-
The :method:`Symfony\\Component\\Form\\FormInterface::handleRequest` method
264-
was introduced in Symfony 2.3. Previously, the ``$request`` was passed
265-
to the ``submit`` method - a strategy which is deprecated and will be
266-
removed in Symfony 3.0. For details on that method, see :ref:`cookbook-form-submit-request`.
267-
268251
This controller follows a common pattern for handling forms, and has three
269252
possible paths:
270253

@@ -313,9 +296,6 @@ possible paths:
313296
Submitting Forms with Multiple Buttons
314297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315298

316-
.. versionadded:: 2.3
317-
Support for buttons in forms was introduced in Symfony 2.3.
318-
319299
When your form contains more than one submit button, you will want to check
320300
which of the buttons was clicked to adapt the program flow in your controller.
321301
To do this, add a second button with the caption "Save and add" to your form::
@@ -491,10 +471,6 @@ you'll need to specify which validation group(s) your form should use::
491471
'validation_groups' => array('registration'),
492472
))->add(...);
493473

494-
.. versionadded:: 2.7
495-
The ``configureOptions()`` method was introduced in Symfony 2.7. Previously,
496-
the method was called ``setDefaultOptions()``.
497-
498474
If you're creating :ref:`form classes <book-form-creating-form-classes>` (a
499475
good practice), then you'll need to add the following to the ``configureOptions()``
500476
method::
@@ -517,9 +493,6 @@ be used to validate the underlying object.
517493
Disabling Validation
518494
~~~~~~~~~~~~~~~~~~~~
519495

520-
.. versionadded:: 2.3
521-
The ability to set ``validation_groups`` to false was introduced in Symfony 2.3.
522-
523496
Sometimes it is useful to suppress the validation of a form altogether. For
524497
these cases you can set the ``validation_groups`` option to ``false``::
525498

@@ -620,9 +593,6 @@ work in the book section about :ref:`validation groups <book-validation-validati
620593
Groups based on the Clicked Button
621594
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
622595

623-
.. versionadded:: 2.3
624-
Support for buttons in forms was introduced in Symfony 2.3.
625-
626596
When your form contains multiple submit buttons, you can change the validation
627597
group depending on which button is used to submit the form. For example,
628598
consider a form in a wizard that lets you advance to the next step or go back
@@ -1044,8 +1014,6 @@ to the ``form()`` or the ``form_start()`` helper:
10441014

10451015
<!-- app/Resources/views/default/newAction.html.php -->
10461016
<?php echo $view['form']->start($form, array(
1047-
// The path() method was introduced in Symfony 2.8. Prior to 2.8,
1048-
// you had to use generate().
10491017
'action' => $view['router']->path('target_route'),
10501018
'method' => 'GET',
10511019
)) ?>
@@ -1981,4 +1949,3 @@ Learn more from the Cookbook
19811949
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
19821950
.. _`Cross-site request forgery`: http://en.wikipedia.org/wiki/Cross-site_request_forgery
19831951
.. _`view on GitHub`: https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
1984-
.. _`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/routing.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,10 +1543,6 @@ a template helper function:
15431543
Read this blog post.
15441544
</a>
15451545

1546-
.. versionadded:: 2.8
1547-
The ``path()`` PHP templating helper was introduced in Symfony 2.8. Prior
1548-
to 2.8, you had to use the ``generate()`` helper method.
1549-
15501546
.. index::
15511547
single: Routing; Absolute URLs
15521548

@@ -1581,12 +1577,6 @@ URL) rather than the ``path()`` function (which generates a relative URL):
15811577
Read this blog post.
15821578
</a>
15831579

1584-
.. versionadded:: 2.8
1585-
The ``url()`` PHP templating helper was introduced in Symfony 2.8. Prior
1586-
to 2.8, you had to use the ``generate()`` helper method with
1587-
``Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL``
1588-
passed as the third argument.
1589-
15901580
.. note::
15911581

15921582
The host that's used when generating an absolute URL is automatically
@@ -1608,5 +1598,12 @@ Learn more from the Cookbook
16081598
----------------------------
16091599

16101600
* :doc:`/cookbook/routing/scheme`
1601+
* :doc:`/cookbook/routing/slash_in_parameter`
1602+
* :doc:`/cookbook/routing/redirect_in_config`
1603+
* :doc:`/cookbook/routing/method_parameters`
1604+
* :doc:`/cookbook/routing/service_container_parameters`
1605+
* :doc:`/cookbook/routing/custom_route_loader`
1606+
* :doc:`/cookbook/routing/redirect_trailing_slash`
1607+
* :doc:`/cookbook/routing/extra_information`
16111608

16121609
.. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle

0 commit comments

Comments
 (0)