Skip to content

Commit 999f2da

Browse files
committed
minor #17855 import function env to avoid fatal error if copying docs (PhilETaylor)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- import function env to avoid fatal error if copying docs If you copy and past the example code, or dont realise then you get a fatal error message as `env` is a function not within the global scope. <img width="1139" alt="ScreenShot-2023-02-02-21 25 27" src="https://user-images.githubusercontent.com/400092/216453124-166c7331-a0e6-4e1c-aff8-3aa6e4dfcc48.png"> This change in the docs just imports the function like phpStorm tells me to ``` use function Symfony\Component\DependencyInjection\Loader\Configurator\env; ``` Commits ------- 32dfcbd import function env to avoid fatal error if copying docs
2 parents 5f059b8 + 32dfcbd commit 999f2da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mailer.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
5454
.. code-block:: php
5555
5656
// config/packages/mailer.php
57+
use function Symfony\Component\DependencyInjection\Loader\Configurator\env;
5758
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
5859
5960
return static function (ContainerConfigurator $containerConfigurator): void {
@@ -1193,6 +1194,7 @@ This can be configured by replacing the ``dsn`` configuration entry with a
11931194
.. code-block:: php
11941195
11951196
// config/packages/mailer.php
1197+
use function Symfony\Component\DependencyInjection\Loader\Configurator\env;
11961198
use Symfony\Config\FrameworkConfig;
11971199
11981200
return static function (FrameworkConfig $framework) {

0 commit comments

Comments
 (0)