Remove leftovers of rector

This commit is contained in:
Daniel Siepmann 2023-04-26 17:20:38 +02:00
parent d604014297
commit a0d577e89f
4 changed files with 3 additions and 66 deletions

1
.gitattributes vendored
View file

@ -10,4 +10,3 @@ phpcs.xml.dist export-ignore
phpstan-baseline.neon export-ignore
phpstan.neon export-ignore
phpunit.xml.dist export-ignore
rector.php export-ignore

View file

@ -27,6 +27,9 @@ Tasks
Ensure packages are sorted.
Ensure no composer.lock is created.
* Remove leftovers of rector
We don't need to carry those files if we don't use them right now.
Deprecation
-----------

View file

@ -45,7 +45,6 @@
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8.7",
"phpunit/phpunit": "^9.0",
"ssch/typo3-rector": "^1.0",
"symplify/easy-coding-standard": "^11.1",
"typo3/testing-framework": "^7.0"
},

View file

@ -1,64 +0,0 @@
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\PostRector\Rector\NameImportingPostRector;
use Ssch\TYPO3Rector\Configuration\Typo3Option;
use Ssch\TYPO3Rector\FileProcessor\TypoScript\Rector\v9\v0\FileIncludeToImportStatementTypoScriptRector;
use Ssch\TYPO3Rector\Rector\General\ConvertImplicitVariablesToExplicitGlobalsRector;
use Ssch\TYPO3Rector\Rector\General\ExtEmConfRector;
use Ssch\TYPO3Rector\Set\Typo3LevelSetList;
return static function (RectorConfig $rectorConfig): void {
$parameters = $rectorConfig->parameters();
$rectorConfig->sets([
Typo3LevelSetList::UP_TO_TYPO3_11,
]);
$rectorConfig->paths([
__DIR__ . '/Classes',
__DIR__ . '/Tests',
__DIR__ . '/Configuration',
__DIR__ . '/ext_*.php',
]);
// In order to have a better analysis from phpstan we teach it here some more things
$rectorConfig->phpstanConfig(Typo3Option::PHPSTAN_FOR_RECTOR_PATH);
// FQN classes are not imported by default. If you don't do it manually after every Rector run, enable it by:
$rectorConfig->importNames();
// Disable parallel otherwise non php file processing is not working i.e. typoscript
$rectorConfig->disableParallel();
// this will not import root namespace classes, like \DateTime or \Exception
$rectorConfig->importShortClasses(true);
// Define your target version which you want to support
$rectorConfig->phpVersion(PhpVersion::PHP_74);
$rectorConfig->skip([
__DIR__ . '/.github/*',
NameImportingPostRector::class => [
'ext_localconf.php',
'ext_tables.php',
'ClassAliasMap.php',
__DIR__ . '/**/Configuration/*.php',
__DIR__ . '/**/Configuration/**/*.php',
],
]);
$rectorConfig->rule(StringClassNameToClassConstantRector::class);
// Add some general TYPO3 rules
$rectorConfig->rule(ConvertImplicitVariablesToExplicitGlobalsRector::class);
$rectorConfig->ruleWithConfiguration(ExtEmConfRector::class, [
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [],
]);
$rectorConfig->rule(FileIncludeToImportStatementTypoScriptRector::class);
};