Quantcast

Circular dependancy with Url plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Circular dependancy with Url plugin

pulpfree
After updating zf2 recently I ran into an error when using the url
plugin in my controller:
Fatal error: Uncaught exception
'Zend\ServiceManager\Exception\CircularDependencyFoundException' with
message 'Circular dependency for LazyServiceLoader was found for
instance url

I resolved the problem by using the long version:
$router = $this->getEvent()->getRouter();
$url    = $router->assemble($params, array('name' => 'route-name'));
instead of :
$url = $this->url()->fromRoute('route-name', $params);

Should I submit as bug?

--
=======================
Ron Dyck
Webbtech
www.webbtech.net
twitter.com/pulpfree
========================
Loading...