move Symfony Rector to own package

This commit is contained in:
Tomas Votruba 2018-06-01 15:51:34 +02:00
parent f4608e63f2
commit 7e9bfa3ed3
144 changed files with 177 additions and 176 deletions

View File

@ -45,7 +45,8 @@
"Rector\\BetterReflection\\Tests\\": "packages/BetterReflection/tests",
"Rector\\BetterPhpDocParser\\Tests\\": "packages/BetterPhpDocParser/tests",
"Rector\\NodeTypeResolver\\Tests\\": "packages/NodeTypeResolver/tests",
"Rector\\NodeTraverserQueue\\Tests\\": "packages/NodeTraverserQueue/tests"
"Rector\\NodeTraverserQueue\\Tests\\": "packages/NodeTraverserQueue/tests",
"Rector\\Symfony\\Tests\\": "packages/Symfony/tests"
},
"classmap": [
"tests/Rector/Contrib/Nette/Utils"

View File

@ -1,4 +1,4 @@
services:
Rector\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector: ~
Rector\Rector\Contrib\Symfony\FrameworkBundle\GetParameterToConstructorInjectionRector: ~
Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector: ~
Rector\Symfony\Rector\FrameworkBundle\ContainerGetToConstructorInjectionRector: ~
Rector\Symfony\Rector\FrameworkBundle\GetParameterToConstructorInjectionRector: ~
Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector: ~

View File

@ -1,3 +1,3 @@
services:
Rector\Rector\Contrib\Symfony\Controller\RedirectToRouteRector: ~
Rector\Rector\Contrib\Symfony\Controller\AddFlashRector: ~
Rector\Symfony\Rector\Controller\RedirectToRouteRector: ~
Rector\Symfony\Rector\Controller\AddFlashRector: ~

View File

@ -2,9 +2,9 @@
# - https://github.com/symfony/symfony/blob/master/UPGRADE-3.0.md
services:
Rector\Rector\Contrib\Symfony\HttpKernel\GetRequestRector: ~
Rector\Rector\Contrib\Symfony\Form\FormTypeGetParentRector: ~
Rector\Rector\Contrib\Symfony\Form\OptionNameRector: ~
Rector\Symfony\Rector\HttpKernel\GetRequestRector: ~
Rector\Symfony\Rector\Form\FormTypeGetParentRector: ~
Rector\Symfony\Rector\Form\OptionNameRector: ~
# dynamic

View File

@ -19,7 +19,7 @@ services:
position: 6
default_value: false
Rector\Rector\Contrib\Symfony\Console\ConsoleExceptionToErrorEventConstantRector: ~
Rector\Symfony\Rector\Console\ConsoleExceptionToErrorEventConstantRector: ~
Rector\Rector\Dynamic\ClassReplacerRector:
$oldToNewClasses:

View File

@ -1,12 +1,12 @@
services:
Rector\Rector\Contrib\Symfony\Validator\ConstraintUrlOptionRector: ~
Rector\Rector\Contrib\Symfony\Form\FormIsValidRector: ~
Rector\Rector\Contrib\Symfony\Form\StringFormTypeToClassRector: ~
Rector\Rector\Contrib\Symfony\VarDumper\VarDumperTestTraitMethodArgsRector: ~
Rector\Rector\Contrib\Symfony\DependencyInjection\ContainerBuilderCompileEnvArgumentRector: ~
Rector\Symfony\Rector\Validator\ConstraintUrlOptionRector: ~
Rector\Symfony\Rector\Form\FormIsValidRector: ~
Rector\Symfony\Rector\Form\StringFormTypeToClassRector: ~
Rector\Symfony\Rector\VarDumper\VarDumperTestTraitMethodArgsRector: ~
Rector\Symfony\Rector\DependencyInjection\ContainerBuilderCompileEnvArgumentRector: ~
Rector\Rector\Contrib\Symfony\Process\ProcessBuilderInstanceRector: ~
Rector\Rector\Contrib\Symfony\Process\ProcessBuilderGetProcessRector: ~
Rector\Symfony\Rector\Process\ProcessBuilderInstanceRector: ~
Rector\Symfony\Rector\Process\ProcessBuilderGetProcessRector: ~
Rector\Rector\Dynamic\ClassReplacerRector:
$oldToNewClasses:

View File

@ -718,7 +718,7 @@ Turns `createForSubjectWithReviewer()` with null review to standalone method in
}
```
## Rector\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector
## Rector\Symfony\Rector\FrameworkBundle\ContainerGetToConstructorInjectionRector
Turns fetching of dependencies via `$container->get()` in ContainerAware to constructor injection in Command and Controller in Symfony
@ -742,7 +742,7 @@ Turns fetching of dependencies via `$container->get()` in ContainerAware to cons
}
```
## Rector\Rector\Contrib\Symfony\FrameworkBundle\GetParameterToConstructorInjectionRector
## Rector\Symfony\Rector\FrameworkBundle\GetParameterToConstructorInjectionRector
Turns fetching of parameters via `getParameter()` in ContainerAware to constructor injection in Command and Controller in Symfony
@ -765,7 +765,7 @@ Turns fetching of parameters via `getParameter()` in ContainerAware to construct
}
```
## Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector
## Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector
Turns fetching of dependencies via `$this->get()` to constructor injection in Command and Controller in Symfony
@ -787,7 +787,7 @@ Turns fetching of dependencies via `$this->get()` to constructor injection in Co
}
```
## Rector\Rector\Contrib\Symfony\Controller\RedirectToRouteRector
## Rector\Symfony\Rector\Controller\RedirectToRouteRector
Turns redirect to route to short helper method in Controller in Symfony
@ -796,7 +796,7 @@ Turns redirect to route to short helper method in Controller in Symfony
+$this->redirectToRoute("homepage");
```
## Rector\Rector\Contrib\Symfony\Controller\AddFlashRector
## Rector\Symfony\Rector\Controller\AddFlashRector
Turns long flash adding to short helper method in Controller in Symfony
@ -805,7 +805,7 @@ Turns long flash adding to short helper method in Controller in Symfony
+$this->addflash("success", "something");
```
## Rector\Rector\Contrib\Symfony\HttpKernel\GetRequestRector
## Rector\Symfony\Rector\HttpKernel\GetRequestRector
Turns fetching of dependencies via `$this->get()` to constructor injection in Command and Controller in Symfony
@ -823,7 +823,7 @@ Turns fetching of dependencies via `$this->get()` to constructor injection in Co
}
```
## Rector\Rector\Contrib\Symfony\Form\FormTypeGetParentRector
## Rector\Symfony\Rector\Form\FormTypeGetParentRector
Turns string Form Type references to their CONSTANT alternatives in `getParent()` and `getExtendedType()` methods in Form in Symfony
@ -835,7 +835,7 @@ Turns string Form Type references to their CONSTANT alternatives in `getParent()
+function getExtendedType() { return CollectionType::class; }
```
## Rector\Rector\Contrib\Symfony\Form\OptionNameRector
## Rector\Symfony\Rector\Form\OptionNameRector
Turns old option names to new ones in FormTypes in Form in Symfony
@ -844,7 +844,7 @@ Turns old option names to new ones in FormTypes in Form in Symfony
+$builder->add("...", ["scale" => "...", "inherit_data" => "..."];
```
## Rector\Rector\Contrib\Symfony\Console\ConsoleExceptionToErrorEventConstantRector
## Rector\Symfony\Rector\Console\ConsoleExceptionToErrorEventConstantRector
Turns old event name with EXCEPTION to ERROR constant in Console in Symfony
@ -856,7 +856,7 @@ Turns old event name with EXCEPTION to ERROR constant in Console in Symfony
+Symfony\Component\Console\ConsoleEvents::ERROR
```
## Rector\Rector\Contrib\Symfony\Validator\ConstraintUrlOptionRector
## Rector\Symfony\Rector\Validator\ConstraintUrlOptionRector
Turns true value to `Url::CHECK_DNS_TYPE_ANY` in Validator in Symfony.
@ -865,7 +865,7 @@ Turns true value to `Url::CHECK_DNS_TYPE_ANY` in Validator in Symfony.
+$constraint = new Url(["checkDNS" => Url::CHECK_DNS_TYPE_ANY]);
```
## Rector\Rector\Contrib\Symfony\Form\FormIsValidRector
## Rector\Symfony\Rector\Form\FormIsValidRector
Adds `$form->isSubmitted()` validatoin to all `$form->isValid()` calls in Form in Symfony
@ -874,7 +874,7 @@ Adds `$form->isSubmitted()` validatoin to all `$form->isValid()` calls in Form i
+if ($form->isSubmitted() && $form->isValid()) { ... };
```
## Rector\Rector\Contrib\Symfony\Form\StringFormTypeToClassRector
## Rector\Symfony\Rector\Form\StringFormTypeToClassRector
Turns string Form Type references to their CONSTANT alternatives in FormTypes in Form in Symfony
@ -883,7 +883,7 @@ Turns string Form Type references to their CONSTANT alternatives in FormTypes in
+$form->add("name", \Symfony\Component\Form\Extension\Core\Type\TextType::class);
```
## Rector\Rector\Contrib\Symfony\VarDumper\VarDumperTestTraitMethodArgsRector
## Rector\Symfony\Rector\VarDumper\VarDumperTestTraitMethodArgsRector
Adds new `$format` argument in `VarDumperTestTrait->assertDumpEquals()` in Validator in Symfony.
@ -895,7 +895,7 @@ Adds new `$format` argument in `VarDumperTestTrait->assertDumpEquals()` in Valid
+VarDumperTestTrait->assertDumpMatchesFormat($dump, $format, $context = null, $mesage = "");
```
## Rector\Rector\Contrib\Symfony\DependencyInjection\ContainerBuilderCompileEnvArgumentRector
## Rector\Symfony\Rector\DependencyInjection\ContainerBuilderCompileEnvArgumentRector
Turns old default value to parameter in ContinerBuilder->build() method in DI in Symfony
@ -904,7 +904,7 @@ Turns old default value to parameter in ContinerBuilder->build() method in DI in
+$containerBuilder = new Symfony\Component\DependencyInjection\ContainerBuilder(); $containerBuilder->compile(true);
```
## Rector\Rector\Contrib\Symfony\Process\ProcessBuilderInstanceRector
## Rector\Symfony\Rector\Process\ProcessBuilderInstanceRector
Turns `ProcessBuilder::instance()` to new ProcessBuilder in Process in Symfony. Part of multi-step Rector.
@ -913,7 +913,7 @@ Turns `ProcessBuilder::instance()` to new ProcessBuilder in Process in Symfony.
+$processBuilder = new Symfony\Component\Process\ProcessBuilder($args);
```
## Rector\Rector\Contrib\Symfony\Process\ProcessBuilderGetProcessRector
## Rector\Symfony\Rector\Process\ProcessBuilderGetProcessRector
Removes `$processBuilder->getProcess()` calls to $processBuilder in Process in Symfony, because ProcessBuilder was removed. This is part of multi-step Rector and has very narrow focus.

View File

@ -4,8 +4,8 @@ Some Rectors like:
```yaml
services:
Rector\Rector\Contrib\Symfony\Console\CommandToConstructorInjectionRector: ~
Rector\Rector\Contrib\Symfony\HttpKernel\GetterToPropertyRector: ~
Rector\Symfony\Rector\Console\CommandToConstructorInjectionRector: ~
Rector\Symfony\Rector\HttpKernel\GetterToPropertyRector: ~
```
requires `Rector\Bridge\Contract\ServiceTypeForNameProviderInterface` service that provides **service type for certain service name**.

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Console;
namespace Rector\Symfony\Rector\Console;
use PhpParser\Node;
use PhpParser\Node\Expr\ClassConstFetch;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Controller;
namespace Rector\Symfony\Rector\Controller;
use PhpParser\Node;
use Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Controller;
namespace Rector\Symfony\Rector\Controller;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Controller;
namespace Rector\Symfony\Rector\Controller;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\DependencyInjection;
namespace Rector\Symfony\Rector\DependencyInjection;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Form;
namespace Rector\Symfony\Rector\Form;
use PhpParser\Node;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;

View File

@ -1,13 +1,13 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Form;
namespace Rector\Symfony\Rector\Form;
use PhpParser\Node;
use PhpParser\Node\Scalar\String_;
use Rector\Node\Attribute;
use Rector\Node\NodeFactory;
use Rector\Rector\AbstractRector;
use Rector\Rector\Contrib\Symfony\Form\Helper\FormTypeStringToTypeProvider;
use Rector\Symfony\Rector\Form\Helper\FormTypeStringToTypeProvider;
use Rector\RectorDefinition\CodeSample;
use Rector\RectorDefinition\RectorDefinition;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Form\Helper;
namespace Rector\Symfony\Rector\Form\Helper;
use Nette\Utils\Strings;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Form;
namespace Rector\Symfony\Rector\Form;
use PhpParser\Node;
use PhpParser\Node\Expr\ArrayItem;

View File

@ -1,13 +1,13 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Form;
namespace Rector\Symfony\Rector\Form;
use PhpParser\Node;
use PhpParser\Node\Scalar\String_;
use Rector\Node\Attribute;
use Rector\Node\NodeFactory;
use Rector\Rector\AbstractRector;
use Rector\Rector\Contrib\Symfony\Form\Helper\FormTypeStringToTypeProvider;
use Rector\Symfony\Rector\Form\Helper\FormTypeStringToTypeProvider;
use Rector\RectorDefinition\CodeSample;
use Rector\RectorDefinition\RectorDefinition;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\FrameworkBundle;
namespace Rector\Symfony\Rector\FrameworkBundle;
use PhpParser\Node;
use PhpParser\Node\Expr\ClassConstFetch;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\FrameworkBundle;
namespace Rector\Symfony\Rector\FrameworkBundle;
use PhpParser\Node;
use Rector\Node\Attribute;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\FrameworkBundle;
namespace Rector\Symfony\Rector\FrameworkBundle;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\FrameworkBundle;
namespace Rector\Symfony\Rector\FrameworkBundle;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\HttpKernel;
namespace Rector\Symfony\Rector\HttpKernel;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Process;
namespace Rector\Symfony\Rector\Process;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Process;
namespace Rector\Symfony\Rector\Process;
use PhpParser\Node;
use PhpParser\Node\Expr\New_;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\Validator;
namespace Rector\Symfony\Rector\Validator;
use PhpParser\Node;
use PhpParser\Node\Expr\ConstFetch;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Rector\Contrib\Symfony\VarDumper;
namespace Rector\Symfony\Rector\VarDumper;
use PhpParser\Node;
use PhpParser\Node\Expr\ConstFetch;

View File

@ -0,0 +1,4 @@
services:
Rector\Symfony\Rector\Console\CommandToConstructorInjectionRector: ~
Rector\Symfony\Tests\Console\CommandToConstructorInjectionRector\Source\DummyProvider: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Console\ConsoleExceptionToErrorEventConstantRector;
namespace Rector\Symfony\Tests\Console\ConsoleExceptionToErrorEventConstantRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Console\ConsoleExceptionToErrorEventConstantRector
* @covers \Rector\Symfony\Rector\Console\ConsoleExceptionToErrorEventConstantRector
*/
final class ConsoleExceptionToErrorEventConstantRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Console\ConsoleExceptionToErrorEventConstantRector: ~

View File

@ -1,14 +1,14 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Controller\ActionSuffixRemoverRector;
namespace Rector\Symfony\Tests\Controller\ActionSuffixRemoverRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Controller\ActionSuffixRemoverRector
* @covers \Rector\Symfony\Rector\Controller\ActionSuffixRemoverRector
*/
final class AddFlashRectorTest extends AbstractRectorTestCase
final class ActionSuffixRemoverRector extends AbstractRectorTestCase
{
/**
* @dataProvider provideWrongToFixedFiles()

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Controller\ActionSuffixRemoverRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Controller\AddFlashRector;
namespace Rector\Symfony\Tests\Controller\AddFlashRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Controller\AddFlashRector
* @covers \Rector\Symfony\Rector\Controller\AddFlashRector
*/
final class AddFlashRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Controller\AddFlashRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Controller\RedirectToRouteRector;
namespace Rector\Symfony\Tests\Controller\RedirectToRouteRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Controller\RedirectToRouteRector
* @covers \Rector\Symfony\Rector\Controller\RedirectToRouteRector
*/
final class RedirectToRouteRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Controller\RedirectToRouteRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\DependencyInjection\ContainerBuilderCompileEnvArgumentRector;
namespace Rector\Symfony\Tests\DependencyInjection\ContainerBuilderCompileEnvArgumentRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\DependencyInjection\ContainerBuilderCompileEnvArgumentRector
* @covers \Rector\Symfony\Rector\DependencyInjection\ContainerBuilderCompileEnvArgumentRector
*/
final class ContainerBuilderCompileEnvArgumentRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\DependencyInjection\ContainerBuilderCompileEnvArgumentRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Form\FormIsValidRector;
namespace Rector\Symfony\Tests\Form\FormIsValidRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Form\FormIsValidRector
* @covers \Rector\Symfony\Rector\Form\FormIsValidRector
*/
final class FormIsValidRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Form\FormIsValidRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Form\FormTypeGetParentRector;
namespace Rector\Symfony\Tests\Form\FormTypeGetParentRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Form\FormTypeGetParentRector
* @covers \Rector\Symfony\Rector\Form\FormTypeGetParentRector
*/
final class FormTypeGetParentRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Form\FormTypeGetParentRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Form\OptionNameRector;
namespace Rector\Symfony\Tests\Form\OptionNameRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Form\OptionNameRector
* @covers \Rector\Symfony\Rector\Form\OptionNameRector
*/
final class OptionNameRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Form\OptionNameRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\Form\StringFormTypeToClassRector;
namespace Rector\Symfony\Tests\Form\StringFormTypeToClassRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\Form\StringFormTypeToClassRector
* @covers \Rector\Symfony\Rector\Form\StringFormTypeToClassRector
*/
final class StringFormTypeToClassRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\Form\StringFormTypeToClassRector: ~

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\AbstractToConstructorInjectionRectorSource;
namespace Rector\Symfony\Tests\FrameworkBundle\AbstractToConstructorInjectionRectorSource;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -0,0 +1,7 @@
<?php declare(strict_types=1);
namespace Rector\Symfony\Tests\FrameworkBundle\AbstractToConstructorInjectionRectorSource;
final class SomeNonKernelClass
{
}

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector;
namespace Rector\Symfony\Tests\FrameworkBundle\ContainerGetToConstructorInjectionRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector
* @covers \Rector\Symfony\Rector\FrameworkBundle\ContainerGetToConstructorInjectionRector
*/
final class ContainerGetToConstructorInjectionRectorTest extends AbstractRectorTestCase
{

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
use Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector\Source\ContainerAwareParentClass;
use Rector\Symfony\Tests\FrameworkBundle\ContainerGetToConstructorInjectionRector\Source\ContainerAwareParentClass;
final class MyCommand extends ContainerAwareParentClass
{

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector\Source;
namespace Rector\Symfony\Tests\FrameworkBundle\ContainerGetToConstructorInjectionRector\Source;
use Symfony\Component\DependencyInjection\ContainerInterface;

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
use Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\ContainerGetToConstructorInjectionRector\Source\ContainerAwareParentClass;
use Rector\Symfony\Tests\FrameworkBundle\ContainerGetToConstructorInjectionRector\Source\ContainerAwareParentClass;
final class MyCommand extends ContainerAwareParentClass
{

View File

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

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\GetParameterToConstructorInjectionRector;
namespace Rector\Symfony\Tests\FrameworkBundle\GetParameterToConstructorInjectionRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\FrameworkBundle\GetParameterToConstructorInjectionRector
* @covers \Rector\Symfony\Rector\FrameworkBundle\GetParameterToConstructorInjectionRector
*/
final class GetParameterToConstructorInjectionRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,3 @@
services:
Rector\Symfony\Rector\FrameworkBundle\GetParameterToConstructorInjectionRector: ~

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector;
namespace Rector\Symfony\Tests\FrameworkBundle\GetToConstructorInjectionRector;
use Iterator;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector
* @covers \Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector
*/
final class GetToConstructorInjectionRectorTest extends AbstractRectorTestCase
{

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector;
namespace Rector\Symfony\Tests\FrameworkBundle\GetToConstructorInjectionRector;
use Rector\Exception\Configuration\InvalidConfigurationException;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector
* @covers \Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector
*/
final class InvalidConfigurationConstructorInjectionRectorTest extends AbstractRectorTestCase
{

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector;
namespace Rector\Symfony\Tests\FrameworkBundle\GetToConstructorInjectionRector;
use Rector\Exception\Configuration\InvalidConfigurationException;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
/**
* @covers \Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector
* @covers \Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector
*/
final class SecondInvalidConfigurationConstructorInjectionRectorTest extends AbstractRectorTestCase
{

View File

@ -1,14 +1,14 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector;
namespace Rector\Symfony\Tests\FrameworkBundle\GetToConstructorInjectionRector;
use Rector\Exception\Configuration\InvalidConfigurationException;
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
use Rector\Tests\Rector\Contrib\Symfony\FrameworkBundle\AbstractToConstructorInjectionRectorSource\SomeNonKernelClass;
use Rector\Symfony\Tests\FrameworkBundle\AbstractToConstructorInjectionRectorSource\SomeNonKernelClass;
use Symfony\Component\HttpKernel\Kernel;
/**
* @covers \Rector\Rector\Contrib\Symfony\FrameworkBundle\GetToConstructorInjectionRector
* @covers \Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector
*/
final class ThirdInvalidConfigurationConstructorInjectionRectorTest extends AbstractRectorTestCase
{

View File

@ -0,0 +1,5 @@
parameters:
kernel_class: 'Rector\Symfony\Tests\FrameworkBundle\AbstractToConstructorInjectionRectorSource\SomeKernelClass'
services:
Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector: ~

View File

@ -0,0 +1,5 @@
parameters:
kernel_class: 'NonExistingClass'
services:
Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector: ~

View File

@ -0,0 +1,5 @@
parameters:
kernel_class: 'Rector\Symfony\Tests\FrameworkBundle\AbstractToConstructorInjectionRectorSource\SomeNonKernelClass'
services:
Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector: ~

View File

@ -0,0 +1,2 @@
services:
Rector\Symfony\Rector\FrameworkBundle\GetToConstructorInjectionRector: ~

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