RemoveEraseCredentialsFromAuthenticatorManagerRector

Remove unused $eraseCredentials argument from AuthenticatorManager constructor

 use Symfony\Component\Security\Http\Authentication\AuthenticatorManager;

 final class Foo
 {
     public function bar(): void
     {
         new AuthenticatorManager(
             $authenticators,
             $tokenStorage,
             $eventDispatcher,
             $firewallName,
-            true
         );
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony81\Rector\New_\RemoveEraseCredentialsFromAuthenticatorManagerRector;

return RectorConfig::configure()
    ->withRules([
        RemoveEraseCredentialsFromAuthenticatorManagerRector::class,
    ]);