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

Skip to content

Commit 51f72ff

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Update rendering.rst remove part about adding extension Add "allowed_classes" argument for unserialize() Fix "class_exists" PHP function URL Fix typo in method setETag. Correct method name is setEtag Minor changes to the previous merge Rewrite the gender-neutral pronoun section to reflect an inclusive viewpoint for everyone Update controller.rst Add cautionary advice about SQL reserved words Removed an internal detail about route placeholders
2 parents c11dd42 + 65898f6 commit 51f72ff

File tree

8 files changed

+24
-26
lines changed

8 files changed

+24
-26
lines changed

contributing/community/review-comments.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,18 @@ that, but swearing/cursing and name calling doesn't really encourage anyone to
4343
help you. Take a deep breath, count to 10 and try to *clearly* explain what problems
4444
you encounter.
4545

46-
Gender-neutral Pronouns
47-
-----------------------
46+
Inclusive Language
47+
------------------
4848

49-
While not "formally" required, it's better to use gender-neutral pronouns.
50-
Unless someone "indicated" their pronouns, use "they", "them" instead of
51-
"he", "she", "his", "hers", "his/hers", "he/she", etc.
49+
In an effort to be inclusive to a wide group of people, it's recommended to
50+
use personal pronouns that don't suggest a particular gender. Unless someone
51+
has stated their pronouns, use "they", "them" instead of "he", "she", "his",
52+
"hers", "his/hers", "he/she", etc.
5253

53-
Try to avoid using wording that may be considered excluding and needlessly gendered,
54-
like for example words that have a male base. For example we recommend to use other
55-
words like "folks", "team", "everyone" in place of "guys".
54+
Try to avoid using wording that may be considered excluding, needlessly gendered
55+
(e.g. words that have a male or female base), racially motivated or singles out
56+
a particular group in society. For example, it's recommended to use words like
57+
"folks", "team", "everyone" instead of "guys", "ladies", "yanks", etc.
5658

5759
Giving Positive Feedback
5860
------------------------

controller.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ method renders a template **and** puts that content into a ``Response``
218218
object for you::
219219

220220
// renders app/Resources/views/lucky/number.html.twig
221-
return $this->render('lucky/number.html.twig', array('name' => $name));
221+
return $this->render('lucky/number.html.twig', array('number' => $number));
222222

223223
Templates can also live in deeper sub-directories. Just try to avoid
224224
creating unnecessarily deep structures::
225225

226226
// renders app/Resources/views/lottery/lucky/number.html.twig
227227
return $this->render('lottery/lucky/number.html.twig', array(
228-
'name' => $name,
228+
'number' => $number,
229229
));
230230

231231
The Symfony templating system and Twig are explained more in the

doctrine/mapping_model_classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ be adapted for your case::
8787
}
8888
}
8989

90-
Note the :phpfunction:`class_exists()` check. This is crucial, as you do not want your
90+
Note the :phpfunction:`class_exists` check. This is crucial, as you do not want your
9191
bundle to have a hard dependency on all Doctrine bundles but let the user
9292
decide which to use.
9393

form/rendering.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ of code. Of course, you'll usually need much more flexibility when rendering:
2121

2222
.. code-block:: html+php
2323

24-
<!-- app/Resources/views/default/newAction.html.php -->
24+
<!-- app/Resources/views/default/new.html.php -->
2525
<?php echo $view['form']->start($form) ?>
2626
<?php echo $view['form']->errors($form) ?>
2727

http_cache/validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ exposing a simple and efficient pattern::
200200

201201
// create a Response with an ETag and/or a Last-Modified header
202202
$response = new Response();
203-
$response->setETag($article->computeETag());
203+
$response->setEtag($article->computeETag());
204204
$response->setLastModified($article->getPublishedAt());
205205

206206
// Set response as public. Otherwise it will be private by default.

routing.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,6 @@ a slash. URLs matching this route might look like:
466466
Symfony provides you with a way to do this by leveraging service container
467467
parameters. Read more about this in ":doc:`/routing/service_container_parameters`".
468468

469-
.. caution::
470-
471-
A route placeholder name cannot start with a digit and cannot be longer than 32 characters.
472-
473469
Special Routing Parameters
474470
~~~~~~~~~~~~~~~~~~~~~~~~~~
475471

security/entity_provider.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,20 @@ For this entry, suppose that you already have a ``User`` entity inside an
133133
$this->password,
134134
// see section on salt below
135135
// $this->salt
136-
) = unserialize($serialized);
136+
) = unserialize($serialized, ['allowed_classes' => false]);
137137
}
138138
}
139139

140140
To make things shorter, some of the getter and setter methods aren't shown.
141141
But you can generate these manually or with your own IDE.
142142

143+
.. caution::
144+
145+
In the example above, the User entity's table name is "app_users" because
146+
"USER" is a SQL reserved word. If you wish to call your table name "user",
147+
`it must be quoted with backticks`_ to avoid errors. The annotation should
148+
look like ``@ORM\Table(name="`user`")``.
149+
143150
Next, make sure to :ref:`create the database table <doctrine-creating-the-database-tables-schema>`:
144151

145152
.. code-block:: terminal
@@ -551,3 +558,4 @@ or worry about it.
551558

552559
.. _fixtures: https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
553560
.. _FOSUserBundle: https://github.com/FriendsOfSymfony/FOSUserBundle
561+
.. _`it must be quoted with backticks`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words

validation.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,6 @@ of the form fields::
509509
;
510510
}
511511

512-
The ``constraints`` option is only available if the ``ValidatorExtension``
513-
was enabled through the form factory builder::
514-
515-
Forms::createFormFactoryBuilder()
516-
->addExtension(new ValidatorExtension(Validation::createValidator()))
517-
->getFormFactory()
518-
;
519-
520512
.. index::
521513
single: Validation; Constraint targets
522514

0 commit comments

Comments
 (0)
0