mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 08:25:02 +02:00
move PhpParser Rectors to own package
This commit is contained in:
parent
1c8217daa6
commit
336ffdd7d7
@ -40,7 +40,8 @@
|
||||
"Rector\\Sensio\\": "packages/Sensio/src",
|
||||
"Rector\\Nette\\": "packages/Nette/src",
|
||||
"Rector\\Sylius\\": "packages/Sylius/src",
|
||||
"Rector\\PHPUnit\\": "packages/PHPUnit/src"
|
||||
"Rector\\PHPUnit\\": "packages/PHPUnit/src",
|
||||
"Rector\\PhpParser\\": "packages/PhpParser/src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
@ -54,7 +55,8 @@
|
||||
"Rector\\Sensio\\Tests\\": "packages/Sensio/tests",
|
||||
"Rector\\Nette\\Tests\\": "packages/Nette/tests",
|
||||
"Rector\\Sylius\\Tests\\": "packages/Sylius/tests",
|
||||
"Rector\\PHPUnit\\Tests\\": "packages/PHPUnit/tests"
|
||||
"Rector\\PHPUnit\\Tests\\": "packages/PHPUnit/tests",
|
||||
"Rector\\PhpParser\\Tests\\": "packages/PhpParser/tests"
|
||||
},
|
||||
"classmap": [
|
||||
"packages/Symfony/tests"
|
||||
|
@ -1,10 +1,10 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\IdentifierRector: ~
|
||||
Rector\Rector\Contrib\PhpParser\ParamAndStaticVarNameRector: ~
|
||||
Rector\Rector\Contrib\PhpParser\CatchAndClosureUseNameRector: ~
|
||||
Rector\Rector\Contrib\PhpParser\SetLineRector: ~
|
||||
Rector\Rector\Contrib\PhpParser\RemoveNodeRector: ~
|
||||
Rector\Rector\Contrib\PhpParser\UseWithAliasRector: ~
|
||||
Rector\PhpParser\Rector\IdentifierRector: ~
|
||||
Rector\PhpParser\Rector\ParamAndStaticVarNameRector: ~
|
||||
Rector\PhpParser\Rector\CatchAndClosureUseNameRector: ~
|
||||
Rector\PhpParser\Rector\SetLineRector: ~
|
||||
Rector\PhpParser\Rector\RemoveNodeRector: ~
|
||||
Rector\PhpParser\Rector\UseWithAliasRector: ~
|
||||
|
||||
Rector\Rector\Dynamic\PropertyNameReplacerRector:
|
||||
$perClassOldToNewProperties:
|
||||
|
@ -377,7 +377,7 @@ Turns magic callback assign to callback assign on Nette Form events.
|
||||
+$container->removeService("someKey");
|
||||
```
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\IdentifierRector
|
||||
## Rector\PhpParser\Rector\IdentifierRector
|
||||
|
||||
Turns node string names to Identifier object in php-parser
|
||||
|
||||
@ -387,7 +387,7 @@ Turns node string names to Identifier object in php-parser
|
||||
+$name = $constNode->name->toString();'
|
||||
```
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\ParamAndStaticVarNameRector
|
||||
## Rector\PhpParser\Rector\ParamAndStaticVarNameRector
|
||||
|
||||
Turns old string `var` to `var->name` sub-variable in Node of PHP-Parser
|
||||
|
||||
@ -399,7 +399,7 @@ Turns old string `var` to `var->name` sub-variable in Node of PHP-Parser
|
||||
+$staticVarNode->var->name;
|
||||
```
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\CatchAndClosureUseNameRector
|
||||
## Rector\PhpParser\Rector\CatchAndClosureUseNameRector
|
||||
|
||||
Turns `$catchNode->var` to its new `name` property in php-parser
|
||||
|
||||
@ -408,7 +408,7 @@ Turns `$catchNode->var` to its new `name` property in php-parser
|
||||
+$catchNode->var->name
|
||||
```
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\SetLineRector
|
||||
## Rector\PhpParser\Rector\SetLineRector
|
||||
|
||||
Turns standalone line method to attribute in Node of PHP-Parser
|
||||
|
||||
@ -417,7 +417,7 @@ Turns standalone line method to attribute in Node of PHP-Parser
|
||||
+$node->setAttribute("line", 5);
|
||||
```
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\RemoveNodeRector
|
||||
## Rector\PhpParser\Rector\RemoveNodeRector
|
||||
|
||||
Turns integer return to remove node to constant in NodeVisitor of PHP-Parser
|
||||
|
||||
@ -429,7 +429,7 @@ Turns integer return to remove node to constant in NodeVisitor of PHP-Parser
|
||||
}
|
||||
```
|
||||
|
||||
## Rector\Rector\Contrib\PhpParser\UseWithAliasRector
|
||||
## Rector\PhpParser\Rector\UseWithAliasRector
|
||||
|
||||
Turns use property to method and `$node->alias` to last name in UseAlias Node of PHP-Parser
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Rector\Contrib\PhpParser;
|
||||
namespace Rector\PhpParser\Rector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Rector\Contrib\PhpParser;
|
||||
namespace Rector\PhpParser\Rector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Rector\Contrib\PhpParser;
|
||||
namespace Rector\PhpParser\Rector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Rector\Contrib\PhpParser;
|
||||
namespace Rector\PhpParser\Rector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Rector\Contrib\PhpParser;
|
||||
namespace Rector\PhpParser\Rector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Rector\Contrib\PhpParser;
|
||||
namespace Rector\PhpParser\Rector;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\PropertyFetch;
|
7
packages/PhpParser/src/config/services.yml
Normal file
7
packages/PhpParser/src/config/services.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
|
||||
Rector\PhpParser\:
|
||||
resource: '../'
|
||||
exclude: '../{Rector/**/*Rector.php}'
|
@ -1,12 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\Contrib\PhpParser\CatchAndClosureUseNameRector;
|
||||
namespace Rector\PhpParser\Tests\Rector\CatchAndClosureUseNameRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @covers \Rector\Rector\Contrib\PhpParser\CatchAndClosureUseNameRector
|
||||
* @covers \Rector\PhpParser\Rector\CatchAndClosureUseNameRector
|
||||
*/
|
||||
final class CatchAndClosureUseNameRectorTest extends AbstractRectorTestCase
|
||||
{
|
@ -0,0 +1,2 @@
|
||||
services:
|
||||
Rector\PhpParser\Rector\CatchAndClosureUseNameRector: ~
|
@ -1,12 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\Contrib\PhpParser\IdentifierRector;
|
||||
namespace Rector\PhpParser\Tests\Rector\IdentifierRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @covers \Rector\Rector\Contrib\PhpParser\IdentifierRector
|
||||
* @covers \Rector\PhpParser\Rector\IdentifierRector
|
||||
*/
|
||||
final class IdentifierRectorTest extends AbstractRectorTestCase
|
||||
{
|
@ -0,0 +1,2 @@
|
||||
services:
|
||||
Rector\PhpParser\Rector\IdentifierRector: ~
|
@ -1,12 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\Contrib\PhpParser\ParamAndStaticVarNameRector;
|
||||
namespace Rector\PhpParser\Tests\Rector\ParamAndStaticVarNameRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @covers \Rector\Rector\Contrib\PhpParser\ParamAndStaticVarNameRector
|
||||
* @covers \Rector\PhpParser\Rector\ParamAndStaticVarNameRector
|
||||
*/
|
||||
final class ParamAndStaticVarNameRectorTest extends AbstractRectorTestCase
|
||||
{
|
@ -0,0 +1,2 @@
|
||||
services:
|
||||
Rector\PhpParser\Rector\ParamAndStaticVarNameRector: ~
|
@ -1,12 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\Contrib\PhpParser\RemoveNodeRector;
|
||||
namespace Rector\PhpParser\Tests\Rector\RemoveNodeRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @covers \Rector\Rector\Contrib\PhpParser\RemoveNodeRector
|
||||
* @covers \Rector\PhpParser\Rector\RemoveNodeRector
|
||||
*/
|
||||
final class RemoveNodeRectorTest extends AbstractRectorTestCase
|
||||
{
|
@ -0,0 +1,2 @@
|
||||
services:
|
||||
Rector\PhpParser\Rector\RemoveNodeRector: ~
|
@ -1,12 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\Contrib\PhpParser\SetLineRector;
|
||||
namespace Rector\PhpParser\Tests\Rector\SetLineRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @covers \Rector\Rector\Contrib\PhpParser\SetLineRector
|
||||
* @covers \Rector\PhpParser\Rector\SetLineRector
|
||||
*/
|
||||
final class SetLineRectorTest extends AbstractRectorTestCase
|
||||
{
|
2
packages/PhpParser/tests/Rector/SetLineRector/config.yml
Normal file
2
packages/PhpParser/tests/Rector/SetLineRector/config.yml
Normal file
@ -0,0 +1,2 @@
|
||||
services:
|
||||
Rector\PhpParser\Rector\SetLineRector: ~
|
@ -1,12 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\Contrib\PhpParser\UseWithAliasRector;
|
||||
namespace Rector\PhpParser\Tests\Rector\UseWithAliasRector;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
/**
|
||||
* @covers \Rector\Rector\Contrib\PhpParser\UseWithAliasRector
|
||||
* @covers \Rector\PhpParser\Rector\UseWithAliasRector
|
||||
*/
|
||||
final class UseWithAliasRectorTest extends AbstractRectorTestCase
|
||||
{
|
@ -0,0 +1,2 @@
|
||||
services:
|
||||
Rector\PhpParser\Rector\UseWithAliasRector: ~
|
@ -1,2 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\CatchAndClosureUseNameRector: ~
|
@ -1,2 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\IdentifierRector: ~
|
@ -1,2 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\ParamAndStaticVarNameRector: ~
|
@ -1,2 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\RemoveNodeRector: ~
|
@ -1,2 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\SetLineRector: ~
|
@ -1,2 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Contrib\PhpParser\UseWithAliasRector: ~
|
Loading…
x
Reference in New Issue
Block a user