File tree Expand file tree Collapse file tree 4 files changed +11
-25
lines changed Expand file tree Collapse file tree 4 files changed +11
-25
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ composer.lock
44.php_cs.cache
55.php-cs-fixer.cache
66.phpunit.result.cache
7+ phpstan.neon
Original file line number Diff line number Diff line change 3333 "friendsofphp/php-cs-fixer" : " ^3.0" ,
3434 "monolog/monolog" : " ^1.24|^2.1" ,
3535 "symfony/phpunit-bridge" : " ^4.4|^5.3|^6.0" ,
36- "phpstan/phpstan" : " ^1.3 " ,
37- "phpstan/phpstan-phpunit" : " ^1 .0" ,
38- "rector/rector" : " ^0.15 .0"
36+ "phpstan/phpstan" : " ^2.0 " ,
37+ "phpstan/phpstan-phpunit" : " ^2 .0" ,
38+ "rector/rector" : " ^2.0 .0"
3939 },
4040 "suggest" : {
4141 "ext-tidy" : " Used to clean up given HTML and to avoid problems with bad HTML structure."
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ parameters:
88 bootstrapFiles :
99 - vendor/bin/.phpunit/phpunit/vendor/autoload.php
1010
11- checkMissingIterableValueType : false
12-
1311includes :
1412 - vendor/phpstan/phpstan-phpunit/extension.neon
1513 - vendor/phpstan/phpstan-phpunit/rules.neon
Original file line number Diff line number Diff line change 33declare (strict_types=1 );
44
55use Rector \Config \RectorConfig ;
6- use Rector \Core \ValueObject \PhpVersion ;
76use Rector \Set \ValueObject \LevelSetList ;
87
9- return static function (RectorConfig $ rectorConfig ): void {
10- // paths to refactor; solid alternative to CLI arguments
11- $ rectorConfig ->paths ([
8+ return RectorConfig::configure ()
9+ ->withPaths ([
1210 __DIR__ . '/src ' ,
1311 __DIR__ . '/tests ' ,
14- ]);
15-
16- // Path to phpstan with extensions, that PHPSTan in Rector uses to determine types
17- $ rectorConfig ->phpstanConfig (__DIR__ . '/phpstan.neon ' );
18-
19- $ rectorConfig ->bootstrapFiles ([
12+ ])
13+ ->withBootstrapFiles ([
2014 __DIR__ . '/vendor/bin/.phpunit/phpunit/vendor/autoload.php ' ,
2115 __DIR__ . '/vendor/autoload.php ' ,
22- ]);
23-
24- // Define what rule sets will be applied
25- $ rectorConfig ->sets ([
26- LevelSetList::UP_TO_PHP_74 ,
27- ]);
28-
29- // is your PHP version different from the one your refactor to?
30- $ rectorConfig ->phpVersion (PhpVersion::PHP_74 );
31- };
16+ ])
17+ ->withSets ([LevelSetList::UP_TO_PHP_74 ])
18+ ;
You can’t perform that action at this time.
0 commit comments