Improve Dotenv messages

This commit is contained in:
Quynh Xuan Nguyen 2019-04-11 08:29:28 +07:00
parent e0c4528237
commit e871a6a83a
3 changed files with 5 additions and 5 deletions

View File

@ -48,8 +48,8 @@ Doctrine Bridge
Dotenv Dotenv
------ ------
* First parameter of `Dotenv::__construct()` will change from `true` to `false` in Symfony 5.0. A deprecation warning * 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 used. Use `$usePutenv = true` to upgrade without breaking changes. is triggered if no parameter is provided. Use `$usePutenv = true` to upgrade without breaking changes.
EventDispatcher EventDispatcher
--------------- ---------------
@ -170,7 +170,7 @@ SecurityBundle
TwigBridge TwigBridge
---------- ----------
* deprecated the `$requestStack` and `$requestContext` arguments of the * deprecated the `$requestStack` and `$requestContext` arguments of the
`HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper` `HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper`
instance as the only argument instead instance as the only argument instead

View File

@ -45,7 +45,7 @@ final class Dotenv
public function __construct(bool $usePutenv = true) public function __construct(bool $usePutenv = true)
{ {
if (!\func_num_args()) { 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; $this->usePutenv = $usePutenv;

View File

@ -417,7 +417,7 @@ class DotenvTest extends TestCase
/** /**
* @group legacy * @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() public function testDeprecationWarning()
{ {