1

我正在将一个站点从 Symfony 2.2 升级到 2.3。

我正在使用奏鸣曲和其他捆绑包,2.2 版本很好。

我坚持这个消息。

[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
服务“twig”依赖于不存在的服务“sonata.classification.manager.tag”。

例外:

异常跟踪: () 在 /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:59 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences () 在 /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:43 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processDefinition() 在/home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:54 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->/home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:52 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences() 的 processReferences()在 /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:52 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences() 在 /home /cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:44 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->processDefinition() at /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:37 Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass->process()在 /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:119 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() 在 /home /cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:629 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /home/cslucano/Projects/oDesk/ tr/app/bootstrap.php.cache:2407 Symfony\Component\HttpKernel\Kernel->在 /home/cslucano/Projects/oDesk/tr/app/bootstrap.php.cache:2187 的初始化容器() Symfony\Component\HttpKernel\Kernel->boot() 在 /home/cslucano/Projects/oDesk/tr/vendor/ symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:70 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony /src/Symfony/Component/Console/Application.php:121 Symfony\Component\Console\Application->run() at /home/cslucano/Projects/oDesk/tr/app/console:22doRun() at /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121 Symfony\Component\Console\Application->run() at /home/ cslucano/Projects/oDesk/tr/app/console:22doRun() at /home/cslucano/Projects/oDesk/tr/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121 Symfony\Component\Console\Application->run() at /home/ cslucano/Projects/oDesk/tr/app/console:22

4

1 回答 1

12

我添加了

new Sonata\ClassificationBundle\SonataClassificationBundle(),

app/AppKernel.php然后它起作用了。

于 2013-10-16T20:15:25.883 回答