-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e4c524
commit 14f9123
Showing
4 changed files
with
80 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; | ||
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector; | ||
use Rector\ValueObject\PhpVersion; | ||
use Ssch\TYPO3Rector\CodeQuality\General\ConvertImplicitVariablesToExplicitGlobalsRector; | ||
use Ssch\TYPO3Rector\CodeQuality\General\ExtEmConfRector; | ||
use Ssch\TYPO3Rector\CodeQuality\General\InjectMethodToConstructorInjectionRector; | ||
use Ssch\TYPO3Rector\Configuration\Typo3Option; | ||
use Ssch\TYPO3Rector\Set\Typo3LevelSetList; | ||
use Ssch\TYPO3Rector\Set\Typo3SetList; | ||
|
||
return RectorConfig::configure() | ||
->withPaths([ | ||
__DIR__ . '/../../Build', | ||
__DIR__ . '/../../Classes', | ||
__DIR__ . '/../../Configuration', | ||
__DIR__ . '/../../Tests', | ||
__DIR__ . '/../../ext_emconf.php', | ||
__DIR__ . '/../../ext_localconf.php', | ||
__DIR__ . '/../../ext_tables.php', | ||
]) | ||
->withPhpSets(php81: true) | ||
->withPhpVersion(PhpVersion::PHP_81) | ||
->withSets([ | ||
Typo3SetList::CODE_QUALITY, | ||
Typo3SetList::GENERAL, | ||
Typo3LevelSetList::UP_TO_TYPO3_12, | ||
]) | ||
// To have a better analysis from PHPStan, we teach it here some more things | ||
->withPHPStanConfigs([Typo3Option::PHPSTAN_FOR_RECTOR_PATH]) | ||
->withRules([ | ||
AddVoidReturnTypeWhereNoReturnRector::class, | ||
ConvertImplicitVariablesToExplicitGlobalsRector::class, | ||
]) | ||
->withImportNames(true, true, false, true) | ||
->withConfiguredRule(ExtEmConfRector::class, [ | ||
ExtEmConfRector::PHP_VERSION_CONSTRAINT => '8.1.0-8.4.99', | ||
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '12.4.2-13.9.99', | ||
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [], | ||
]) | ||
->withSkip([ | ||
InjectMethodToConstructorInjectionRector::class => [ | ||
__DIR__ . '/../../Classes/ViewHelpers/', | ||
], | ||
NullToStrictStringFuncCallArgRector::class, | ||
]) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters