-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
lint:container --resolve-env-vars fails on new project #59028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for testing and finding this issue. The option The error is due to some default parameters in the Kernel class: symfony/src/Symfony/Component/HttpKernel/Kernel.php Lines 574 to 578 in baf98b9
The full exception trace is:
|
This unit test reproduces the issue: <?php
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class Issue59028 extends TestCase
{
public function test()
{
$container = new ContainerBuilder();
$container->setParameter('container.runtime_mode', 'test');
$container->setParameter('kernel.runtime_mode', '%env(query_string:default:container.runtime_mode:APP_RUNTIME_MODE)%');
$container->resolveEnvPlaceholders('%env(default::key:web:default:kernel.runtime_mode:)%', true);
}
} |
I am also experiencing this issue |
@ostrolucky can you take a look at this when you get a chance? It seems like a pretty cool feature! |
Resolving env vars means you have to resolve parameters as well to make the |
Is there a solution? |
Symfony version(s) affected
7.2
Description
Resolved value of "default:kernel.runtime_mode:" did not result in an array value.
How to reproduce
symfony new --webapp env-var-demo cd env-var-demo bin/console lint:container --resolve-env-vars
The text was updated successfully, but these errors were encountered: