-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.4.2
Description
after migrating a Symfony project from 6.3.* to 6.4.2 I discovered that the function getenv
always return false
instead of the value in the file .env
also, I was able to have the same behavior with a new project (Symfony 6.4.2)
How to reproduce
Create a new project Symfony 6.4.2
create a function in a controller that call dd(getenv('APP_ENV'));
for example
Observe the results (screenshot)
Possible Solution
No response
Additional Context
tested in below PHP versions:
PHP 8.3.1 (cli) (built: Dec 20 2023 12:44:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.1, Copyright (c) Zend Technologies
with Zend OPcache v8.3.1, Copyright (c), by Zend Technologies
/usr/src/app # php --version
Cannot load Xdebug - it was already loaded
PHP 8.2.7 (cli) (built: Jun 15 2023 01:00:47) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.7, Copyright (c) Zend Technologies
with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies
with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans