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

<?php

declare (strict_types=1);
namespace RectorPrefix202411;

use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\ValueObject\AnnotationToAttribute;
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\RenameClassAndConstFetch;
use Rector\Symfony\Symfony62\Rector\Class_\MessageHandlerInterfaceToAttributeRector;
use Rector\Symfony\Symfony62\Rector\Class_\MessageSubscriberInterfaceToAttributeRector;
use Rector\Symfony\Symfony62\Rector\Class_\SecurityAttributeToIsGrantedAttributeRector;
use Rector\Symfony\Symfony62\Rector\ClassMethod\ClassMethod\ArgumentValueResolverToValueResolverRector;
use Rector\Symfony\Symfony62\Rector\ClassMethod\ParamConverterAttributeToMapEntityAttributeRector;
use Rector\Symfony\Symfony62\Rector\MethodCall\SimplifyFormRenderingRector;
return static function (RectorConfig $rectorConfig) : void {
    $rectorConfig->rules([
        SimplifyFormRenderingRector::class,
        SecurityAttributeToIsGrantedAttributeRector::class,
        ParamConverterAttributeToMapEntityAttributeRector::class,
        // @see https://github.com/symfony/symfony/pull/47068, #[AsMessageHandler] attribute
        MessageHandlerInterfaceToAttributeRector::class,
        MessageSubscriberInterfaceToAttributeRector::class,
        // @see https://github.com/symfony/symfony/pull/47363
        ArgumentValueResolverToValueResolverRector::class,
    ]);
    // change to attribute before rename
    // https://symfony.com/blog/new-in-symfony-6-2-built-in-cache-security-template-and-doctrine-attributes
    // @see https://github.com/rectorphp/rector-symfony/issues/535#issuecomment-1783983383
    $rectorConfig->ruleWithConfiguration(AnnotationToAttributeRector::class, [
        // @see https://github.com/symfony/symfony/pull/46907
        new AnnotationToAttribute('Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\IsGranted'),
        // @see https://github.com/symfony/symfony/pull/46880
        new AnnotationToAttribute('Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Cache'),
        // @see https://github.com/symfony/symfony/pull/46906
        new AnnotationToAttribute('Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Template'),
    ]);
    // https://symfony.com/blog/new-in-symfony-6-2-built-in-cache-security-template-and-doctrine-attributes
    $rectorConfig->ruleWithConfiguration(RenameClassRector::class, [
        // @see https://github.com/symfony/symfony/pull/46907
        'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\IsGranted' => 'Symfony\\Component\\Security\\Http\\Attribute\\IsGranted',
        // @see https://github.com/symfony/symfony/pull/46880
        'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Cache' => 'Symfony\\Component\\HttpKernel\\Attribute\\Cache',
        // @see https://github.com/symfony/symfony/pull/46906
        'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Template' => 'Symfony\\Bridge\\Twig\\Attribute\\Template',
        // @see https://github.com/symfony/symfony/pull/46714
        'Symfony\\Component\\Mailer\\Bridge\\OhMySmtp\\Transport\\OhMySmtpApiTransport' => 'Symfony\\Component\\Mailer\\Bridge\\MailPace\\Transport\\MailPaceApiTransport',
        'Symfony\\Component\\Mailer\\Bridge\\OhMySmtp\\Transport\\OhMySmtpSmtpTransport' => 'Symfony\\Component\\Mailer\\Bridge\\MailPace\\Transport\\MailPaceSmtpTransport',
        'Symfony\\Component\\Mailer\\Bridge\\OhMySmtp\\Transport\\OhMySmtpTransportFactory' => 'Symfony\\Component\\Mailer\\Bridge\\MailPace\\Transport\\MailPaceTransportFactory',
        // @see https://github.com/symfony/symfony/pull/47363
        'Symfony\\Component\\HttpKernel\\Controller\\ArgumentValueResolverInterface' => 'Symfony\\Component\\HttpKernel\\Controller\\ValueResolverInterface',
        // @see https://github.com/symfony/symfony/pull/46094
        'Symfony\\Component\\Security\\Core\\Security' => 'Symfony\\Bundle\\SecurityBundle\\Security',
        // @see https://github.com/symfony/symfony/pull/46161
        'Symfony\\Component\\Translation\\Extractor\\PhpAstExtractor' => 'Symfony\\Component\\Translation\\Extractor\\PhpAstExtractor',
        // @see https://github.com/symfony/symfony/pull/47595
        'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => 'Symfony\\Component\\HttpFoundation\\RequestMatcher\\ExpressionRequestMatcher',
        'Symfony\\Component\\HttpFoundation\\RequestMatcher' => 'Symfony\\Component\\HttpFoundation\\ChainRequestMatcher',
    ]);
    $rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
        // @see https://github.com/symfony/symfony/pull/46854
        new MethodCallRename('Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController', 'renderForm', 'render'),
        // @see https://github.com/symfony/symfony/pull/45034
        new MethodCallRename('Symfony\\Component\\HttpFoundation\\Request', 'getContentType', 'getContentTypeFormat'),
        // @see https://github.com/symfony/symfony/pull/47711
        new MethodCallRename('Symfony\\Component\\Mime\\Email', 'attachPart', 'addPart'),
    ]);
    // @see https://github.com/symfony/symfony/pull/46094
    // @see https://github.com/symfony/symfony/pull/48554
    $rectorConfig->ruleWithConfiguration(RenameClassConstFetchRector::class, [new RenameClassAndConstFetch('Symfony\\Component\\Security\\Core\\Security', 'ACCESS_DENIED_ERROR', 'Symfony\\Component\\Security\\Http\\SecurityRequestAttributes', 'ACCESS_DENIED_ERROR'), new RenameClassAndConstFetch('Symfony\\Component\\Security\\Core\\Security', 'AUTHENTICATION_ERROR', 'Symfony\\Component\\Security\\Http\\SecurityRequestAttributes', 'AUTHENTICATION_ERROR'), new RenameClassAndConstFetch('Symfony\\Component\\Security\\Core\\Security', 'LAST_USERNAME', 'Symfony\\Component\\Security\\Http\\SecurityRequestAttributes', 'LAST_USERNAME'), new RenameClassAndConstFetch('Symfony\\Component\\Security\\Core\\Security', 'MAX_USERNAME_LENGTH', 'Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Badge\\UserBadge', 'MAX_USERNAME_LENGTH')]);
};

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).