我使用AvalancheImagine包生成缩略图时出现此错误:
Unable to find controller "imagine.controller:filter".
500 Internal Server Error - InvalidArgumentException
捆绑包已在AppKernel.php
中注册。路由和配置yml文件已更新,但在开发环境中加载资产的URL时仍然出现此错误。
开发模式下的以下输出:
protected function createController($controller)
{
if (false === strpos($controller, '::')) {
throw new \InvalidArgumentException(sprintf('Unable to find controller "%s".', $controller));
}
list($class, $method) = explode('::', $controller, 2);
at ControllerResolver ->createController ('imagine.controller:filter')
in E:\workspace\***\app\cache\dev\classes.php at line 5297 -+
at ControllerResolver ->getController (object(Request))
in E:\workspace\***\src\Inhouse\MainBundle\Event\BeforeControllerActionListener.php at line 32 -+
我的composer.json
:
"avalanche123/imagine-bundle": "dev-master",
答案 0 :(得分:0)
您使用自己的控制器吗?
如果是这样,你应该:
parameters:
imagine.controller.class: Company\AnyBundle\Controller\ImagineController
也许你忘记了.class
?