Skip to content

Commit d2b6569

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: (37 commits) Fixed wrong code examples for Isbn constraint Calling the parent implementation is mandatory. unused use instructions Fix typo in SwitchUserListener file name Reworded the example about $deep param Changed folder name to lowercase (best practises) [symfony#6365] Removing extra : Add a note about enabling DebugBundle to use VarDumper inside Symfony Update introduction.rst Added minor clarification Changed folder name to lowercase (best practises) Fixed typo in path [symfony#6360] Minor changes [symfony#6349][symfony#6351][symfony#6352] Update "bootstrap.php.cache" to "autoload.php" Editing the Doctrine section to improve readability. Minor corrections Fixed typo Fix escaping of backtick inside double back-quotes Made list of types more consistent ... Conflicts: book/installation.rst book/testing.rst
2 parents 24c2404 + a064e17 commit d2b6569

File tree

19 files changed

+405
-420
lines changed

19 files changed

+405
-420
lines changed

book/controller.rst

+241-221
Large diffs are not rendered by default.

book/doctrine.rst

+113-112
Large diffs are not rendered by default.

book/installation.rst

+1-5
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,7 @@ your `Apache`_ or `Nginx`_ web server as explained in
204204
:doc:`/cookbook/configuration/web_server_configuration`.
205205

206206
When you are finished working on your Symfony application, you can stop the
207-
server with the ``server:stop`` command:
208-
209-
.. code-block:: bash
210-
211-
$ php bin/console server:stop
207+
server by pressing `Ctrl+C` from terminal.
212208

213209
Checking Symfony Application Configuration and Setup
214210
----------------------------------------------------

book/templating.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ Template Naming and Locations
382382
By default, templates can live in two different locations:
383383

384384
``app/Resources/views/``
385-
The applications ``views`` directory can contain application-wide base templates
385+
The application's ``views`` directory can contain application-wide base templates
386386
(i.e. your application's layouts and templates of the application bundle) as
387387
well as templates that override third party bundle templates
388388
(see :ref:`overriding-bundle-templates`).
@@ -616,7 +616,7 @@ articles::
616616
}
617617
}
618618

619-
The ``recentList`` template is perfectly straightforward:
619+
The ``recent_list`` template is perfectly straightforward:
620620

621621
.. configuration-block::
622622

@@ -975,7 +975,7 @@ route:
975975
976976
In this case, you need to specify both the route name (``article_show``) and
977977
a value for the ``{slug}`` parameter. Using this route, revisit the
978-
``recentList`` template from the previous section and link to the articles
978+
``recent_list`` template from the previous section and link to the articles
979979
correctly:
980980

981981
.. configuration-block::
@@ -1053,7 +1053,7 @@ being used and generating the correct paths accordingly.
10531053

10541054
Additionally, if you use the ``asset`` function, Symfony can automatically
10551055
append a query string to your asset, in order to guarantee that updated static
1056-
assets won't be cached when deployed. For example, ``/images/logo.png`` might
1056+
assets won't be loaded from cache after being deployed. For example, ``/images/logo.png`` might
10571057
look like ``/images/logo.png?v2``. For more information, see the :ref:`reference-framework-assets-version`
10581058
configuration option.
10591059

book/translation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -927,5 +927,5 @@ steps:
927927
.. _`i18n`: https://en.wikipedia.org/wiki/Internationalization_and_localization
928928
.. _`ISO 3166-1 alpha-2`: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
929929
.. _`ISO 639-1`: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
930-
.. _`Translatable Extension`: https://github.com/l3pp4rd/DoctrineExtensions
930+
.. _`Translatable Extension`: http://atlantic18.github.io/DoctrineExtensions/doc/translatable.html
931931
.. _`Translatable Behavior`: https://github.com/KnpLabs/DoctrineBehaviors

components/http_foundation/introduction.rst

+11-7
Original file line numberDiff line numberDiff line change
@@ -147,25 +147,28 @@ exist::
147147
// the query string is '?foo=bar'
148148

149149
$request->query->get('foo');
150-
// returns bar
150+
// returns 'bar'
151151

152152
$request->query->get('bar');
153153
// returns null
154154

155-
$request->query->get('bar', 'bar');
156-
// returns 'bar'
155+
$request->query->get('bar', 'baz');
156+
// returns 'baz'
157157

158158
When PHP imports the request query, it handles request parameters like
159159
``foo[bar]=bar`` in a special way as it creates an array. So you can get the
160160
``foo`` parameter and you will get back an array with a ``bar`` element::
161161

162-
// the query string is '?foo[bar]=bar'
162+
// the query string is '?foo[bar]=baz'
163163

164164
$request->query->get('foo');
165-
// returns array('bar' => 'bar')
165+
// returns array('bar' => 'baz')
166166

167167
$request->query->get('foo[bar]');
168-
// returns null
168+
// returns null
169+
170+
$request->query->get('foo')['bar'];
171+
// returns 'baz'
169172

