Rector 0.15.12

This commit is contained in:
Tomas Votruba 2023-02-04 13:37:11 +00:00
parent 9b9b8ed4d9
commit 98e08867dc
20 changed files with 109 additions and 101 deletions

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitc09c98fdc972fd18b536c5b9c47a5305::getLoader();
return ComposerAutoloaderInit1a1a24f14476c75866cb9edf4d4bf91b::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitc09c98fdc972fd18b536c5b9c47a5305
class ComposerAutoloaderInit1a1a24f14476c75866cb9edf4d4bf91b
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitc09c98fdc972fd18b536c5b9c47a5305
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitc09c98fdc972fd18b536c5b9c47a5305', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit1a1a24f14476c75866cb9edf4d4bf91b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitc09c98fdc972fd18b536c5b9c47a5305', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit1a1a24f14476c75866cb9edf4d4bf91b', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit1a1a24f14476c75866cb9edf4d4bf91b::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit1a1a24f14476c75866cb9edf4d4bf91b::$files;
$requireFile = static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305
class ComposerStaticInit1a1a24f14476c75866cb9edf4d4bf91b
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3083,9 +3083,9 @@ class ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc09c98fdc972fd18b536c5b9c47a5305::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit1a1a24f14476c75866cb9edf4d4bf91b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1a1a24f14476c75866cb9edf4d4bf91b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1a1a24f14476c75866cb9edf4d4bf91b::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1845,12 +1845,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
"reference": "a2e31426b9e93623e80486bf5e49cc165089915c"
"reference": "ea9cf46a738e623ecd3e1ed7402eec1afa6032cd"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/a2e31426b9e93623e80486bf5e49cc165089915c",
"reference": "a2e31426b9e93623e80486bf5e49cc165089915c",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/ea9cf46a738e623ecd3e1ed7402eec1afa6032cd",
"reference": "ea9cf46a738e623ecd3e1ed7402eec1afa6032cd",
"shasum": ""
},
"require": {
@ -1865,18 +1865,19 @@
"phpstan\/phpstan": "^1.8.2",
"phpstan\/phpstan-strict-rules": "^1.1",
"phpstan\/phpstan-webmozart-assert": "^1.0",
"phpunit\/phpunit": "^9.5",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6.10",
"rector\/rector-src": "dev-main",
"symplify\/easy-ci": "^11.2",
"symplify\/easy-coding-standard": "^11.2",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/phpstan-rules": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
"symplify\/vendor-patches": "^11.1"
},
"time": "2023-02-03T15:23:29+00:00",
"time": "2023-02-03T18:09:54+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1914,12 +1915,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "a7c960fd8036e86df5e1446b9f61302452b60741"
"reference": "46346e2425dcc68086c540102d8e5e54b3cd97cf"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/a7c960fd8036e86df5e1446b9f61302452b60741",
"reference": "a7c960fd8036e86df5e1446b9f61302452b60741",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/46346e2425dcc68086c540102d8e5e54b3cd97cf",
"reference": "46346e2425dcc68086c540102d8e5e54b3cd97cf",
"shasum": ""
},
"require": {
@ -1933,7 +1934,7 @@
"phpstan\/phpstan": "^1.9",
"phpstan\/phpstan-strict-rules": "^1.4",
"phpstan\/phpstan-webmozart-assert": "^1.2",
"phpunit\/phpunit": "^9.5",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6.14",
@ -1948,7 +1949,7 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-02-03T16:00:40+00:00",
"time": "2023-02-03T18:31:11+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -1989,12 +1990,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-php-parser.git",
"reference": "ed84d2bc08ce2eb8c8860b17d1d0dc4767be6f4f"
"reference": "9639ef9429f74c14fdc3c7dad9d3b0d916663de0"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-php-parser\/zipball\/ed84d2bc08ce2eb8c8860b17d1d0dc4767be6f4f",
"reference": "ed84d2bc08ce2eb8c8860b17d1d0dc4767be6f4f",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-php-parser\/zipball\/9639ef9429f74c14fdc3c7dad9d3b0d916663de0",
"reference": "9639ef9429f74c14fdc3c7dad9d3b0d916663de0",
"shasum": ""
},
"require": {
@ -2008,18 +2009,19 @@
"phpstan\/phpstan": "^1.8.2",
"phpstan\/phpstan-strict-rules": "^1.3",
"phpstan\/phpstan-webmozart-assert": "^1.2",
"phpunit\/phpunit": "^9.5.21",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6.13",
"rector\/rector-src": "dev-main",
"symplify\/easy-ci": "11.2.0.72",
"symplify\/easy-coding-standard": "^11.1",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/phpstan-rules": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
"symplify\/vendor-patches": "^11.1"
},
"time": "2023-02-03T15:56:36+00:00",
"time": "2023-02-03T18:17:36+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2057,12 +2059,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "3d3f65dd46b15e14d819cb6ed9c70a7b73133875"
"reference": "512ed855037439516baad4298790a58a4db7e0ed"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/3d3f65dd46b15e14d819cb6ed9c70a7b73133875",
"reference": "3d3f65dd46b15e14d819cb6ed9c70a7b73133875",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/512ed855037439516baad4298790a58a4db7e0ed",
"reference": "512ed855037439516baad4298790a58a4db7e0ed",
"shasum": ""
},
"require": {
@ -2072,23 +2074,23 @@
"rector\/rector": "<0.11"
},
"require-dev": {
"phpstan\/extension-installer": "^1.1",
"phpstan\/phpstan": "^1.9.2",
"phpstan\/phpstan-strict-rules": "^1.2",
"phpstan\/phpstan-webmozart-assert": "^1.1",
"phpunit\/phpunit": "^9.6",
"rector\/phpstan-rules": "^0.6",
"phpstan\/extension-installer": "^1.2",
"phpstan\/phpstan": "^1.9.14",
"phpstan\/phpstan-strict-rules": "^1.4.5",
"phpstan\/phpstan-webmozart-assert": "^1.2.2",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6.5",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6",
"rector\/rector-generator": "^0.6.14",
"rector\/rector-src": "dev-main",
"symplify\/easy-ci": "^11.1",
"symplify\/easy-coding-standard": "^11.1",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/phpstan-rules": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
"symplify\/vendor-patches": "^11.1"
"symplify\/easy-ci": "^11.2.0.72",
"symplify\/easy-coding-standard": "^11.2.7",
"symplify\/phpstan-extensions": "^11.1.25",
"symplify\/phpstan-rules": "^11.2.3.72",
"symplify\/rule-doc-generator": "^11.1.25",
"symplify\/vendor-patches": "^11.2.0.72"
},
"time": "2023-02-03T15:21:57+00:00",
"time": "2023-02-03T18:23:36+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2126,12 +2128,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "545a0906a3a585f64599e95dfc97b777356626cf"
"reference": "a1ae37da4dd0501d8d601c612cf7c7d366f1f98d"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/545a0906a3a585f64599e95dfc97b777356626cf",
"reference": "545a0906a3a585f64599e95dfc97b777356626cf",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/a1ae37da4dd0501d8d601c612cf7c7d366f1f98d",
"reference": "a1ae37da4dd0501d8d601c612cf7c7d366f1f98d",
"shasum": ""
},
"require": {
@ -2139,14 +2141,11 @@
"php": ">=8.1",
"symfony\/string": "^6.1"
},
"conflict": {
"rector\/rector": "<0.13"
},
"require-dev": {
"phpstan\/extension-installer": "^1.2",
"phpstan\/phpstan": "^1.9.2",
"phpstan\/phpstan-webmozart-assert": "^1.2",
"phpunit\/phpunit": "^9.5",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6",
@ -2155,8 +2154,8 @@
"symfony\/security-core": "^6.1",
"symfony\/security-http": "^6.1",
"symplify\/easy-ci": "^11.1",
"symplify\/easy-coding-standard": "^11.1",
"symplify\/monorepo-builder": "^11.1.30",
"symplify\/easy-coding-standard": "^11.2",
"symplify\/monorepo-builder": "^11.1",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/phpstan-rules": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
@ -2165,14 +2164,11 @@
"tomasvotruba\/type-coverage": "^0.0.9",
"tomasvotruba\/unused-public": "^0.0.34"
},
"time": "2023-02-02T12:34:44+00:00",
"time": "2023-02-04T13:32:06+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
"enable-patching": true,
"branch-alias": {
"dev-main": "0.11-dev"
},
"rector": {
"includes": [
"config\/config.php"

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a2e3142'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a7c960f'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ed84d2b'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3d3f65d'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 545a090'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ea9cf46'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 46346e2'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9639ef9'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 512ed85'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a1ae37d'));
private function __construct()
{
}

