Repository navigation
Expand file tree
/
Copy pathrector.php
More file actions
46 lines (40 loc) · 2.09 KB
/
Copy pathrector.php
File metadata and controls
46 lines (40 loc) · 2.09 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector;
use Rector\Symfony\CodeQuality\Rector\Class_\EventSubscriberToAttributeRector;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpVersion(PhpVersion::PHP_82)
->withComposerBased(symfony: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
)
->withSkip([
// rector 2.8 (symfony set): a bundle must not rely on the host's autoconfiguration for #[AsEventListener];
// the subscribers are tested through getSubscribedEvents() (same skip as LegalKit / RuntimeEnv).
EventSubscriberToAttributeRector::class,
__DIR__ . '/vendor',
// Since 2.0: host classes that still implement a removed port; they cannot be loaded by design.
__DIR__ . '/tests/Support/Removed',
// Each skip below is deliberate and scoped to one rule in one file. Do not "fix" `composer rector-dry` by
// applying the hunks or by dropping the skip: the reviewed intent is recorded here.
// UnprefixedTablesGuard::renameSql() is a pure function (it reads only its arguments, never $this), so it is
// intentionally `static`; an instance method would imply state it does not have.
LocallyCalledStaticMethodToNonStaticRector::class => [
__DIR__ . '/src/Doctrine/UnprefixedTablesGuard.php',
],
// The explicit `null` in `$this->registry(new MariaDBPlatform(), [], null)` documents the case under test (no
// server version is reported, and MariaDB must never ask the server); dropping it would read as if that
// argument were irrelevant, when it is the whole point of the test.
RemoveNullArgOnNullDefaultParamRector::class => [
__DIR__ . '/tests/Unit/Doctrine/BinaryKeyCollationSubscriberTest.php',
],
]);