Skip to content

Commit b4bc4e0

Browse files
Leverage trigger_deprecation() from symfony/deprecation-contracts
1 parent e1f2713 commit b4bc4e0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dotenv.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ final class Dotenv
4646
public function __construct($envKey = 'APP_ENV', string $debugKey = 'APP_DEBUG')
4747
{
4848
if (\in_array($envKey = (string) $envKey, ['1', ''], true)) {
49-
@trigger_error(sprintf('Passing a boolean to the constructor of "%s" is deprecated since Symfony 5.1, use "Dotenv::usePutenv()".', __CLASS__), E_USER_DEPRECATED);
49+
trigger_deprecation('symfony/dotenv', '5.1', 'Passing a boolean to the constructor of "%s" is deprecated, use "Dotenv::usePutenv()".', __CLASS__);
5050
$this->usePutenv = (bool) $envKey;
5151
$envKey = 'APP_ENV';
5252
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.2.5"
19+
"php": "^7.2.5",
20+
"symfony/deprecation-contracts": "^2.1"
2021
},
2122
"require-dev": {
2223
"symfony/process": "^4.4|^5.0"

0 commit comments

Comments
 (0)