forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
54 lines (50 loc) · 2.46 KB
/
Copy pathrector.php
File metadata and controls
54 lines (50 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php declare(strict_types=1);
use Frosh\Rector\Rule\v68\EntitySearchResultGetEntitiesRector;
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Identical\StrlenZeroToIdenticalEmptyStringRector;
use Rector\CodeQuality\Rector\Ternary\TernaryEmptyArrayArrayDimFetchToCoalesceRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\Class_\ClassConstantToSelfClassRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
return RectorConfig::configure()
->withSymfonyContainerXml(__DIR__ . '/var/cache/static_phpstan_dev/Shopware_Core_DevOps_StaticAnalyze_StaticAnalyzeKernelPhpstan_devDebugContainer.xml')
// resolves container->get('<service id>') to the service class during rule analysis, the same
// way phpstan-symfony does for the phpstan runs; type-based rules cannot see through the
// container lookup without it
->withPHPStanConfigs([__DIR__ . '/rector-phpstan.neon'])
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withFileExtensions(['php'])
// bigger chunks keep the workers busy with actual analysis instead of per-chunk overhead
->withParallel(jobSize: 128)
->withSkip([
__DIR__ . '/src/Core/Framework/Script/ServiceStubs.php',
'**/vendor/*',
'**/node_modules/*',
'**/Resources/*',
// BC test deliberately covering the deprecated delegations until their removal
EntitySearchResultGetEntitiesRector::class => [
__DIR__ . '/tests/unit/Core/Framework/DataAbstractionLayer/Search/EntitySearchResultTest.php',
],
])
->withCache(
cacheDirectory: __DIR__ . '/var/cache/rector',
cacheClass: FileCacheStorage::class,
)
->withRules([
// Guards against the deprecated collection surface of EntitySearchResult (see #18655)
EntitySearchResultGetEntitiesRector::class,
ClassConstantToSelfClassRector::class,
DisallowedEmptyRuleFixerRector::class,
CountArrayToEmptyArrayComparisonRector::class,
SimplifyEmptyArrayCheckRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
StrlenZeroToIdenticalEmptyStringRector::class,
TernaryEmptyArrayArrayDimFetchToCoalesceRector::class,
])
;