<?php

declare (strict_types=1);
namespace RectorPrefix202607;

use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\ClassConstFetch\RenameClassConstFetchRector;
use Rector\Renaming\ValueObject\RenameClassAndConstFetch;
use Rector\Renaming\ValueObject\RenameClassConstFetch;
return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->ruleWithConfiguration(RenameClassConstFetchRector::class, [
        new RenameClassAndConstFetch('Symfony\Component\Security\Core\AuthenticationEvents', 'AUTHENTICATION_SUCCESS', 'Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent', 'class'),
        new RenameClassAndConstFetch('Symfony\Component\Security\Core\AuthenticationEvents', 'AUTHENTICATION_FAILURE', 'Symfony\Component\Security\Core\Event\AuthenticationFailureEvent', 'class'),
        // @see https://github.com/symfony/symfony/pull/42510
        new RenameClassConstFetch('Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter', 'IS_ANONYMOUS', 'PUBLIC_ACCESS'),
        new RenameClassConstFetch('Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter', 'IS_AUTHENTICATED_ANONYMOUSLY', 'PUBLIC_ACCESS'),
    ]);
};
