1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
use Rector\Core\Configuration\Option; |
6
|
|
|
use Rector\Core\ValueObject\PhpVersion; |
7
|
|
|
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; |
8
|
|
|
use Rector\PostRector\Rector\NameImportingPostRector; |
9
|
|
|
use Rector\Set\ValueObject\LevelSetList; |
10
|
|
|
use Rector\Set\ValueObject\SetList; |
11
|
|
|
use Ssch\TYPO3Rector\Configuration\Typo3Option; |
12
|
|
|
use Ssch\TYPO3Rector\FileProcessor\Composer\Rector\ExtensionComposerRector; |
|
|
|
|
13
|
|
|
use Ssch\TYPO3Rector\FileProcessor\TypoScript\Rector\FileIncludeToImportStatementTypoScriptRector; |
|
|
|
|
14
|
|
|
use Ssch\TYPO3Rector\Rector\v9\v0\InjectAnnotationRector; |
15
|
|
|
use Ssch\TYPO3Rector\Rector\General\ExtEmConfRector; |
16
|
|
|
use Ssch\TYPO3Rector\Set\Typo3LevelSetList; |
17
|
|
|
use Ssch\TYPO3Rector\Set\Typo3SetList; |
18
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
19
|
|
|
|
20
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void { |
21
|
|
|
|
22
|
|
|
$containerConfigurator->import(Typo3LevelSetList::UP_TO_TYPO3_12); |
23
|
|
|
$containerConfigurator->import(SetList::CODE_QUALITY); |
24
|
|
|
$containerConfigurator->import(SetList::TYPE_DECLARATION); |
25
|
|
|
$containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT); |
26
|
|
|
$containerConfigurator->import(LevelSetList::UP_TO_PHP_80); |
27
|
|
|
|
28
|
|
|
$parameters = $containerConfigurator->parameters(); |
29
|
|
|
$parameters->set(Option::PHPSTAN_FOR_RECTOR_PATH, Typo3Option::PHPSTAN_FOR_RECTOR_PATH); |
|
|
|
|
30
|
|
|
$parameters->set(Option::AUTO_IMPORT_NAMES, true); |
|
|
|
|
31
|
|
|
$parameters->set(Option::IMPORT_SHORT_CLASSES, false); |
|
|
|
|
32
|
|
|
$parameters->set(Option::IMPORT_DOC_BLOCKS, false); |
|
|
|
|
33
|
|
|
|
34
|
|
|
$parameters->set(Option::PATHS, [ |
|
|
|
|
35
|
|
|
'ext_emconf.php', |
36
|
|
|
'composer.json', |
37
|
|
|
__DIR__ . '/Classes/', |
38
|
|
|
__DIR__ . '/Configuration/', |
39
|
|
|
__DIR__ . '/Tests/', |
40
|
|
|
]); |
41
|
|
|
|
42
|
|
|
$parameters->set(Option::SKIP, [ |
|
|
|
|
43
|
|
|
NameImportingPostRector::class => [ |
44
|
|
|
'ext_emconf.php', |
45
|
|
|
'ext_localconf.php', |
46
|
|
|
'ext_tables.php', |
47
|
|
|
], |
48
|
|
|
]); |
49
|
|
|
|
50
|
|
|
$services = $containerConfigurator->services(); |
51
|
|
|
$services->set(ExtEmConfRector::class); |
52
|
|
|
$services->set(ExtensionComposerRector::class); |
53
|
|
|
}; |
54
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths