diff --git a/src/Illuminate/Support/helpers.php b/src/Illuminate/Support/helpers.php index 4cea4963bed1..d3312cfc73e9 100755 --- a/src/Illuminate/Support/helpers.php +++ b/src/Illuminate/Support/helpers.php @@ -8,7 +8,6 @@ use Dotenv\Environment\DotenvFactory; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Support\HigherOrderTapProxy; -use Dotenv\Environment\Adapter\PutenvAdapter; use Dotenv\Environment\Adapter\EnvConstAdapter; use Dotenv\Environment\Adapter\ServerConstAdapter; @@ -643,7 +642,7 @@ function env($key, $default = null) static $variables; if ($variables === null) { - $variables = (new DotenvFactory([new EnvConstAdapter, new PutEnvAdapter, new ServerConstAdapter]))->createImmutable(); + $variables = (new DotenvFactory([new EnvConstAdapter, new ServerConstAdapter]))->createImmutable(); } return Option::fromValue($variables->get($key)) diff --git a/tests/Foundation/Bootstrap/LoadEnvironmentVariablesTest.php b/tests/Foundation/Bootstrap/LoadEnvironmentVariablesTest.php index bbc21270f6de..da65d1000fbb 100644 --- a/tests/Foundation/Bootstrap/LoadEnvironmentVariablesTest.php +++ b/tests/Foundation/Bootstrap/LoadEnvironmentVariablesTest.php @@ -37,9 +37,6 @@ public function testCanLoad() (new LoadEnvironmentVariables)->bootstrap($this->getAppMock('.env')); $this->assertSame('BAR', env('FOO')); - $this->assertSame('BAR', getenv('FOO')); - $this->assertSame('BAR', $_ENV['FOO']); - $this->assertSame('BAR', $_SERVER['FOO']); } public function testCanFailSilent()