我正在从Symfony 2.7迁移到Symfony 3+。已更新多个组件和依赖项。
我设法修复了有关防火墙设置,表单和一些扩展(服务)的配置问题。
对一个问题进行排序将我介绍给另一个问题。
现在每次运行php bin/console
时都会出错:
[Symfony\Component\DependencyInjection\Exception\OutOfBoundsException]
The argument "3" doesn't exist.
我试图用-v或-vvv选项运行它,我只得到:
Exception trace:
() at /xx/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Definition.php:242
Symfony\Component\DependencyInjection\Definition->getArgument() at /xx/vendor/sonata-project/core-bundle/DependencyInjection/Compiler/FormFactoryCompilerPass.php:48
Sonata\CoreBundle\DependencyInjection\Compiler\FormFactoryCompilerPass->process() at /xx/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:139
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /xx/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:710
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /xx/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:515
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /xx/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:117
Symfony\Component\HttpKernel\Kernel->boot() at /xx/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:68
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /xx/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121
Symfony\Component\Console\Application->run() at /xx/bin/console:28
看起来容器兼容的问题: http://symfony.com/doc/current/components/dependency_injection/compilation.html
某些旧设置已通过验证,但DependencyInjection Compiler未正确使用它。
我有一些问题:
谢谢!