You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Symfony\Component\DependencyInjection\Exception\OutOfBoundsException]
Service "ApiPlatform\Tests\Behat\DoctrineContext": Cannot replace arguments for class "ApiPlatform\Tests\Behat\DoctrineContext" if none have been configured yet.
Exception trace:
at /symfony/dependency-injection/Definition.php:257
Symfony\Component\DependencyInjection\Definition->replaceArgument() at /symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php:167
Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass->doResolveDefinition() at /symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php:63
Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass->resolveDefinition() at /symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php:46
Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass->processValue() at /symfony/dependency-injection/Compiler/AbstractRecursivePass.php:84
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue() at /symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php:37
Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass->processValue() at /symfony/dependency-injection/Compiler/AbstractRecursivePass.php:45
Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process() at /symfony/dependency-injection/Compiler/Compiler.php:73
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /symfony/dependency-injection/ContainerBuilder.php:752
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /symfony/http-kernel/Kernel.php:495
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /symfony/http-kernel/Kernel.php:732
Symfony\Component\HttpKernel\Kernel->preBoot() at /symfony/http-kernel/Kernel.php:120
Symfony\Component\HttpKernel\Kernel->boot() at /symfony/http-kernel/Kernel.php:135
Symfony\Component\HttpKernel\Kernel->reboot() at /symfony/framework-bundle/Command/CacheClearCommand.php:229
Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() at /symfony/framework-bundle/Command/CacheClearCommand.php:141
Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /symfony/console/Command/Command.php:279
Symfony\Component\Console\Command\Command->run() at /symfony/console/Application.php:1047
Symfony\Component\Console\Application->doRunCommand() at /symfony/framework-bundle/Console/Application.php:123
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /symfony/console/Application.php:316
Symfony\Component\Console\Application->doRun() at /symfony/framework-bundle/Console/Application.php:77
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /symfony/console/Application.php:167
Symfony\Component\Console\Application->run() at tests/Fixtures/app/console:36
cache:clear [--no-warmup] [--no-optional-warmers]
This bug can be observed when using the #[WithMonologChannel] attribute on a service where some constructor arguments have been specified by name. edit: see my next comment.
This bug can be observed when using the #[WithMonologChannel] attribute on a service where some constructor arguments have been specified by name.
Update: It has nothing to do with the Monolog channel magic: A simple service that mixes autowiring with explicitly set named arguments is apparently enough. I've updated the reproducer.
Symfony version(s) affected
7.1
Description
Cache clear drops:
How to reproduce
But actually the service declaration is as simple as:
Possible Solution
I tracked the bug to:
symfony/src/Symfony/Component/DependencyInjection/Compiler/ResolveAutowireInlineAttributesPass.php
Lines 50 to 52 in 820382c
Probably that this pass should be done later on? Not sure what AutowireInline actually tries to fix.
If I may also the code change at b9a838e#diff-a0f563695b61a31b6e2bee8d55d019b52326c245667db02ba878a2a878d78b98 should be commented as it's hard to know why the sudden change of testing for
.
as first char of the service nameAdditional Context
No response
The text was updated successfully, but these errors were encountered: