bump symfony to 5.4.21

adapt to the new EventDispatcher API
  - Symfony\Component\EventDispatcher => Symfony\Contracts\EventDispatcher
  - dispatch() arguments swap
  - execute() must return int
This commit is contained in:
Joe Nahmias
2023-06-01 23:06:38 -04:00
committed by Frédéric Guillot
parent bb4b547ffe
commit bd7f3d219d
42 changed files with 513 additions and 95 deletions

View File

@@ -97,7 +97,7 @@ class AuthenticationManager extends Base
{
foreach ($this->filterProviders('PreAuthenticationProviderInterface') as $provider) {
if ($provider->authenticate() && $this->userProfile->initialize($provider->getUser())) {
$this->dispatcher->dispatch(self::EVENT_SUCCESS, new AuthSuccessEvent($provider->getName()));
$this->dispatcher->dispatch(new AuthSuccessEvent($provider->getName()), self::EVENT_SUCCESS);
return true;
}
}
@@ -122,7 +122,7 @@ class AuthenticationManager extends Base
if ($provider->authenticate() && $this->userProfile->initialize($provider->getUser())) {
if ($fireEvent) {
$this->dispatcher->dispatch(self::EVENT_SUCCESS, new AuthSuccessEvent($provider->getName()));
$this->dispatcher->dispatch(new AuthSuccessEvent($provider->getName()), self::EVENT_SUCCESS);
}
return true;
@@ -130,7 +130,7 @@ class AuthenticationManager extends Base
}
if ($fireEvent) {
$this->dispatcher->dispatch(self::EVENT_FAILURE, new AuthFailureEvent($username));
$this->dispatcher->dispatch(new AuthFailureEvent($username), self::EVENT_FAILURE);
}
return false;
@@ -148,11 +148,11 @@ class AuthenticationManager extends Base
$provider = $this->getProvider($name);
if ($provider->authenticate() && $this->userProfile->initialize($provider->getUser())) {
$this->dispatcher->dispatch(self::EVENT_SUCCESS, new AuthSuccessEvent($provider->getName()));
$this->dispatcher->dispatch(new AuthSuccessEvent($provider->getName()), self::EVENT_SUCCESS);
return true;
}
$this->dispatcher->dispatch(self::EVENT_FAILURE, new AuthFailureEvent);
$this->dispatcher->dispatch(new AuthFailureEvent, self::EVENT_FAILURE);
return false;
}