Open indykoning opened 2 months ago
Thanks for reporting, I can confirm this is a bug but haven't found a solution yet. Feel free to dive into the specifics to figure out what is going wrong here.
What I've found so far is that the \GrumPHP\Configuration\Compiler\TaskCompilerPass
is being executed before the env vars are being replaced inside \Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass
when executing $container->compile(true);
inside \GrumPHP\Configuration\ContainerBuilder::buildFromConfiguration()
.
This results in the task instances that are registered inside the container to have this env_19eeff9b12d8f08c_bool_GRUM_COMPOSER_NORMALIZE_ENABLED_b9f45633a4808b98cb74867bcd84c333
placeholder instead of the actual replaced value.
Following the docs on using environment variables and parameters doesn't actually function as expected. The example seems to work, however setting the variable to false still has the config enabled.
i've debugged it by using it in a task and dumping the task definition in the code. Which results in:
instead of the expected bool value, it is a string identifying the variable to be resolved. This feels similar to https://github.com/symfony/symfony/issues/45868
My configuration
Steps to reproduce:
Result: