Skip to content

Commit 93aadb6

Browse files
committed
update rector to 1.2
Some of our skipped rules no longer exist or apply. Next auto-cleanup should be checked extra careful
1 parent c4dceba commit 93aadb6

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

_test/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"prefer-stable": true,
1212
"require-dev": {
13-
"rector/rector": "^0.19",
13+
"rector/rector": "^1.2",
1414
"squizlabs/php_codesniffer": "^3.7",
1515
"phpunit/phpunit": "^9.0"
1616
},

_test/composer.lock

Lines changed: 16 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_test/rector.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use dokuwiki\test\rector\DokuWikiPtlnRector;
66
use dokuwiki\test\rector\DokuWikiRenamePrintToEcho;
77
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
8-
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
98
use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector;
109
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
1110
use Rector\CodeQuality\Rector\If_\CombineIfRector;
@@ -15,11 +14,9 @@
1514
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
1615
use Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector;
1716
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
18-
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
1917
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
2018
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
2119
use Rector\CodingStyle\Rector\FuncCall\StrictArraySearchRector;
22-
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
2320
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
2421
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
2522
use Rector\Config\RectorConfig;
@@ -41,7 +38,6 @@
4138
use Rector\Set\ValueObject\SetList;
4239
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
4340
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
44-
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
4541

4642
return static function (RectorConfig $rectorConfig): void {
4743
// FIXME we may want to autoload these later
@@ -115,16 +111,12 @@
115111
SymplifyQuoteEscapeRector::class,
116112
CatchExceptionNameMatchingTypeRector::class,
117113
EncapsedStringsToSprintfRector::class,
118-
CallableThisArrayToAnonymousFunctionRector::class,
119-
StaticClosureRector::class,
120114
SimplifyUselessVariableRector::class, // seems to strip constructor property initializations
121-
PostIncDecToPreIncDecRector::class,
122115
DisallowedEmptyRuleFixerRector::class,
123116
RemoveParentCallWithoutParentRector::class,
124117
WrapEncapsedVariableInCurlyBracesRector::class,
125118
SimplifyIfReturnBoolRector::class,
126119
StrictArraySearchRector::class, // we cannot assume strict search is always wanted
127-
TypedPropertyFromAssignsRector::class, // maybe?
128120
JoinStringConcatRector::class, // this does not count variables, so it creates overlong lines
129121
RemoveExtraParametersRector::class, // this actually broke code
130122
RemoveUnusedConstructorParamRector::class, // see rectorphp/rector#8580

0 commit comments

Comments
 (0)