[Symfony] Split Symfony rules to dedicated namespaces (#4858)

This commit is contained in:
Krystian Marcisz 2020-12-11 23:51:20 +01:00 committed by GitHub
parent d27997197b
commit 35ceeff106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
180 changed files with 476 additions and 404 deletions

View File

@ -153,6 +153,10 @@
"Rector\\SymfonyPHPUnit\\": "rules/symfony-phpunit/src",
"Rector\\SymfonyPhpConfig\\": "rules/symfony-php-config/src",
"Rector\\Symfony\\": "rules/symfony/src",
"Rector\\Symfony2\\": "rules/symfony2/src",
"Rector\\Symfony3\\": "rules/symfony3/src",
"Rector\\Symfony4\\": "rules/symfony4/src",
"Rector\\Symfony5\\": "rules/symfony5/src",
"Rector\\Transform\\": "rules/transform/src",
"Rector\\Twig\\": "rules/twig/src",
"Rector\\TypeDeclaration\\": "rules/type-declaration/src",
@ -169,7 +173,7 @@
"rules/cakephp/tests/Rector/Namespace_/AppUsesStaticCallToUseStatementRector/Source",
"rules/psr4/tests/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector/Source",
"rules/renaming/tests/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector/Source",
"rules/symfony/tests/Rector/MethodCall/ContainerGetToConstructorInjectionRector/Source",
"rules/symfony4/tests/Rector/MethodCall/ContainerGetToConstructorInjectionRector/Source",
"tests/Source"
],
"files": [
@ -270,6 +274,10 @@
"Rector\\SymfonyPHPUnit\\Tests\\": "rules/symfony-phpunit/tests",
"Rector\\SymfonyPhpConfig\\Tests\\": "rules/symfony-php-config/tests",
"Rector\\Symfony\\Tests\\": "rules/symfony/tests",
"Rector\\Symfony2\\Tests\\": "rules/symfony2/tests",
"Rector\\Symfony3\\Tests\\": "rules/symfony3/tests",
"Rector\\Symfony4\\Tests\\": "rules/symfony4/tests",
"Rector\\Symfony5\\Tests\\": "rules/symfony5/tests",
"Rector\\Transform\\Tests\\": "rules/transform/tests",
"Rector\\Twig\\Tests\\": "rules/twig/tests",
"Rector\\TypeDeclaration\\Tests\\": "rules/type-declaration/tests",

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
use Rector\Symfony\Rector\MethodCall\ContainerGetToConstructorInjectionRector;
use Rector\Symfony4\Rector\MethodCall\ContainerGetToConstructorInjectionRector;
use Rector\Symfony\Rector\MethodCall\GetParameterToConstructorInjectionRector;
use Rector\Symfony\Rector\MethodCall\GetToConstructorInjectionRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

View File

@ -2,8 +2,8 @@
declare(strict_types=1);
use Rector\Symfony\Rector\MethodCall\AddFlashRector;
use Rector\Symfony\Rector\MethodCall\RedirectToRouteRector;
use Rector\Symfony2\Rector\MethodCall\AddFlashRector;
use Rector\Symfony2\Rector\MethodCall\RedirectToRouteRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {

View File

@ -4,7 +4,7 @@ declare(strict_types=1);
use Rector\Generic\Rector\ClassMethod\ArgumentDefaultValueReplacerRector;
use Rector\Generic\ValueObject\ArgumentDefaultValueReplacer;
use Rector\Symfony\Rector\StaticCall\ParseFileRector;
use Rector\Symfony2\Rector\StaticCall\ParseFileRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;

View File

@ -8,16 +8,16 @@ use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Renaming\ValueObject\RenameClassConstant;
use Rector\Symfony\Rector\ClassMethod\FormTypeGetParentRector;
use Rector\Symfony\Rector\ClassMethod\GetRequestRector;
use Rector\Symfony\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
use Rector\Symfony\Rector\MethodCall\CascadeValidationFormBuilderRector;
use Rector\Symfony\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector;
use Rector\Symfony\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector;
use Rector\Symfony\Rector\MethodCall\FormTypeInstanceToClassConstRector;
use Rector\Symfony\Rector\MethodCall\OptionNameRector;
use Rector\Symfony\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Rector\Symfony\Rector\MethodCall\StringFormTypeToClassRector;
use Rector\Symfony3\Rector\ClassMethod\FormTypeGetParentRector;
use Rector\Symfony3\Rector\ClassMethod\GetRequestRector;
use Rector\Symfony3\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
use Rector\Symfony3\Rector\MethodCall\CascadeValidationFormBuilderRector;
use Rector\Symfony3\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector;
use Rector\Symfony3\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector;
use Rector\Symfony3\Rector\MethodCall\FormTypeInstanceToClassConstRector;
use Rector\Symfony3\Rector\MethodCall\OptionNameRector;
use Rector\Symfony3\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Rector\Symfony3\Rector\MethodCall\StringFormTypeToClassRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;

View File

@ -7,7 +7,7 @@ use Rector\Generic\ValueObject\ArgumentAdder;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Symfony\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector;
use Rector\Symfony3\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;

View File

@ -4,7 +4,7 @@ declare(strict_types=1);
use Rector\Generic\Rector\ClassMethod\ArgumentRemoverRector;
use Rector\Generic\ValueObject\ArgumentRemover;
use Rector\Symfony\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
use Rector\Symfony3\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;

View File

@ -3,12 +3,12 @@
declare(strict_types=1);
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Symfony\Rector\ConstFetch\ConstraintUrlOptionRector;
use Rector\Symfony\Rector\MethodCall\ContainerBuilderCompileEnvArgumentRector;
use Rector\Symfony\Rector\MethodCall\FormIsValidRector;
use Rector\Symfony\Rector\MethodCall\ProcessBuilderGetProcessRector;
use Rector\Symfony\Rector\MethodCall\VarDumperTestTraitMethodArgsRector;
use Rector\Symfony\Rector\StaticCall\ProcessBuilderInstanceRector;
use Rector\Symfony4\Rector\ConstFetch\ConstraintUrlOptionRector;
use Rector\Symfony4\Rector\MethodCall\ContainerBuilderCompileEnvArgumentRector;
use Rector\Symfony4\Rector\MethodCall\FormIsValidRector;
use Rector\Symfony4\Rector\MethodCall\ProcessBuilderGetProcessRector;
use Rector\Symfony4\Rector\MethodCall\VarDumperTestTraitMethodArgsRector;
use Rector\Symfony4\Rector\StaticCall\ProcessBuilderInstanceRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {

View File

@ -18,9 +18,9 @@ use Rector\Generic\ValueObject\WrapReturn;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Symfony\Rector\MethodCall\ContainerGetToConstructorInjectionRector;
use Rector\Symfony\Rector\New_\RootNodeTreeBuilderRector;
use Rector\Symfony\Rector\New_\StringToArrayArgumentProcessRector;
use Rector\Symfony4\Rector\MethodCall\ContainerGetToConstructorInjectionRector;
use Rector\Symfony4\Rector\New_\RootNodeTreeBuilderRector;
use Rector\Symfony4\Rector\New_\StringToArrayArgumentProcessRector;
use Rector\Transform\Rector\New_\NewToStaticCallRector;
use Rector\Transform\ValueObject\NewToStaticCall;
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;

View File

@ -9,8 +9,8 @@ use Rector\Generic\ValueObject\ArgumentAdder;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Symfony\Rector\MethodCall\MakeDispatchFirstArgumentEventRector;
use Rector\Symfony\Rector\MethodCall\SimplifyWebTestCaseAssertionsRector;
use Rector\Symfony4\Rector\MethodCall\MakeDispatchFirstArgumentEventRector;
use Rector\Symfony4\Rector\MethodCall\SimplifyWebTestCaseAssertionsRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
use Rector\Symfony\Rector\ClassMethod\ConsoleExecuteReturnIntRector;
use Rector\Symfony4\Rector\ClassMethod\ConsoleExecuteReturnIntRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
# https://github.com/symfony/symfony/blob/4.4/UPGRADE-4.4.md

View File

@ -6,7 +6,7 @@ use Rector\Renaming\Rector\ClassConstFetch\RenameClassConstantRector;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Renaming\ValueObject\RenameClassConstant;
use Rector\Symfony\Rector\StaticCall\BinaryFileResponseCreateToNewInstanceRector;
use Rector\Symfony5\Rector\StaticCall\BinaryFileResponseCreateToNewInstanceRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;

View File

@ -1,7 +0,0 @@
parameters:
kernel_class: 'Rector\Symfony\Tests\Rector\MethodCall\AbstractToConstructorInjectionRectorSource\SomeKernelClass'
services:
Rector\Symfony\Rector\FrameworkBundle\ContainerGetToConstructorInjectionRector:
$containerAwareParentTypes:
- 'Rector\Symfony\Tests\Rector\MethodCall\ContainerGetToConstructorInjectionRector\Source\ContainerAwareParentClass'

View File

@ -1,33 +0,0 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\SomeFormType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class SomeController extends Controller
{
public function action()
{
$form = $this->createForm(new SomeFormType());
}
}
?>
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\SomeFormType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class SomeController extends Controller
{
public function action()
{
$form = $this->createForm(\Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\SomeFormType::class);
}
}
?>

View File

@ -1,10 +0,0 @@
<?php
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source;
final class TagType
{
}

View File

@ -1,10 +0,0 @@
<?php
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector\Source;
abstract class AbstractType
{
}

View File

@ -1,10 +0,0 @@
<?php
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\SimplifyWebTestCaseAssertionsRector\Source;
class FixtureWebTestCase
{
}

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony2\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\MethodCall\AddFlashRector\AddFlashRectorTest
* @see \Rector\Symfony2\Tests\Rector\MethodCall\AddFlashRector\AddFlashRectorTest
*/
final class AddFlashRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony2\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
@ -13,7 +13,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\RedirectToRouteRectorTest
* @see \Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\RedirectToRouteRectorTest
*/
final class RedirectToRouteRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\StaticCall;
namespace Rector\Symfony2\Rector\StaticCall;
use Nette\Utils\Strings;
use PhpParser\Node;
@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\StaticCall\ParseFileRector\ParseFileRectorTest
* @see \Rector\Symfony2\Tests\Rector\StaticCall\ParseFileRector\ParseFileRectorTest
*/
final class ParseFileRector extends AbstractRector
{

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\AddFlashRector;
namespace Rector\Symfony2\Tests\Rector\MethodCall\AddFlashRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\AddFlashRector;
use Rector\Symfony2\Rector\MethodCall\AddFlashRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\AddFlashRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\AddFlashRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
@ -17,7 +17,7 @@ class AppController extends Controller
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\AddFlashRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\AddFlashRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\AddFlashRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\AddFlashRector\Fixture;
use Symfony\Component\HttpFoundation\Request;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
@ -16,7 +16,7 @@ class AppController extends Controller
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
@ -16,7 +16,7 @@ class AppController2 extends Controller
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
@ -16,7 +16,7 @@ class AppController3 extends Controller
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\RedirectToRouteRector;
namespace Rector\Symfony2\Tests\Rector\MethodCall\RedirectToRouteRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\RedirectToRouteRector;
use Rector\Symfony2\Rector\MethodCall\RedirectToRouteRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\StaticCall\ParseFileRector;
namespace Rector\Symfony2\Tests\Rector\StaticCall\ParseFileRector;
use Iterator;
use Rector\Symfony\Rector\StaticCall\ParseFileRector;
use Rector\Symfony2\Rector\StaticCall\ParseFileRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set('symfony_container_xml_path', '');
$services = $containerConfigurator->services();
$services->defaults()
->public()
->autowire()
->autoconfigure();
$services->load('Rector\Symfony3\\', __DIR__ . '/../src')
->exclude([__DIR__ . '/../src/Rector', __DIR__ . '/../src/Exception', __DIR__ . '/../src/ValueObject']);
};

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\FormHelper;
namespace Rector\Symfony3\FormHelper;
use Nette\Utils\Strings;
use Rector\Symfony\ServiceMapProvider;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\NodeFactory;
namespace Rector\Symfony3\NodeFactory;
use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\NodeFactory;
namespace Rector\Symfony3\NodeFactory;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\Array_;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\ClassConstFetch;
namespace Rector\Symfony3\Rector\ClassConstFetch;
use PhpParser\Node;
use PhpParser\Node\Expr\ClassConstFetch;
@ -16,7 +16,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
* - https://github.com/symfony/symfony/pull/22441/files
* - https://github.com/symfony/symfony/blob/master/UPGRADE-3.3.md#console
*
* @see \Rector\Symfony\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector\ConsoleExceptionToErrorEventConstantRectorTest
* @see \Rector\Symfony3\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector\ConsoleExceptionToErrorEventConstantRectorTest
*/
final class ConsoleExceptionToErrorEventConstantRector extends AbstractRector
{

View File

@ -2,19 +2,19 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\ClassMethod;
namespace Rector\Symfony3\Rector\ClassMethod;
use PhpParser\Node;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\Rector\AbstractRector;
use Rector\Symfony\FormHelper\FormTypeStringToTypeProvider;
use Rector\Symfony3\FormHelper\FormTypeStringToTypeProvider;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\ClassMethod\FormTypeGetParentRector\FormTypeGetParentRectorTest
* @see \Rector\Symfony3\Tests\Rector\ClassMethod\FormTypeGetParentRector\FormTypeGetParentRectorTest
*/
final class FormTypeGetParentRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\ClassMethod;
namespace Rector\Symfony3\Rector\ClassMethod;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\GetRequestRectorTest
* @see \Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\GetRequestRectorTest
*/
final class GetRequestRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\ClassMethod;
namespace Rector\Symfony3\Rector\ClassMethod;
use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod;
@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
* @see https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html#method-annotation
* @see https://stackoverflow.com/questions/51171934/how-to-fix-symfony-3-4-route-and-method-deprecation
*
* @see \Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\MergeMethodAnnotationToRouteAnnotationRectorTest
* @see \Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\MergeMethodAnnotationToRouteAnnotationRectorTest
*/
final class MergeMethodAnnotationToRouteAnnotationRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\ClassMethod;
namespace Rector\Symfony3\Rector\ClassMethod;
use Nette\Utils\Strings;
use PhpParser\Node;
@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://github.com/symfony/symfony/blob/3.4/UPGRADE-3.0.md#form
*
* @see \Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\RemoveDefaultGetBlockPrefixRectorTest
* @see \Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\RemoveDefaultGetBlockPrefixRectorTest
*/
final class RemoveDefaultGetBlockPrefixRector extends AbstractRector
{

View File

@ -2,13 +2,13 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\MethodCall;
use Rector\Core\Rector\AbstractRector;
use Rector\Symfony\FormHelper\FormTypeStringToTypeProvider;
use Rector\Symfony3\FormHelper\FormTypeStringToTypeProvider;
abstract class AbstractFormAddRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Arg;
@ -20,7 +20,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://gist.github.com/mickaelandrieu/5d27a2ffafcbdd64912f549aaf2a6df9#stuck-with-forms
* @see \Rector\Symfony\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector\CascadeValidationFormBuilderRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector\CascadeValidationFormBuilderRectorTest
*/
final class CascadeValidationFormBuilderRector extends AbstractRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
@ -14,7 +14,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form
*
* @see \Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRectorTest
*/
final class ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector extends AbstractFormAddRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
@ -15,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
* @see https://symfony.com/doc/3.0/form/form_collections.html
* @see https://symfony2-document.readthedocs.io/en/latest/reference/forms/types/collection.html#type
*
* @see \Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRectorTest
*/
final class ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector extends AbstractFormAddRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Arg;
@ -16,8 +16,8 @@ use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use Rector\Core\ValueObject\MethodName;
use Rector\Symfony\NodeFactory\BuilderFormNodeFactory;
use Rector\Symfony\NodeFactory\ConfigureOptionsNodeFactory;
use Rector\Symfony3\NodeFactory\BuilderFormNodeFactory;
use Rector\Symfony3\NodeFactory\ConfigureOptionsNodeFactory;
use ReflectionClass;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -30,7 +30,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
* @see http://www.keganv.com/passing-arguments-controller-file-type-symfony-3/
* @see https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form
*
* @see \Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\FormTypeInstanceToClassConstRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\FormTypeInstanceToClassConstRectorTest
*/
final class FormTypeInstanceToClassConstRector extends AbstractFormAddRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
@ -11,7 +11,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector\OptionNameRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector\OptionNameRectorTest
*/
final class OptionNameRector extends AbstractFormAddRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
@ -13,7 +13,7 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\Symfony\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector\ReadOnlyOptionToAttributeRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector\ReadOnlyOptionToAttributeRectorTest
*/
final class ReadOnlyOptionToAttributeRector extends AbstractFormAddRector
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Rector\MethodCall;
namespace Rector\Symfony3\Rector\MethodCall;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
@ -13,7 +13,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* Covers https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form
*
* @see \Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector\StringFormTypeToClassRectorTest
* @see \Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector\StringFormTypeToClassRectorTest
*/
final class StringFormTypeToClassRector extends AbstractFormAddRector
{

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector;
namespace Rector\Symfony3\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector;
use Iterator;
use Rector\Symfony\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector;
use Rector\Symfony3\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector\Fixture;
final class SomeSubscriber
{
@ -17,7 +17,7 @@ final class SomeSubscriber
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector\Fixture;
final class SomeSubscriber
{

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
use Symfony\Component\Form\AbstractType;
@ -21,7 +21,7 @@ class PermissionCollectionType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
use Symfony\Component\Form\AbstractType;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
use Symfony\Component\Form\AbstractTypeExtension;
@ -16,7 +16,7 @@ class TypeExtension extends AbstractTypeExtension
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\FormTypeGetParentRector\Fixture;
use Symfony\Component\Form\AbstractTypeExtension;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\FormTypeGetParentRector;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\FormTypeGetParentRector;
use Iterator;
use Rector\Symfony\Rector\ClassMethod\FormTypeGetParentRector;
use Rector\Symfony3\Rector\ClassMethod\FormTypeGetParentRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,8 +1,8 @@
<?php declare (strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\SymfonyController;
use Rector\Symfony3\Tests\Rector\Source\SymfonyController;
class ClassWithNamedService extends SymfonyController
{
@ -16,9 +16,9 @@ class ClassWithNamedService extends SymfonyController
-----
<?php declare (strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\SymfonyController;
use Rector\Symfony3\Tests\Rector\Source\SymfonyController;
class ClassWithNamedService extends SymfonyController
{

View File

@ -1,8 +1,8 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\SymfonyController;
use Rector\Symfony3\Tests\Rector\Source\SymfonyController;
use Symfony\TestCase\Request;
class ClassWithParameterPresent extends SymfonyController
@ -17,9 +17,9 @@ class ClassWithParameterPresent extends SymfonyController
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\SymfonyController;
use Rector\Symfony3\Tests\Rector\Source\SymfonyController;
use Symfony\TestCase\Request;
class ClassWithParameterPresent extends SymfonyController

View File

@ -1,8 +1,8 @@
<?php
namespace Rector\Symfony\Tests\Rector\Controller\AddFlashRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\Controller\AddFlashRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\SymfonyController;
use Rector\Symfony3\Tests\Rector\Source\SymfonyController;
use Symfony\Component\HttpFoundation\Request;
use App\Entity\Captcha;
use App\Form\CaptchaType;

View File

@ -1,8 +1,8 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\AbstractSymfonyController;
use Rector\Symfony3\Tests\Rector\Source\AbstractSymfonyController;
class SomeController extends AbstractSymfonyController
{
@ -16,9 +16,9 @@ class SomeController extends AbstractSymfonyController
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Rector\Symfony\Tests\Rector\Source\AbstractSymfonyController;
use Rector\Symfony3\Tests\Rector\Source\AbstractSymfonyController;
class SomeController extends AbstractSymfonyController
{

View File

@ -1,6 +1,6 @@
<?php declare (strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector\Fixture;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\GetRequestRector;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\GetRequestRector;
use Iterator;
use Rector\Symfony\Rector\ClassMethod\GetRequestRector;
use Rector\Symfony3\Rector\ClassMethod\GetRequestRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\Routing\Annotation\Route;
@ -20,7 +20,7 @@ class DefaultController
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Component\Routing\Annotation\Route;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
@ -22,7 +22,7 @@ class ClassWithTemplateAnnotationController
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
@ -22,7 +22,7 @@ class ClassWithTemplateAnnotation2Controller
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
use Iterator;
use Rector\Symfony\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
use Rector\Symfony3\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
use Symfony\Component\Form\AbstractType;
@ -16,7 +16,7 @@ class DoubleNameType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
use Symfony\Component\Form\AbstractType;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
use Symfony\Component\Form\AbstractType;
@ -16,7 +16,7 @@ class TaskType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
use Symfony\Component\Form\AbstractType;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector\Fixture;
use Symfony\Component\Form\AbstractType;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
namespace Rector\Symfony3\Tests\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
use Iterator;
use Rector\Symfony\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
use Rector\Symfony3\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\CascadeValidationFormBuilderRector;
use Rector\Symfony3\Rector\MethodCall\CascadeValidationFormBuilderRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector\Fixture;
class SomeController
{
@ -28,7 +28,7 @@ class SomeController
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\CascadeValidationFormBuilderRector\Fixture;
class SomeController
{

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector;
use Rector\Symfony3\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -21,7 +21,7 @@ class EntryOptionType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -21,7 +21,7 @@ class TaskType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector;
use Rector\Symfony3\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -24,7 +24,7 @@ class TaskType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector\Fixture;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

View File

@ -0,0 +1,33 @@
<?php
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\SomeFormType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class SomeController extends Controller
{
public function action()
{
$form = $this->createForm(new SomeFormType());
}
}
?>
-----
<?php
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\SomeFormType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class SomeController extends Controller
{
public function action()
{
$form = $this->createForm(\Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\SomeFormType::class);
}
}
?>

View File

@ -1,8 +1,8 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\TagType;
use Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\TagType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -20,9 +20,9 @@ class TaskType extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\TagType;
use Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\TagType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
@ -31,7 +31,7 @@ class TaskType extends AbstractType
public function buildForm(FormBuilderInterface $formBuilder, array $options)
{
$formBuilder->add('tags', 'collection', [
'entry_type' => \Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\TagType::class
'entry_type' => \Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\TagType::class
]);
}
}

View File

@ -1,8 +1,8 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\AnotherFormTypeClass;
use Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\AnotherFormTypeClass;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilder;
@ -22,9 +22,9 @@ class SomeAnotherController extends Controller
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\AnotherFormTypeClass;
use Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\AnotherFormTypeClass;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilder;
@ -33,10 +33,10 @@ class SomeAnotherController extends Controller
{
public function action(FormBuilder $builder)
{
$builder->add('someText', \Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture\SomeClass::class);
$builder->add('someText', \Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture\SomeClass::class);
$form = new TextType();
$form->add('text', \Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\AnotherFormTypeClass::class);
$form->add('text', \Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source\AnotherFormTypeClass::class);
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\FormBuilder;
@ -30,7 +30,7 @@ class SomeTypeWithCtor
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\FormBuilder;
@ -39,7 +39,7 @@ class SomeAnotherControllerWithArgs extends Controller
{
public function action(FormBuilder $builder)
{
$builder->add('someText', \Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture\SomeTypeWithCtor::class, ['number' => 1]);
$builder->add('someText', \Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Fixture\SomeTypeWithCtor::class, ['number' => 1]);
}
}

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\FormTypeInstanceToClassConstRector;
use Rector\Symfony3\Rector\MethodCall\FormTypeInstanceToClassConstRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source;
use Symfony\Component\Form\FormTypeInterface;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source;
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source;
use Symfony\Component\Form\FormTypeInterface;

View File

@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Rector\Symfony3\Tests\Rector\MethodCall\FormTypeInstanceToClassConstRector\Source;
final class TagType
{
}

View File

@ -1,8 +1,8 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector\Source\AbstractType;
use Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector\Source\AbstractType;
use Symfony\Component\Form\FormBuilder;
class RegistrationFormType2 extends AbstractType
@ -20,9 +20,9 @@ class RegistrationFormType2 extends AbstractType
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector\Fixture;
use Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector\Source\AbstractType;
use Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector\Source\AbstractType;
use Symfony\Component\Form\FormBuilder;
class RegistrationFormType2 extends AbstractType

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\OptionNameRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\OptionNameRector;
use Rector\Symfony3\Rector\MethodCall\OptionNameRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -0,0 +1,10 @@
<?php
declare(strict_types=1);
namespace Rector\Symfony3\Tests\Rector\MethodCall\OptionNameRector\Source;
abstract class AbstractType
{
}

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Symfony\Component\Form\FormBuilder;
@ -16,7 +16,7 @@ class ReadOnlyOptionToAttribute
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Symfony\Component\Form\FormBuilder;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Symfony\Component\Form\FormBuilder;
@ -16,7 +16,7 @@ class ReadOnlyOptionToAttribute2
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Symfony\Component\Form\FormBuilder;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Rector\Symfony3\Rector\MethodCall\ReadOnlyOptionToAttributeRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
use Symfony\Component\Form\FormBuilder;
@ -17,7 +17,7 @@ final class SomePresenter
-----
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
use Symfony\Component\Form\FormBuilder;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\FormBuilder;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
namespace Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector\Fixture;
use Symfony\Component\Form\FormBuilder;

View File

@ -1,6 +1,6 @@
<?php
namespace Rector\Symfony\Tests\Rector\Form\StringFormTypeToClassRector\FixtureWithContainer;
namespace Rector\Symfony3\Tests\Rector\Form\StringFormTypeToClassRector\FixtureWithContainer;
use Symfony\Component\Form\FormBuilder;
@ -17,7 +17,7 @@ final class SomePresenter
-----
<?php
namespace Rector\Symfony\Tests\Rector\Form\StringFormTypeToClassRector\FixtureWithContainer;
namespace Rector\Symfony3\Tests\Rector\Form\StringFormTypeToClassRector\FixtureWithContainer;
use Symfony\Component\Form\FormBuilder;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector;
use Iterator;
use Rector\Symfony\Rector\MethodCall\StringFormTypeToClassRector;
use Rector\Symfony3\Rector\MethodCall\StringFormTypeToClassRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

View File

@ -2,11 +2,11 @@
declare(strict_types=1);
namespace Rector\Symfony\Tests\Rector\MethodCall\StringFormTypeToClassRector;
namespace Rector\Symfony3\Tests\Rector\MethodCall\StringFormTypeToClassRector;
use Iterator;
use Rector\Core\Configuration\Option;
use Rector\Symfony\Rector\MethodCall\StringFormTypeToClassRector;
use Rector\Symfony3\Rector\MethodCall\StringFormTypeToClassRector;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Symplify\SmartFileSystem\SmartFileInfo;

Some files were not shown because too many files have changed in this diff Show More