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

Skip to content

[Dotenv] Improve Dotenv messages #31070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2019
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