8000 [Dotenv] Improve Dotenv messages by seriquynh · Pull Request #31070 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions UPGRADE-4.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Doctrine Bridge
Dotenv
------

* First parameter of `Dotenv::__construct()` will change from `true` to `false` in Symfony 5.0. A deprecation warning
is triggered if no parameter is used. Use `$usePutenv = true` to upgrade without breaking changes.
* First parameter of `Dotenv::__construct()` will be changed from `true` to `false` in Symfony 5.0. A deprecation warning
is triggered if no parameter is provided. Use `$usePutenv = true` to upgrade without breaking changes.

EventDispatcher
---------------
Expand Down Expand Up @@ -170,7 +170,7 @@ SecurityBundle
TwigBridge
----------

* deprecated the `$requestStack` and `$requestContext` arguments of the
* deprecated the `$requestStack` and `$requestContext` arguments of the
`HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper`
instance as the only argument instead

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Dotenv/Dotenv.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class Dotenv
public function __construct(bool $usePutenv = true)
{
if (!\func_num_args()) {
@trigger_error(sprintf('The default value of "$usePutenv" argument of "%s\'s constructor will change from "true" to "false" in Symfony 5.0, you should define its value explicitly.', __METHOD__), E_USER_DEPRECATED);
@trigger_error(sprintf('The default value of "$usePutenv" argument of "%s" will be changed from "true" to "false" in Symfony 5.0. You should define its value explicitly.', __METHOD__), E_USER_DEPRECATED);
}

$this->usePutenv = $usePutenv;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Dotenv/Tests/DotenvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public function testOverridingEnvVarsWithNamesMemorizedInSpecialVar()

/**
* @group legacy
* @expectedDeprecation The default value of "$usePutenv" argument of "%s's constructor will change from "true" to "false" in Symfony 5.0, you should define its value explicitly.
* @expectedDeprecation The default value of "$usePutenv" argument of "%s" will be changed from "true" to "false" in Symfony 5.0. You should define its value explicitly.
*/
public function testDeprecationWarning()
{
Expand Down
0