View File

@ -10,7 +10,7 @@
"phpstan\/extension-installer": "^1.1",
"rector\/phpstan-rules": "^0.6",
"phpstan\/phpstan": "^1.8.2",
"phpunit\/phpunit": "^9.5",
"phpunit\/phpunit": "^10.0",
"symplify\/phpstan-rules": "^11.1",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/easy-coding-standard": "^11.2",
@ -21,7 +21,8 @@
"phpstan\/phpstan-strict-rules": "^1.1",
"symplify\/vendor-patches": "^11.1",
"rector\/rector-generator": "^0.6.10",
"rector\/rector-debugging": "dev-main"
"rector\/rector-debugging": "dev-main",
"symplify\/easy-ci": "^11.2"
},
"autoload": {
"psr-4": {

View File

@ -10,5 +10,5 @@ use Rector\Doctrine\Rector\Property\DoctrineTargetEntityStringToClassConstantRec
use RectorPrefix202302\Symplify\EasyCI\Config\EasyCIConfig;
return static function (EasyCIConfig $easyCIConfig) : void {
$easyCIConfig->paths([__DIR__ . '/config', __DIR__ . '/src']);
$easyCIConfig->typesToSkip([ClassAnnotationToNamedArgumentConstructorRector::class, ChangeSetParametersArrayToArrayCollectionRector::class, EntityAliasToClassConstantReferenceRector::class, DoctrineTargetEntityStringToClassConstantRector::class]);
$easyCIConfig->typesToSkip([\Rector\Core\Contract\Rector\RectorInterface::class]);
};

View File

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="main">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>

View File

@ -5,18 +5,18 @@ namespace RectorPrefix202302;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->import(__DIR__ . '/config/config.php');
$rectorConfig->importNames();
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
$rectorConfig->parallel();
$rectorConfig->skip([
// for tests
'*/Source/*',
'*/Fixture/*',
]);
$rectorConfig->sets([LevelSetList::UP_TO_PHP_81, SetList::DEAD_CODE, SetList::CODE_QUALITY, SetList::NAMING, SetList::TYPE_DECLARATION, SetList::PRIVATIZATION]);
$rectorConfig->sets([LevelSetList::UP_TO_PHP_81, PHPUnitSetList::PHPUNIT_100, SetList::DEAD_CODE, SetList::CODE_QUALITY, SetList::NAMING, SetList::TYPE_DECLARATION, SetList::PRIVATIZATION]);
$rectorConfig->ruleWithConfiguration(StringClassNameToClassConstantRector::class, ['Doctrine\\*', 'Gedmo\\*', 'Knp\\*', 'DateTime', 'DateTimeInterface']);
};

View File

@ -11,7 +11,7 @@
"phpstan\/phpstan": "^1.9",
"phpstan\/phpstan-strict-rules": "^1.4",
"phpstan\/phpstan-webmozart-assert": "^1.2",
"phpunit\/phpunit": "^9.5",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6.14",

View File

@ -20,10 +20,10 @@ final class DowngradeTypedPropertyRector extends AbstractRector
* @readonly
* @var \Rector\NodeManipulator\PropertyDecorator
*/
private $PropertyDecorator;
public function __construct(PropertyDecorator $PropertyDecorator)
private $propertyDecorator;
public function __construct(PropertyDecorator $propertyDecorator)
{
$this->PropertyDecorator = $PropertyDecorator;
$this->propertyDecorator = $propertyDecorator;
}
/**
* @return array<class-string<Node>>
@ -63,7 +63,7 @@ CODE_SAMPLE
if ($node->type instanceof NullableType && $default instanceof Expr && $this->valueResolver->isNull($default)) {
$node->props[0]->default = null;
}
$this->PropertyDecorator->decorateWithDocBlock($node, $node->type);
$this->propertyDecorator->decorateWithDocBlock($node, $node->type);
$node->type = null;
return $node;
}

View File

@ -8,7 +8,7 @@
},
"require-dev": {
"phpstan\/extension-installer": "^1.1",
"phpunit\/phpunit": "^9.5.21",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"phpstan\/phpstan": "^1.8.2",
"symplify\/phpstan-rules": "^11.1",
@ -20,7 +20,8 @@
"phpstan\/phpstan-webmozart-assert": "^1.2",
"symplify\/vendor-patches": "^11.1",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6.13"
"rector\/rector-generator": "^0.6.13",
"symplify\/easy-ci": "11.2.0.72"
},
"autoload": {
"psr-4": {

View File

@ -0,0 +1,11 @@
<?php
declare (strict_types=1);
namespace RectorPrefix202302;
use Rector\Core\Contract\Rector\RectorInterface;
use RectorPrefix202302\Symplify\EasyCI\Config\EasyCIConfig;
return static function (EasyCIConfig $easyCIConfig) : void {
$easyCIConfig->paths([__DIR__ . '/config', __DIR__ . '/src']);
$easyCIConfig->typesToSkip([RectorInterface::class, \Rector\Set\Contract\SetListInterface::class]);
};

View File

@ -8,7 +8,7 @@ use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->sets([LevelSetList::UP_TO_PHP_81, SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::NAMING]);
$rectorConfig->sets([LevelSetList::UP_TO_PHP_81, SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::NAMING, \Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_100]);
$rectorConfig->importNames();
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
$rectorConfig->skip([StringClassNameToClassConstantRector::class => [__DIR__ . '/config']]);

View File

@ -8,19 +8,19 @@
},
"require-dev": {
"rector\/rector-src": "dev-main",
"phpunit\/phpunit": "^9.6",
"phpstan\/phpstan": "^1.9.2",
"symplify\/phpstan-rules": "^11.1",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/easy-coding-standard": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
"rector\/phpstan-rules": "^0.6",
"phpstan\/extension-installer": "^1.1",
"phpstan\/phpstan-strict-rules": "^1.2",
"phpstan\/phpstan-webmozart-assert": "^1.1",
"symplify\/vendor-patches": "^11.1",
"symplify\/easy-ci": "^11.1",
"rector\/rector-generator": "^0.6",
"phpunit\/phpunit": "^10.0",
"phpstan\/phpstan": "^1.9.14",
"symplify\/phpstan-rules": "^11.2.3.72",
"symplify\/phpstan-extensions": "^11.1.25",
"symplify\/easy-coding-standard": "^11.2.7",
"symplify\/rule-doc-generator": "^11.1.25",
"rector\/phpstan-rules": "^0.6.5",
"phpstan\/extension-installer": "^1.2",
"phpstan\/phpstan-strict-rules": "^1.4.5",
"phpstan\/phpstan-webmozart-assert": "^1.2.2",
"symplify\/vendor-patches": "^11.2.0.72",
"symplify\/easy-ci": "^11.2.0.72",
"rector\/rector-generator": "^0.6.14",
"rector\/rector-debugging": "dev-main"
},
"autoload": {

View File

@ -3,6 +3,7 @@
declare (strict_types=1);
namespace RectorPrefix202302;
use Rector\Core\Contract\Rector\RectorInterface;
use Rector\PHPUnit\Rector\Class_\ArrayArgumentToDataProviderRector;
use Rector\PHPUnit\Rector\Class_\ProphecyPHPDocRector;
use Rector\PHPUnit\Rector\ClassMethod\CreateMockToAnonymousClassRector;
@ -15,5 +16,5 @@ use Rector\PHPUnit\Rector\MethodCall\UseSpecificWithMethodRector;
use RectorPrefix202302\Symplify\EasyCI\Config\EasyCIConfig;
return static function (EasyCIConfig $easyCIConfig) : void {
$easyCIConfig->paths([__DIR__ . '/config', __DIR__ . '/src']);
$easyCIConfig->typesToSkip([CreateMockToAnonymousClassRector::class, RemoveEmptyTestMethodRector::class, ReplaceTestAnnotationWithPrefixedFunctionRector::class, TryCatchToExpectExceptionRector::class, ArrayArgumentToDataProviderRector::class, ProphecyPHPDocRector::class, AssertResourceToClosedResourceRector::class, CreateMockToCreateStubRector::class, UseSpecificWithMethodRector::class]);
$easyCIConfig->typesToSkip([RectorInterface::class, \Rector\Set\Contract\SetListInterface::class]);
};

View File

@ -9,7 +9,6 @@ use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig) : void {
$rectorConfig->importNames();
$rectorConfig->parallel();
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
$rectorConfig->skip([
// for tests
@ -23,6 +22,7 @@ return static function (RectorConfig $rectorConfig) : void {
__DIR__ . '/config/config.php',
LevelSetList::UP_TO_PHP_81,
SetList::DEAD_CODE,
\Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_100,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::EARLY_RETURN,
@ -32,9 +32,7 @@ return static function (RectorConfig $rectorConfig) : void {
]);
$rectorConfig->ruleWithConfiguration(StringClassNameToClassConstantRector::class, [
// keep unprefixed to protected from downgrade
'PHPUnit\\Framework\\Assert',
'PHPUnit\\Framework\\MockObject\\*',
'PHPUnit\\Framework\\TestCase',
'PHPUnit\\Framework\\*',
'Prophecy\\Prophet',
]);
};

View File

@ -12,7 +12,7 @@
"phpstan\/extension-installer": "^1.2",
"phpstan\/phpstan": "^1.9.2",
"phpstan\/phpstan-webmozart-assert": "^1.2",
"phpunit\/phpunit": "^9.5",
"phpunit\/phpunit": "^10.0",
"rector\/phpstan-rules": "^0.6",
"rector\/rector-debugging": "dev-main",
"rector\/rector-generator": "^0.6",
@ -21,8 +21,8 @@
"symfony\/security-core": "^6.1",
"symfony\/security-http": "^6.1",
"symplify\/easy-ci": "^11.1",
"symplify\/easy-coding-standard": "^11.1",
"symplify\/monorepo-builder": "^11.1.30",
"symplify\/easy-coding-standard": "^11.2",
"symplify\/monorepo-builder": "^11.1",
"symplify\/phpstan-extensions": "^11.1",
"symplify\/phpstan-rules": "^11.1",
"symplify\/rule-doc-generator": "^11.1",
@ -50,18 +50,10 @@
"phpstan": "vendor\/bin\/phpstan analyse --ansi --error-format symplify",
"check-cs": "vendor\/bin\/ecs check --ansi",
"fix-cs": "vendor\/bin\/ecs check --fix --ansi",
"docs": [
"vendor\/bin\/rule-doc-generator generate src --output-file docs\/rector_rules_overview.md --ansi"
]
},
"conflict": {
"rector\/rector": "<0.13"
"docs": "vendor\/bin\/rule-doc-generator generate src --output-file docs\/rector_rules_overview.md --ansi"
},
"extra": {
"enable-patching": true,
"branch-alias": {
"dev-main": "0.11-dev"
},
"rector": {
"includes": [
"config\/config.php"

View File

@ -41,5 +41,5 @@ return static function (RectorConfig $rectorConfig) : void {
]);
// for testing
$rectorConfig->import(__DIR__ . '/config/config.php');
$rectorConfig->sets([LevelSetList::UP_TO_PHP_81, SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::NAMING, SymfonySetList::SYMFONY_60]);
$rectorConfig->sets([LevelSetList::UP_TO_PHP_81, \Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_100, SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::NAMING, SymfonySetList::SYMFONY_60]);
};