Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3792264

Browse files
feature #41357 [Dotenv] Remove deprecated code (malteschlueter)
This PR was merged into the 6.0 branch. Discussion ---------- [Dotenv] Remove deprecated code | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - This remove deprecated code from Dotenv. The Changelog and Uprade.md was already updated. Commits ------- 872b7fd [Dotenv] Remove deprecated code
2 parents b1398bc + 872b7fd commit 3792264

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Symfony/Component/Dotenv/Dotenv.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,8 @@ final class Dotenv
4040
private $prodEnvs = ['prod'];
4141
private $usePutenv = false;
4242

43-
/**
44-
* @param string $envKey
45-
*/
46-
public function __construct($envKey = 'APP_ENV', string $debugKey = 'APP_DEBUG')
43+
public function __construct(string $envKey = 'APP_ENV', string $debugKey = 'APP_DEBUG')
4744
{
48-
if (\in_array($envKey = (string) $envKey, ['1', ''], true)) {
49-
trigger_deprecation('symfony/dotenv', '5.1', 'Passing a boolean to the constructor of "%s" is deprecated, use "Dotenv::usePutenv()".', __CLASS__);
50-
$this->usePutenv = (bool) $envKey;
51-
$envKey = 'APP_ENV';
52-
}
53-
5445
$this->envKey = $envKey;
5546
$this->debugKey = $debugKey;
5647
}

0 commit comments

Comments
 (0)