Skip to content

Commit

Permalink
Upgrade rector/rector
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Oct 22, 2023
1 parent ba372d5 commit 18ba37d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"doctrine/coding-standard": "^11.1",
"rector/rector": "^0.16.0",
"rector/rector": "^0.18",
"squizlabs/php_codesniffer": "^3.7",
"symfony/phpunit-bridge": "^5.2",
"vimeo/psalm": "^5.13"
Expand Down
18 changes: 3 additions & 15 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector;
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Php70\Rector\StmtsAwareInterface\IfIssetToCoalescingRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
Expand All @@ -20,18 +18,8 @@
$rectorConfig->sets([LevelSetList::UP_TO_PHP_74]);

$rectorConfig->skip([
// Falsely detect unassigned variables in code paths stopped by PHPUnit\Framework\Assert::markTestSkipped()
AddDefaultValueForUndefinedVariableRector::class => [
__DIR__ . '/tests/',
],
// @see https://github.com/phpstan/phpstan-src/pull/2429
RemoveExtraParametersRector::class => [
__DIR__ . '/src/Operation/',
],
// Assigns wrong type due to outdated PHPStan stubs
TypedPropertyFromAssignsRector::class => [
__DIR__ . '/src/Model/BSONIterator.php',
],
// Do not use ternaries extensively
IfIssetToCoalescingRector::class,
// Not necessary in documentation examples
JsonThrowOnErrorRector::class => [

Check failure on line 24 in rector.php

View workflow job for this annotation

GitHub Actions / phpcs

Key specified for array entry; first entry has no key
__DIR__ . '/tests/DocumentationExamplesTest.php',
Expand Down

0 comments on commit 18ba37d

Please sign in to comment.