xp-framework/core

Environment::variables() empty on certain environments

thekid opened this issue · 0 comments

thekid@Surface:~$ export | wc -l
22
thekid@Surface:~$ xp -w '\lang\Environment::variables()'
[]

This is because the ini setting variables_order doesn't include E for populating the $_ENV global:

thekid@Surface:~$ php -i | grep ini | head -1
Configuration File (php.ini) Path => /etc/php/7.4/cli
thekid@Surface:~$ grep -Er 'variables_order\s*=' /etc/php/7.4/cli
/etc/php/7.4/cli/php.ini:variables_order = "GPCS"

See also https://www.php.net/manual/de/ini.core.php#ini.variables-order. First noticed when running https://github.com/xp-framework/core/actions/runs/670703578