RemovePersistentTokenUserClassArgumentRector
Remove deprecated user class first argument of PersistentToken constructor
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
-$token = new PersistentToken(User::class, 'john', $series, $tokenValue, new \DateTime());
+$token = new PersistentToken('john', $series, $tokenValue, new \DateTime());
Configure your rector.php:
<?php
use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony80\Rector\New_\RemovePersistentTokenUserClassArgumentRector;
return RectorConfig::configure()
->withRules([
RemovePersistentTokenUserClassArgumentRector::class,
]);
PACKAGE:
symfony/security-core >=7.4