Skip to content

Commit fd08410

Browse files
committed
Merge branch '4.1'
* 4.1: Updated associations.rst Formatting: Apply PSR-2 formatting to code example Update conventions.rst Added a missing versionadded directive for 307/308 redirects Wrap long lines State Maker dependency for generating controllers Small grammar update in HttpFoundation
2 parents 8620580 + 4b2818c commit fd08410

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

components/http_foundation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ represented by a PHP callable instead of a string::
548548

549549
Additionally, PHP isn't the only layer that can buffer output. Your web
550550
server might also buffer based on its configuration. Some servers, such as
551-
Nginx, let you disable buffering at config level or adding a special HTTP
551+
Nginx, let you disable buffering at the config level or by adding a special HTTP
552552
header in the response::
553553

554554
// disables FastCGI buffering in Nginx only for this response

contributing/code/conventions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When an object has a "main" many relation with related "things"
2626
* ``count()``
2727
* ``keys()``
2828

29-
The usage of these methods are only allowed when it is clear that there
29+
The usage of these methods is only allowed when it is clear that there
3030
is a main relation:
3131

3232
* a ``CookieJar`` has many ``Cookie`` objects;

controller.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ For more information about services, see the :doc:`/service_container` article.
293293
Generating Controllers
294294
----------------------
295295

296-
To save time, you can also tell Symfony to generate a new controller class:
296+
To save time, you can install `Symfony Maker`_ and tell Symfony to generate a
297+
new controller class:
297298

298299
.. code-block:: terminal
299300
@@ -676,4 +677,5 @@ Learn more about Controllers
676677
controller/*
677678

678679
.. _`helper methods`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
680+
.. _`Symfony Maker`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
679681
.. _`unvalidated redirects security vulnerability`: https://www.owasp.org/index.php/Open_redirect

doctrine/associations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ the ``Product`` entity (and getter & setter methods):
155155
return $this->category;
156156
}
157157
158-
public function setCategory(?Category $category): self
158+
public function setCategory(Category $category): self
159159
{
160160
$this->category = $category;
161161

doctrine/registration_form.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ With some validation added, your class may look something like this::
9999
*/
100100
private $roles;
101101

102-
public function __construct() {
102+
public function __construct()
103+
{
103104
$this->roles = array('ROLE_USER');
104105
}
105106

routing/redirect_in_config.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ action:
171171
Keeping the Request Method when Redirecting
172172
-------------------------------------------
173173

174+
.. versionadded:: 4.1
175+
The feature to keep the request method when redirecting was introduced in
176+
Symfony 4.1.
177+
174178
The redirections performed in the previous examples use the ``301`` and ``302``
175179
HTTP status codes. For legacy reasons, these HTTP redirections change the method
176180
of ``POST`` requests to ``GET`` (because redirecting a ``POST`` request didn't

0 commit comments

Comments
 (0)