PHP 8.2.31
Preview: symfony53.php Size: 5.27 KB
//opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/rector/rector-symfony/config/sets/symfony/symfony53.php

<?php

declare (strict_types=1);
namespace RectorPrefix202411;

use PHPStan\Type\ObjectType;
use PHPStan\Type\StringType;
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\ClassConstFetch\RenameClassConstFetchRector;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Renaming\ValueObject\RenameClassConstFetch;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeDeclarationRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
use Rector\TypeDeclaration\ValueObject\AddParamTypeDeclaration;
use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration;
# https://github.com/symfony/symfony/blob/5.4/UPGRADE-5.3.md
return static function (RectorConfig $rectorConfig) : void {
    $rectorConfig->sets([SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES]);
    $rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
        // @see https://github.com/symfony/symfony/pull/40536
        new MethodCallRename('Symfony\\Component\\HttpFoundation\\RequestStack', 'getMasterRequest', 'getMainRequest'),
        new MethodCallRename('Symfony\\Component\\Console\\Helper\\Helper', 'strlen', 'width'),
        new MethodCallRename('Symfony\\Component\\Console\\Helper\\Helper', 'strlenWithoutDecoration', 'removeDecoration'),
        new MethodCallRename('Symfony\\Component\\HttpKernel\\Event\\KernelEvent', 'isMasterRequest', 'isMainRequest'),
        new MethodCallRename('Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface', 'getUsername', 'getUserIdentifier'),
        new MethodCallRename('Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException', 'getUsername', 'getUserIdentifier'),
        new MethodCallRename('Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException', 'setUsername', 'setUserIdentifier'),
        new MethodCallRename('Symfony\\Component\\Security\\Core\\Authentication\\RememberMe\\PersistentTokenInterface', 'getUsername', 'getUserIdentifier'),
    ]);
    $rectorConfig->ruleWithConfiguration(RenameClassRector::class, [
        'Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException' => 'Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException',
        // @see https://github.com/symfony/symfony/pull/39802
        'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface' => 'Symfony\\Component\\PasswordHasher\\Hasher\\PasswordHasherFactoryInterface',
        'Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\MessageDigestPasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\MigratingPasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\MigratingPasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\NativePasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\NativePasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface' => 'Symfony\\Component\\PasswordHasher\\PasswordHasherInterface',
        'Symfony\\Component\\Security\\Core\\Encoder\\Pbkdf2PasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\Pbkdf2PasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\PlaintextPasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\PlaintextPasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\SelfSaltingEncoderInterface' => 'Symfony\\Component\\PasswordHasher\\LegacyPasswordHasherInterface',
        'Symfony\\Component\\Security\\Core\\Encoder\\SodiumPasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\SodiumPasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoder' => 'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasher',
        'Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface' => 'Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface',
    ]);
    $rectorConfig->ruleWithConfiguration(AddReturnTypeDeclarationRector::class, [new AddReturnTypeDeclaration('Symfony\\Component\\Mailer\\Transport\\AbstractTransportFactory', 'getEndpoint', new StringType())]);
    // rename constant
    $rectorConfig->ruleWithConfiguration(RenameClassConstFetchRector::class, [
        // @see https://github.com/symfony/symfony/pull/40536
        new RenameClassConstFetch('Symfony\\Component\\HttpKernel\\HttpKernelInterface', 'MASTER_REQUEST', 'MAIN_REQUEST'),
    ]);
    $rectorConfig->ruleWithConfiguration(AddParamTypeDeclarationRector::class, [
        // @see https://github.com/symfony/symfony/commit/ce77be2507631cd12e4ca37510dab37f4c2b759a
        new AddParamTypeDeclaration('Symfony\\Component\\Form\\DataMapperInterface', 'mapFormsToData', 0, new ObjectType(\Traversable::class)),
        // @see https://github.com/symfony/symfony/commit/ce77be2507631cd12e4ca37510dab37f4c2b759a
        new AddParamTypeDeclaration('Symfony\\Component\\Form\\DataMapperInterface', 'mapDataToForms', 1, new ObjectType(\Traversable::class)),
    ]);
    $rectorConfig->rules([KernelTestCaseContainerPropertyDeprecationRector::class]);
};

Directory Contents

Dirs: 1 × Files: 32

Name Size Perms Modified Actions
symfony6 DIR
- drwxr-xr-x 2024-11-08 13:59:10
Edit Download
1.08 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
811 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.57 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
571 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
448 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
285 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1022 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.53 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
11.29 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.19 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
458 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.78 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.02 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1018 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.71 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
5.72 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
6.65 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.84 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
11.80 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
875 B lrw-r--r-- 2024-11-08 13:59:10
Edit Download
5.38 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
5.88 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
6.18 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
5.27 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
3.80 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.66 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.61 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
6.12 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.99 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.33 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
2.17 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download
1.01 KB lrw-r--r-- 2024-11-08 13:59:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).