Skip to content

Commit

Permalink
build: Upgrade to Rector v1 (#1378)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Jun 17, 2024
1 parent dc28d37 commit f85f21d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
25 changes: 10 additions & 15 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,25 @@
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$rectorConfig->autoloadPaths([
])
->withAutoloadPaths([
__DIR__ . '/vendor/autoload.php',
__DIR__ . '/vendor-bin/rector/vendor/autoload.php',
]);

$rectorConfig->importNames();

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
])
->withImportNames(removeUnusedImports: true)
->withPhpSets(php82: true)
->withSets([
PHPUnitSetList::PHPUNIT_100,
]);

$rectorConfig->skip([
])
->withSkip([
\Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector::class,
\Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector::class,
\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => [
__DIR__.'/src/Configuration/Configuration.php',
],
\Rector\Php73\Rector\String_\SensitiveHereNowDocRector::class,
]);
};
2 changes: 1 addition & 1 deletion vendor-bin/rector/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"rector/rector": ">=0.14"
"rector/rector": "^1.0"
},

"config": {
Expand Down

0 comments on commit f85f21d

Please sign in to comment.