Skip to content

Commit 6b8ce66

Browse files
committed
Merge branch '4.2'
* 4.2: Improved the explanation about the forward method Update email.rst
2 parents 334ee99 + 384c2ec commit 6b8ce66

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

controller/forwarding.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ How to Forward Requests to another Controller
55
=============================================
66

77
Though not very common, you can also forward to another controller internally
8-
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::forward`
9-
method. Instead of redirecting the user's browser, this makes an "internal"
10-
sub-request and calls the defined controller. The ``forward()`` method returns
11-
the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned
8+
with the ``forward()`` method provided by the
9+
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController` class
10+
(or :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait` if
11+
your controller doesn't extend from ``AbstractController``).
12+
13+
Instead of redirecting the user's browser, this makes an "internal" sub-request
14+
and calls the defined controller. The ``forward()`` method returns the
15+
:class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned
1216
from *that* controller::
1317

1418
public function index($name)

doctrine.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ The database connection information is stored as an environment variable called
5050
.. caution::
5151

5252
If the username, password, host or database name contain any character considered
53-
special in a URI (such as ``!``, ``@``, ``$``, ``#``, ``/``), you must encode them.
54-
See `RFC 3986`_ for the full list of reserved characters or use the
55-
:phpfunction:`urlencode` function to encode them. In this case you need to remove
56-
the ``resolve:`` prefix in ``config/packages/doctrine.yaml`` to avoid errors:
53+
special in a URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``),
54+
you must encode them. See `RFC 3986`_ for the full list of reserved characters or
55+
use the :phpfunction:`urlencode` function to encode them. In this case you need to
56+
remove the ``resolve:`` prefix in ``config/packages/doctrine.yaml`` to avoid errors:
5757
``url: '%env(resolve:DATABASE_URL)%'``
5858

5959
Now that your connection parameters are setup, Doctrine can create the ``db_name``
@@ -341,7 +341,7 @@ and save it!
341341
342342
// ...
343343
use Symfony\Component\HttpFoundation\Response;
344-
344+
345345
use App\Entity\Product;
346346
347347
class ProductController extends AbstractController

email.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ environment variable in the ``.env`` file:
3939
# use this to disable email delivery
4040
MAILER_URL=null://localhost
4141
42-
# use this to configure a traditional SMTP server (make sure to URL-encode the
43-
# values of the username and password if they contain non-alphanumeric characters
44-
# such as '+', '@', ':' and '*', which are reserved in URLs)
42+
# use this to configure a traditional SMTP server
4543
MAILER_URL=smtp://localhost:25?encryption=ssl&auth_mode=login&username=&password=
4644
45+
.. caution::
46+
47+
If the username, password or host contain any character considered special in a
48+
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
49+
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
50+
:phpfunction:`urlencode` function to encode them.
51+
4752
Refer to the :doc:`SwiftMailer configuration reference </reference/configuration/swiftmailer>`
4853
for the detailed explanation of all the available config options.
4954

@@ -171,3 +176,4 @@ Learn more
171176
.. _`Amazon SES`: http://aws.amazon.com/ses/
172177
.. _`generate an App password`: https://support.google.com/accounts/answer/185833
173178
.. _`allow less secure apps to access your Gmail account`: https://support.google.com/accounts/answer/6010255
179+
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt

0 commit comments

Comments
 (0)