diff --git a/contributing/community/review-comments.rst b/contributing/community/review-comments.rst index d9f0066d10a..a317c12fa27 100644 --- a/contributing/community/review-comments.rst +++ b/contributing/community/review-comments.rst @@ -43,16 +43,18 @@ that, but swearing/cursing and name calling doesn't really encourage anyone to help you. Take a deep breath, count to 10 and try to *clearly* explain what problems you encounter. -Gender-neutral Pronouns ------------------------ +Inclusive Language +------------------ -While not "formally" required, it's better to use gender-neutral pronouns. -Unless someone "indicated" their pronouns, use "they", "them" instead of -"he", "she", "his", "hers", "his/hers", "he/she", etc. +In an effort to be inclusive to a wide group of people, it's recommended to +use personal pronouns that don't suggest a particular gender. Unless someone +has stated their pronouns, use "they", "them" instead of "he", "she", "his", +"hers", "his/hers", "he/she", etc. -Try to avoid using wording that may be considered excluding and needlessly gendered, -like for example words that have a male base. For example we recommend to use other -words like "folks", "team", "everyone" in place of "guys". +Try to avoid using wording that may be considered excluding, needlessly gendered +(e.g. words that have a male or female base), racially motivated or singles out +a particular group in society. For example, it's recommended to use words like +"folks", "team", "everyone" instead of "guys", "ladies", "yanks", etc. Giving Positive Feedback ------------------------ diff --git a/controller.rst b/controller.rst index bdbe0c977c2..4882b66a781 100644 --- a/controller.rst +++ b/controller.rst @@ -218,14 +218,14 @@ method renders a template **and** puts that content into a ``Response`` object for you:: // renders app/Resources/views/lucky/number.html.twig - return $this->render('lucky/number.html.twig', array('name' => $name)); + return $this->render('lucky/number.html.twig', array('number' => $number)); Templates can also live in deeper sub-directories. Just try to avoid creating unnecessarily deep structures:: // renders app/Resources/views/lottery/lucky/number.html.twig return $this->render('lottery/lucky/number.html.twig', array( - 'name' => $name, + 'number' => $number, )); The Symfony templating system and Twig are explained more in the diff --git a/doctrine/mapping_model_classes.rst b/doctrine/mapping_model_classes.rst index 2f18ad717d3..8e0b7b95c0d 100644 --- a/doctrine/mapping_model_classes.rst +++ b/doctrine/mapping_model_classes.rst @@ -87,7 +87,7 @@ be adapted for your case:: } } -Note the :phpfunction:`class_exists()` check. This is crucial, as you do not want your +Note the :phpfunction:`class_exists` check. This is crucial, as you do not want your bundle to have a hard dependency on all Doctrine bundles but let the user decide which to use. diff --git a/form/rendering.rst b/form/rendering.rst index 65fa4ecf0bb..c6b6ecbf83d 100644 --- a/form/rendering.rst +++ b/form/rendering.rst @@ -21,7 +21,7 @@ of code. Of course, you'll usually need much more flexibility when rendering: .. code-block:: html+php - + start($form) ?> errors($form) ?> diff --git a/http_cache/validation.rst b/http_cache/validation.rst index c21ec877539..7bd35877356 100644 --- a/http_cache/validation.rst +++ b/http_cache/validation.rst @@ -200,7 +200,7 @@ exposing a simple and efficient pattern:: // create a Response with an ETag and/or a Last-Modified header $response = new Response(); - $response->setETag($article->computeETag()); + $response->setEtag($article->computeETag()); $response->setLastModified($article->getPublishedAt()); // Set response as public. Otherwise it will be private by default. diff --git a/routing.rst b/routing.rst index 7ad7ebfe0e4..cf829385daf 100644 --- a/routing.rst +++ b/routing.rst @@ -466,10 +466,6 @@ a slash. URLs matching this route might look like: Symfony provides you with a way to do this by leveraging service container parameters. Read more about this in ":doc:`/routing/service_container_parameters`". -.. caution:: - - A route placeholder name cannot start with a digit and cannot be longer than 32 characters. - Special Routing Parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/security/entity_provider.rst b/security/entity_provider.rst index 77779e01df0..d772e90b2ae 100644 --- a/security/entity_provider.rst +++ b/security/entity_provider.rst @@ -133,13 +133,20 @@ For this entry, suppose that you already have a ``User`` entity inside an $this->password, // see section on salt below // $this->salt - ) = unserialize($serialized); + ) = unserialize($serialized, ['allowed_classes' => false]); } } To make things shorter, some of the getter and setter methods aren't shown. But you can generate these manually or with your own IDE. +.. caution:: + + In the example above, the User entity's table name is "app_users" because + "USER" is a SQL reserved word. If you wish to call your table name "user", + `it must be quoted with backticks`_ to avoid errors. The annotation should + look like ``@ORM\Table(name="`user`")``. + Next, make sure to :ref:`create the database table `: .. code-block:: terminal @@ -551,3 +558,4 @@ or worry about it. .. _fixtures: https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html .. _FOSUserBundle: https://github.com/FriendsOfSymfony/FOSUserBundle +.. _`it must be quoted with backticks`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words diff --git a/validation.rst b/validation.rst index 9a4a234cb0e..2196107c11b 100644 --- a/validation.rst +++ b/validation.rst @@ -509,14 +509,6 @@ of the form fields:: ; } -The ``constraints`` option is only available if the ``ValidatorExtension`` -was enabled through the form factory builder:: - - Forms::createFormFactoryBuilder() - ->addExtension(new ValidatorExtension(Validation::createValidator())) - ->getFormFactory() - ; - .. index:: single: Validation; Constraint targets