ReflectionException in RegisterListenersPass.php line 101: Class does not exist Symfony 2 -
this first question, have error reflectionexception in registerlistenerspass.php line 101: class acme\examplebundle\handler\authenticationhandler.php not exist. using fosuserbundle , symfony 2.
in services.xml
<service id="login_listener" class="%vixur.login_listener.class%"> <tag name="kernel.event_subscriber"/> </service>
authenticationhandler.php:
<?php namespace acme\examplebundle\handler; use fos\userbundle\fosuserevents; use fos\userbundle\event\formevent; use symfony\component\eventdispatcher\eventsubscriberinterface; use symfony\component\httpfoundation\redirectresponse; /** * listener responsible change redirection @ end of password resetting */ class authenticationhandler implements eventsubscriberinterface { private $container; public function __construct() { } /** * {@inheritdoc} */ public static function getsubscribedevents() { return array( fosuserevents::security_implicit_login => 'onsecurityimplicitlogin', ); } public function onsecurityimplicitlogin(formevent $event) { $url = $this->router->generate('ex_homepage'); $event->setresponse(new redirectresponse($url)); } }
thanks!!
are sure namespaces right? because have try follow symfony coding standar (psr-0 , psr-4) , names of folders not rigth. has camelcase.
have check if %vixur.login_listener.class% variable has right value?
Comments
Post a Comment