-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
87186af
commit 651d7e2
Showing
4 changed files
with
84 additions
and
12 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,54 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
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; | ||
use Ssch\TYPO3Rector\TYPO311\v0\DateTimeAspectInsteadOfGlobalsExecTimeRector; | ||
|
||
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([ | ||
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/Controller/AdministrationController.php', | ||
__DIR__ . '/../../Classes/Domain/Repository/AbstractDemandedRepository.php', | ||
__DIR__ . '/../../Classes/Service/SettingsService.php', | ||
__DIR__ . '/../../Classes/ViewHelpers/', | ||
], | ||
DateTimeAspectInsteadOfGlobalsExecTimeRector::class => [ | ||
__DIR__ . '/../../Tests/Unit/Backend/FormDataProvider/NewsRowInitializeNewTest.php', | ||
], | ||
]) | ||
; |
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