8000 Merge branch '2.8' into 3.1 · symfony/symfony-docs@ee01b57 · GitHub
[go: up one dir, main page]

Skip to content

Commit ee01b57

Browse files
committed
Merge branch '2.8' into 3.1
Conflicts: form/direct_submit.rst testing/doctrine.rst
2 parents da25d3c + 5a3b572 commit ee01b57

21 files changed

+105
-49
lines changed

bundles/extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ their fully qualified class names::
142142
{
143143
// ...
144144

145-
$this->addClassesToCompile(array(
145+
$this->addClassesToCompile(array(
146146
'AppBundle\\Manager\\UserManager',
147147
'AppBundle\\Utils\\Slugger',
148148
// ...

changelog.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,62 @@ documentation.
1313
Do you also want to participate in the Symfony Documentation? Take a look
1414
at the ":doc:`/contributing/documentation/overview`" article.
1515

16+
October, 2016
17+
-------------
18+
19+
New Documentation
20+
~~~~~~~~~~~~~~~~~
21+
22+
* `#7023 <https://github.com/symfony/symfony-docs/pull/7023>`_ Added useful debu A93C g commands in the debug documentation (hiddewie)
23+
24+
Fixed Documentation
25+
~~~~~~~~~~~~~~~~~~~
26+
27+
* `#7049 <https://github.com/symfony/symfony-docs/pull/7049>`_ Fix the platform.sh builds (wouterj)
28+
29+
Minor Documentation Changes
30+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
32+
* `#7090 <https://github.com/symfony/symfony-docs/pull/7090>`_ Remove suggestion to change the `.class` parameters (mpdude)
33+
* `#7095 <https://github.com/symfony/symfony-docs/pull/7095>`_ Also mention "hasXXX" methods as validation targets (mpdude)
34+
* `#7091 <https://github.com/symfony/symfony-docs/pull/7091>`_ A bracket was missed (hpatoio)
35+
* `#7097 <https://github.com/symfony/symfony-docs/pull/7097>`_ link to specific HTTP Cache RFC (snoek09)
36+
* `#7098 <https://github.com/symfony/symfony-docs/pull/7098>`_ Improved Redirecting paragraph of Testing page (ShinDarth)
37+
* `#7100 <https://github.com/symfony/symfony-docs/pull/7100>`_ Update birthday.rst (angyvolin)
38+
* `#7020 <https://github.com/symfony/symfony-docs/pull/7020>`_ Added jQuery symfony-collection plugin to Form collection docs (hiddewie)
39+
* `#7086 <https://github.com/symfony/symfony-docs/pull/7086>`_ Update bug documentation input console /console/input.rst (Quiss)
40+
* `#7085 <https://github.com/symfony/symfony-docs/pull/7085>`_ Update custom_authentication_provider.rst (BatsaxIV)
41+
* `#7083 <https://github.com/symfony/symfony-docs/pull/7083>`_ update github example (hootlex)
42+
* `#7082 <https://github.com/symfony/symfony-docs/pull/7082>`_ Update metadata.rst (fberthereau)
43+
* `#7077 <https://github.com/symfony/symfony-docs/pull/7077>`_ remove caution message (snoek09)
44+
* `#7061 <https://github.com/symfony/symfony-docs/pull/7061>`_ Change link to docs instead repo (mik-laj)
45+
* `#7066 <https://github.com/symfony/symfony-docs/pull/7066>`_ Remove erroneous placeholder text (regularjack)
46+
* `#7068 <https://github.com/symfony/symfony-docs/pull/7068>`_ Remove double spaces in some YAML configuration (michaelperrin)
47+
* `#7069 <https://github.com/symfony/symfony-docs/pull/7069>`_ use FCQN to reference the form type in add() (xabbuh)
48+
* `#6785 <https://github.com/symfony/symfony-docs/pull/6785>`_ Twig reference: Add links from routing functions to special routing parameters (alexislefebvre)
49+
* `#7043 <https://github.com/symfony/symfony-docs/pull/7043>`_ [Serializer] Move the see also block in the Learn More section (dunglas)
50+
* `#7035 <https://github.com/symfony/symfony-docs/pull/7035>`_ Redirect /form to /forms for consistency (wouterj)
51+
* `#7054 <https://github.com/symfony/symfony-docs/pull/7054>`_ Fix IS_AUTHENTICATED_FULLY annotation (mschobner)
52+
* `#7044 <https://github.com/symfony/symfony-docs/pull/7044>`_ Add Nginx configuration to environment variables (peterkokot)
53+
* `#7053 <https://github.com/symfony/symfony-docs/pull/7053>`_ Minor improvements for the contribution guide (javiereguiluz)
54+
* `#7050 <https://github.com/symfony/symfony-docs/pull/7050>`_ use single quotes for YAML strings (snoek09)
55+
* `#7047 <https://github.com/symfony/symfony-docs/pull/7047>`_ Fix typo in doctrine.rst (to manage) (lacyrhoades)
56+
* `#7046 <https://github.com/symfony/symfony-docs/pull/7046>`_ Fix incorrect callback validation example (mvar)
57+
* `#7034 <https://github.com/symfony/symfony-docs/pull/7034>`_ Changed RFC links from drafts to proposed standarts (a-ast)
58+
* `#7038 <https://github.com/symfony/symfony-docs/pull/7038>`_ Remove a dead link to the old PR header (dunglas)
59+
* `#7037 <https://github.com/symfony/symfony-docs/pull/7037>`_ Fix a typo in the serializer doc (dunglas)
60+
* `#7036 <https://github.com/symfony/symfony-docs/pull/7036>`_ Fix 404 error link for American English Oxford Dictionary (peterkokot)
61+
* `#6980 <https://github.com/symfony/symfony-docs/pull/6980>`_ Use strict comparison (greg0ire)
62+
* `#7025 <https://github.com/symfony/symfony-docs/pull/7025>`_ Update buisness-logic (zairigimad)
63+
* `#7027 <https://github.com/symfony/symfony-docs/pull/7027>`_ Remove dash prefix from route name (bocharsky-bw)
64+
* `#7028 <https://github.com/symfony/symfony-docs/pull/7028>`_ A few minor tweaks (bocharsky-bw)
65+
* `#7029 <https://github.com/symfony/symfony-docs/pull/7029>`_ refer to Symfony instead of Symfony2 (snoek09)
66+
* `#7031 <https://github.com/symfony/symfony-docs/pull/7031>`_ Capitalize the time designator (simoheinonen)
67+
* `#7018 <https://github.com/symfony/symfony-docs/pull/7018>`_ Reorder arguments: $request as the first argument (bocharsky-bw)
68+
* `#7014 <https://github.com/symfony/symfony-docs/pull/7014>`_ Add a note about Filesystem:mkdir behavior (mickaelandrieu)
69+
* `#6886 <https://github.com/symfony/symfony-docs/pull/6886>`_ Update controllers.rst (asandjivy)
70+
71+
1672
September, 2016
1773
---------------
1874

components/form.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ method:
569569
570570
$form->handleRequest($request);
571571
572-
if ($form->isValid()) {
572+
if ($form->isSubmitted() && $form->isValid()) {
573573
$data = $form->getData();
574574
575575
// ... perform some action, such as saving the data to the database
@@ -598,7 +598,7 @@ method:
598598
599599
$form->handleRequest($request);
600600
601-
if ($form->isValid()) {
601+
if ($form->isSubmitted() && $form->isValid()) {
602602
$data = $form->getData();
603603
604604
// ... perform some action, such as saving the data to the database

console/commands_as_services.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Symfony will even inject the container.
1111
While making life easier, this has some limitations:
1212

1313
* Your command must live in the ``Command`` directory;
14-
* There's no way to conditionally register your service based on the environment
14+
* There's no way to conditionally register your command based on the environment
1515
or availability of some dependencies;
1616
* You can't access the container in the ``configure()`` method (because
1717
``setContainer`` hasn't been called yet);

controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ For example, imagine you're processing a :doc:`form </forms>` submission::
380380
{
381381
// ...
382382

383-
if ($form->isValid()) {
383+
if ($form->isSubmitted() && $form->isValid()) {
384384
// do some sort of processing
385385

386386
$this->addFlash(

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Now you're ready to use this service in the controller::
293293
{
294294
// ...
295295

296-
if ($form->isValid()) {
296+
if ($form->isSubmitted() && $form->isValid()) {
297297
$file = $product->getBrochure();
298298
$fileName = $this->get('app.brochure_uploader')->upload($file);
299299

doctrine/associations.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ You can also query in the other direction::
316316

317317
In this case, the same things occur: you first query out for a single ``Category``
318318
object, and then Doctrine makes a second query to retrieve the related ``Product``
319-
objects, but only once/if you ask for them (i.e. when you call ``->getProducts()``).
319+
objects, but only once/if you ask for them (i.e. when you call ``getProducts()``).
320320
The ``$products`` variable is an array of all ``Product`` objects that relate
321321
to the given ``Category`` object via their ``category_id`` value.
322322

@@ -365,7 +365,7 @@ Of course, if you know up front that you'll need to access both objects, you
365365
can avoid the second query by issuing a join in the original query. Add the
366366
following method to the ``ProductRepository`` class::
367367

368-
// src/AppBundle/Entity/ProductRepository.php
368+
// src/AppBundle/Repository/ProductRepository.php
369369
public function findOneByIdJoinedToCategory($productId)
370370
{
371371
$query = $this->getEntityManager()
@@ -407,7 +407,7 @@ Doctrine's `Association Mapping Documentation`_.
407407
.. note::
408408

409409
If you're using annotations, you'll need to prepend all annotations with
410-
``ORM\`` (e.g. ``ORM\OneToMany``), which is not reflected in Doctrine's
410+
``@ORM\`` (e.g. ``@ORM\OneToMany``), which is not reflected in Doctrine's
411411
documentation. You'll also need to include the ``use Doctrine\ORM\Mapping as ORM;``
412412
statement, which *imports* the ``ORM`` annotations prefix.
413413

doctrine/repository.rst

Expand all lines: doctrine/repository.rst
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To do this, add the repository class name to your entity's mapping definition:
2121
use Doctrine\ORM\Mapping as ORM;
2222
2323
/**
24-
* @ORM\Entity(repositoryClass="AppBundle\Entity\ProductRepository")
24+
* @ORM\Entity(repositoryClass="AppBundle\Repository\ProductRepository")
2525
*/
2626
class Product
2727
{
@@ -33,7 +33,7 @@ To do this, add the repository class name to your entity's mapping definition:
3333
# src/AppBundle/Resources/config/doctrine/Product.orm.yml
3434
AppBundle\Entity\Product:
3535
type: entity
36-
repositoryClass: AppBundle\Entity\ProductRepository
36+
repositoryClass: AppBundle\Repository\ProductRepository
3737
# ...
3838
3939
.. code-block:: xml
@@ -47,7 +47,7 @@ To do this, add the repository class name to your entity's mapping definition:
4747
4848
<entity
4949
name="AppBundle\Entity\Product"
50-
repository-class="AppBundle\Entity\ProductRepository">
50+
repository-class="AppBundle\Repository\ProductRepository">
5151
5252
<!-- ... -->
5353
</entity>
@@ -72,8 +72,8 @@ entities, ordered alphabetically by name.
7272

7373
.. code-block:: php
7474
75-
// src/AppBundle/Entity/ProductRepository.php
76-
namespace AppBundle\Entity;
75+
// src/AppBundle/Repository/ProductRepository.php
76+
namespace AppBundle\Repository;
7777
7878
use Doctrine\ORM\EntityRepository;
7979

form/direct_submit.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ submissions::
1818

1919
$form->handleRequest($request);
2020

21-
if ($form->isValid()) {
21+
if ($form->isSubmitted() && $form->isValid()) {
2222
// perform some action...
2323

2424
return $this->redirectToRoute('task_success');
@@ -56,7 +56,7 @@ method, pass the submitted data directly to
5656
if ($request->isMethod('POST')) {
5757
$form->submit($request->request->get($form->getName()));
5858

59-
if ($form->isValid()) {
59+
if ($form->isSubmitted() && $form->isValid()) {
6060
// perform some action...
6161

6262
return $this->redirectToRoute('task_success');

form/dynamic_form_modification.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ your application. Assume that you have a sport meetup creation controller::
555555
$meetup = new SportMeetup();
556556
$form = $this->createForm(SportMeetupType::class, $meetup);
557557
$form->handleRequest($request);
558-
if ($form->isValid()) {
558+
if ($form->isSubmitted() && $form->isValid()) {
559559
// ... save the meetup, redirect etc.
560560
}
561561

form/form_collections.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ In your controller, you'll create a new form from the ``TaskType``::
171171

172172
$form->handleRequest($request);
173173

174-
if ($form->isValid()) {
174+
if ($form->isSubmitted() && $form->isValid()) {
175175
// ... maybe do some form processing, like saving the Task and Tag objects
176176
}
177177

form/multiple_buttons.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In your controller, use the button's
1919
:method:`Symfony\\Component\\Form\\ClickableInterface::isClicked` method for
2020
querying if the "Save and add" button was clicked::
2121

22-
if ($form->isValid()) {
22+
if ($form->isSubmitted() && $form->isValid()) {
2323
// ... perform some action, such as saving the task to the database
2424

2525
$nextAction = $form->get('saveAndAdd')->isClicked()

form/without_class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ an array of the submitted data. This is actually really easy::
2727

2828
$form->handleRequest($request);
2929

30-
if ($form->isValid()) {
30+
if ($form->isSubmitted() && $form->isValid()) {
3131
// data is an array with "name", "email", and "message" keys
3232
$data = $form->getData();
3333
}

quick_tour/the_big_picture.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ information and then they render a template to show the results to the user.
8080

8181
In this example, the ``index`` action is practically empty because it doesn't
8282
need to call any other method. The action just renders a template with the
83-
*Homepage.* content.
83+
*Homepage* content.
8484

8585
Routing
8686
~~~~~~~

reference/configuration/twig.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ TwigBundle Configuration ("twig")
6464
6565
<twig:config
6666
auto-reload="%kernel.debug%"
67-
autoescape="filename"
67+
autoescape="name"
6868
base-template-class="Twig_Template"
6969
cache="%kernel.cache_dir%/twig"
7070
charset="%kernel.charset%"
@@ -95,7 +95,7 @@ TwigBundle Configuration ("twig")
9595
'pi' => 3.14,
9696
),
9797
'auto_reload' => '%kernel.debug%',
98-
'autoescape' => 'filename',
98+
'autoescape' => 'name',
9999
'base_template_class' => 'Twig_Template',
100100
'cache' => '%kernel.cache_dir%/twig',
101101
'charset' => '%kernel.charset%',
@@ -129,7 +129,7 @@ compiled again automatically.
129129
autoescape
130130
~~~~~~~~~~
131131

132-
**type**: ``boolean`` or ``string`` **default**: ``'filename'``
132+
**type**: ``boolean`` or ``string`` **default**: ``'name'``
133133

134134
If set to ``false``, automatic escaping is disabled (you can still escape each content
135135
individually in the templates).
@@ -143,9 +143,9 @@ individually in the templates).
143143

144144
If set to a string, the template contents are escaped using the strategy with
145145
that name. Allowed values are ``html``, ``js``, ``css``, ``url``, ``html_attr``
146-
and ``filename``. The default value is ``filename``. This strategy escapes
147-
contents according to the filename extension (e.g. it uses ``html`` for
148-
``*.html.twig`` templates and ``js`` for ``*.js.html`` templates).
146+
and ``name``. The default value is ``name``. This strategy escapes contents
147+
according to the template name extension (e.g. it uses ``html`` for ``*.html.twig``
148+
templates and ``js`` for ``*.js.html`` templates).
149149

150150
.. tip::
151151

reference/constraints/Type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This will check if ``firstName`` is of type ``string`` and that ``age`` is an
7272
<class name="AppBundle\Entity\Author">
7373
<property name="firstName">
7474
<constraint name="Type">
75-
<type>string</type>
75+
<option name="type">string</option>
7676
</constraint>
7777
</property>
7878
<property name="age">

reference/forms/types/file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ be used to move the ``attachment`` file to a permanent location::
4949
{
5050
// ...
5151

52-
if ($form->isValid()) {
52+
if ($form->isSubmitted() && $form->isValid()) {
5353
$someNewFilename = ...
5454

5555
$form['attachment']->getData()->move($dir, $someNewFilename);

security/acl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Creating an ACL and Adding an ACE
132132
133133
// ... setup $form, and submit data
134134
135-
if ($form->isValid()) {
135+
if ($form->isSubmitted() && $form->isValid()) {
136136
$entityManager = $this->getDoctrine()->getManager();
137137
$entityManager->persist($comment);
138138
$entityManager->flush();

security/entity_provider.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ For this entry, suppose that you already have a ``User`` entity inside an
5050
5151
/**
5252
* @ORM\Table(name="app_users")
53-
* @ORM\Entity(repositoryClass="AppBundle\Entity\UserRepository")
53+
* @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
5454
*/
5555
class User implements UserInterface, \Serializable
5656
{
@@ -425,8 +425,8 @@ To do this, make your ``UserRepository`` implement a special
425425
:class:`Symfony\\Bridge\\Doctrine\\Security\\User\\UserLoaderInterface`. This
426426
interface only requires one method: ``loadUserByUsername($username)``::
427427

428-
// src/AppBundle/Entity/UserRepository.php
429-
namespace AppBundle\Entity;
428+
// src/AppBundle/Repository/UserRepository.php
429+
namespace AppBundle\Repository;
430430

431431
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
432432
use Doctrine\ORM\EntityRepository;

0 commit comments

Comments
 (0)
0