170173
.. _component-foundation-attributes:
171174

@@ -500,7 +503,8 @@ if it should::
500503

501504
BinaryFileResponse::trustXSendfileTypeHeader();
502505

503-
You can still set the ``Content-Type`` of the sent file, or change its ``Content-Disposition``::
506+
With the ``BinaryFileResponse``, you can still set the ``Content-Type`` of the sent file,
507+
or change its ``Content-Disposition``::
504508

505509
$response->headers->set('Content-Type', 'text/plain');
506510
$response->setContentDisposition(

components/var_dumper/introduction.rst

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ You can install the component in 2 different ways:
1717
* :doc:`Install it via Composer </components/using_components>` (``symfony/var-dumper`` on `Packagist`_);
1818
* Use the official Git repository (https://github.com/symfony/var-dumper).
1919

20+
.. note::
21+
22+
If using it inside a Symfony application, make sure that the
23+
DebugBundle is enabled in your ``app/AppKernel.php`` file.
24+
2025
.. _components-var-dumper-dump:
2126

2227
The dump() Function

components/yaml/yaml_format.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ can use double quotes, for these characters it is more convenient to use single
5050
quotes, which avoids having to escape any backslash ``\``:
5151

5252
* ``:``, ``{``, ``}``, ``[``, ``]``, ``,``, ``&``, ``*``, ``#``, ``?``, ``|``,
53-
``-``, ``<``, ``>``, ``=``, ``!``, ``%``, ``@``, ``\```
53+
``-``, ``<``, ``>``, ``=``, ``!``, ``%``, ``@``, `````
5454

5555
The double-quoted style provides a way to express arbitrary strings, by
5656
using ``\`` to escape characters and sequences. For instance, it is very useful

contributing/code/bc.rst

-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ Change return type No
236236
Add private method Yes
237237
Remove private method Yes
238238
Change name Yes
239-
Reduce visibility Yes
240239
Add argument without a default value Yes
241240
Add argument with a default value Yes
242241
Remove argument Yes

contributing/code/patches.rst

+4-43
Original file line numberDiff line numberDiff line change
@@ -272,49 +272,10 @@ pull request message, like in:
272272
[Yaml] fixed something
273273
[Form] [Validator] [FrameworkBundle] added something
274274
275-
The pull request description must include the following checklist at the top
276-
to ensure that contributions may be reviewed without needless feedback
277-
loops and that your contributions can be included into Symfony as quickly as
278-
possible:
279-
280-
.. code-block:: text
281-
282-
| Q | A
283-
| ------------- | ---
284-
| Bug fix? | [yes|no]
285-
| New feature? | [yes|no]
286-
| BC breaks? | [yes|no]
287-
| Deprecations? | [yes|no]
288-
| Tests pass? | [yes|no]
289-
| Fixed tickets | [comma separated list of tickets fixed by the PR]
290-
| License | MIT
291-
| Doc PR | [The reference to the documentation PR if any]
292-
293-
An example submission could now look as follows:
294-
295-
.. code-block:: text
296-
297-
| Q | A
298-
| ------------- | ---
299-
| Bug fix? | no
300-
| New feature? | no
301-
| BC breaks? | no
302-
| Deprecations? | no
303-
| Tests pass? | yes
304-
| Fixed tickets | #12, #43
305-
| License | MIT
306-
| Doc PR | symfony/symfony-docs#123
307-
308-
The whole table must be included (do **not** remove lines that you think are
309-
not relevant). For simple typos, minor changes in the PHPDocs, or changes in
310-
translation files, use the shorter version of the check-list:
311-
312-
.. code-block:: text
313-
314-
| Q | A
315-
| ------------- | ---
316-
| Fixed tickets | [comma separated list of tickets fixed by the PR]
317-
| License | MIT
275+
The default pull request description contains a table which you must fill in
276+
with the appropriate answers. This ensures that contributions may be reviewed
277+
without needless feedback loops and that your contributions can be included into
278+
Symfony as quickly as possible.
318279

319280
Some answers to the questions trigger some more requirements:
320281

contributing/community/releases.rst

+13-14
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,19 @@ Below is the schedule for the first few versions that use this release model:
9191
* **Blue** represents the Stabilization phase
9292
* **Green** represents the Maintenance period
9393

94-
This results in very predictable dates and maintenance periods:
94+
.. tip::
95+
96+
If you want to learn more about the timeline of any given Symfony version,
97+
use the online `timeline calculator`_.
98+
99+
.. tip::
100+
101+
Whenever an important event related to Symfony versions happens (a version
102+
reaches end of maintenance or a new patch version is released for
103+
instance), you can automatically receive an email notification if you
104+
subscribed on the `roadmap notification`_ page.
105+
106+
.. _version-history:
95107

96108
======= ============== ======= ======================== ===========
97109
Version Feature Freeze Release End of Maintenance End of Life
@@ -123,19 +135,6 @@ Version Feature Freeze Release End of Maintenance End of Life
123135
.. [2] Symfony 2.8 is the last version of the Symfony 2.x branch.
124136
.. [3] Symfony 3.0 is the first version to use the new release process based on five minor releases.
125137
126-
.. tip::
127-
128-
If you want to learn more about the timeline of any given Symfony version,
129-
use the online `timeline calculator`_. You can also get all data as a JSON
130-
string via a URL like `https://symfony.com/roadmap.json?version=2.x`.
131-
132-
.. tip::
133-
134-
Whenever an important event related to Symfony versions happens (a version
135-
reaches end of maintenance or a new patch version is released for
136-
instance), you can automatically receive an email notification if you
137-
subscribed on the `roadmap notification`_ page.
138-
139138
Backwards Compatibility
140139
-----------------------
141140

cookbook/assetic/php.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Organizing your Web Asset Files
4242
-------------------------------
4343

4444
This example will include a setup using the Bootstrap CSS framework, jQuery, FontAwesome
45-
and some regular CSS and and JavaScript application files (called ``main.css`` and
45+
and some regular CSS and JavaScript application files (called ``main.css`` and
4646
``main.js``). The recommended directory structure for this set-up looks like this:
4747

4848
.. code-block:: text

cookbook/event_dispatcher/event_listener.rst

-2
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ listen to the same ``kernel.exception`` event::
141141
namespace AppBundle\EventSubscriber;
142142

143143
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
144-
use Symfony\Component\HttpFoundation\Response;
145144
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
146-
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
147145

148146
class ExceptionSubscriber implements EventSubscriberInterface
149147
{

cookbook/form/create_custom_field_type.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ link for details), create a ``gender_widget`` block to handle this:
109109

110110
.. code-block:: html+twig
111111

112-
{# app/Resources/views/Form/fields.html.twig #}
112+
{# app/Resources/views/form/fields.html.twig #}
113113
{% block gender_widget %}
114114
{% spaceless %}
115115
{% if expanded %}
@@ -130,7 +130,7 @@ link for details), create a ``gender_widget`` block to handle this:
130130

131131
.. code-block:: html+php
132132

133-
<!-- app/Resources/views/Form/gender_widget.html.php -->
133+
<!-- app/Resources/views/form/gender_widget.html.php -->
134134
<?php if ($expanded) : ?>
135135
<ul <?php $view['form']->block($form, 'widget_container_attributes') ?>>
136136
<?php foreach ($form as $child) : ?>

cookbook/form/create_form_type_extension.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ Generic Form Type Extensions
323323

324324
You can modify several form types at once by specifying their common parent
325325
(:doc:`/reference/forms/types`). For example, several form types natively
326-
available in Symfony inherit from the ``TextType`` form type (such as ``email``,
326+
available in Symfony inherit from the ``TextType`` form type (such as ``EmailType``,
327327
``SearchType``, ``UrlType``, etc.). A form type extension applying to ``TextType``
328328
(i.e. whose ``getExtendedType`` method returns ``TextType::class``) would apply
329329
to all of these form types.

cookbook/form/unit_testing.rst

+2
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ make sure the ``FormRegistry`` uses the created instance::
128128
{
129129
// mock any dependencies
130130
$this->entityManager = $this->getMock('Doctrine\Common\Persistence\ObjectManager');
131+
132+
parent::setUp();
131133
}
132134

133135
protected function getExtensions()

cookbook/security/impersonating_user.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ how to change the sticky locale:
222222

223223
.. code-block:: php
224224
225-
// src/AppBundle/EventListener/SwitchUserListener.pnp
225+
// src/AppBundle/EventListener/SwitchUserListener.php
226226
namespace AppBundle\EventListener;
227227
228228
use Symfony\Component\Security\Http\Event\SwitchUserEvent;

reference/constraints/Image.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ that it is between a certain size, add the following:
9999
.. code-block:: yaml
100100
101101
# src/AppBundle/Resources/config/validation.yml
102-
AppBundle\Entity\Author
102+
AppBundle\Entity\Author:
103103
properties:
104104
headshot:
105105
- Image:

reference/constraints/Isbn.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ on an object that will contain an ISBN.
3838
{
3939
/**
4040
* @Assert\Isbn(
41-
* type = isbn10,
42-
* message: This value is not valid.
41+
* type = "isbn10",
42+
* message = "This value is not valid."
4343
* )
4444
*/
4545
protected $isbn;
@@ -89,7 +89,7 @@ on an object that will contain an ISBN.
8989
public static function loadValidatorMetadata(ClassMetadata $metadata)
9090
{
9191
$metadata->addPropertyConstraint('isbn', new Assert\Isbn(array(
92-
'type' => isbn10,
92+
'type' => 'isbn10',
9393
'message' => 'This value is not valid.'
9494
)));
9595
}

0 commit comments

Comments
 (0)