]> Raphaël G. Git Repositories - userbundle/commitdiff
Version 0.5.8 master 0.5.8
authorRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 12:53:57 +0000 (14:53 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 12:53:57 +0000 (14:53 +0200)
Checker/UserChecker.php
Controller/UserController.php
Fixture/UserFixture.php
RapsysUserBundle.php

index dc1e531046993e3bfad695122aa0dc612b782b5b..51b6fa98d7734a37c0811ccda899d9a555764047 100644 (file)
@@ -14,8 +14,9 @@ namespace Rapsys\UserBundle\Checker;
 use Rapsys\UserBundle\Entity\User;
 use Rapsys\UserBundle\Exception\UnactivatedException;
 
-use Symfony\Component\Security\Core\User\InMemoryUserChecker;
+use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
 use Symfony\Component\Security\Core\Exception\DisabledException;
+use Symfony\Component\Security\Core\User\InMemoryUserChecker;
 use Symfony\Component\Security\Core\User\UserInterface;
 
 /**
@@ -25,7 +26,7 @@ class UserChecker extends InMemoryUserChecker {
        /**
         * {@inheritdoc}
         */
-       public function checkPostAuth(UserInterface $user): void {
+       public function checkPostAuth(UserInterface $user, ?TokenInterface $token = null): void {
                //Without User instance
                if (!$user instanceof User) {
                        return;
index 22ce0f8052f5d9166f057379237fdd4bcdf7971a..15da1946475be832e08f351a188cba350dfa5358 100644 (file)
@@ -20,6 +20,7 @@ use Symfony\Component\Form\FormError;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
+use Symfony\Component\HttpKernel\Exception\GoneHttpException;
 use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
 use Symfony\Component\Mime\Address;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
@@ -387,7 +388,7 @@ class UserController extends AbstractController {
                        if ($pass != $this->slugger->hash($user->getPassword())) {
                                //Throw not found
                                //XXX: prevent use of outdated recover link
-                               throw $this->createNotFoundException($this->translator->trans('Outdated recover link', [], $this->alias));
+                               throw new GoneHttpException($this->translator->trans('Outdated recover link', [], $this->alias));
                        }
 
                        //Set context
index 2437a8d6f9ef41e7384469f64961fd2d4567447b..bb30b0df7c556c84f772329f7b9348a0e53f090a 100644 (file)
@@ -39,7 +39,7 @@ class UserFixture extends Fixture {
        /**
         * {@inheritDoc}
         */
-       public function load(ObjectManager $manager) {
+       public function load(ObjectManager $manager): void {
                //Civility tree
                $civilityTree = [
                        'Mister',
index 9053b79afefbdd29f60b471c92d009e6d3c991ff..366068bce8a529ced079ae6d2d358bb28165af69 100644 (file)
@@ -11,8 +11,6 @@
 
 namespace Rapsys\UserBundle;
 
-use Rapsys\UserBundle\DependencyInjection\RapsysUserExtension;
-
 use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
 use Symfony\Component\HttpKernel\Bundle\Bundle;
 
@@ -64,6 +62,6 @@ class RapsysUserBundle extends Bundle {
         */
        public static function getVersion(): string {
                //Return version
-               return '0.5.4';
+               return '0.5.8';
        }
 }