|
82 | 82 | use Rector\Rector\AbstractRector; |
83 | 83 | use Rector\Skipper\Skipper\Skipper; |
84 | 84 | use Rector\Skipper\Skipper\UsedSkipCollector; |
85 | | -use Rector\StaticTypeMapper\Contract\PhpParser\PhpParserNodeMapperInterface; |
86 | | -use Rector\StaticTypeMapper\PhpParser\ExprNodeMapper; |
87 | | -use Rector\StaticTypeMapper\PhpParser\FullyQualifiedNodeMapper; |
88 | | -use Rector\StaticTypeMapper\PhpParser\IdentifierNodeMapper; |
89 | | -use Rector\StaticTypeMapper\PhpParser\IntersectionTypeNodeMapper; |
90 | | -use Rector\StaticTypeMapper\PhpParser\NameNodeMapper; |
91 | | -use Rector\StaticTypeMapper\PhpParser\NullableTypeNodeMapper; |
92 | | -use Rector\StaticTypeMapper\PhpParser\StringNodeMapper; |
93 | | -use Rector\StaticTypeMapper\PhpParser\UnionTypeNodeMapper; |
94 | 85 | use Symfony\Component\Console\Application; |
95 | 86 | use Symfony\Component\Console\Style\SymfonyStyle; |
96 | 87 | use Webmozart\Assert\Assert; |
@@ -149,20 +140,6 @@ final class LazyContainerFactory |
149 | 140 | PhpVersionFactory::class, |
150 | 141 | ]; |
151 | 142 |
|
152 | | - /** |
153 | | - * @var array<class-string<PhpParserNodeMapperInterface>> |
154 | | - */ |
155 | | - private const array PHP_PARSER_NODE_MAPPER_CLASSES = [ |
156 | | - FullyQualifiedNodeMapper::class, |
157 | | - IdentifierNodeMapper::class, |
158 | | - IntersectionTypeNodeMapper::class, |
159 | | - NameNodeMapper::class, |
160 | | - NullableTypeNodeMapper::class, |
161 | | - StringNodeMapper::class, |
162 | | - UnionTypeNodeMapper::class, |
163 | | - ExprNodeMapper::class, |
164 | | - ]; |
165 | | - |
166 | 143 | /** |
167 | 144 | * @api used as next rectorConfig factory |
168 | 145 | */ |
@@ -309,11 +286,7 @@ static function (AbstractRector $rector) use ($rectorConfig): void { |
309 | 286 | } |
310 | 287 | ); |
311 | 288 |
|
312 | | - $this->registerTagged( |
313 | | - $rectorConfig, |
314 | | - self::PHP_PARSER_NODE_MAPPER_CLASSES, |
315 | | - PhpParserNodeMapperInterface::class |
316 | | - ); |
| 289 | + $rectorConfig->autodiscover(__DIR__ . '/../StaticTypeMapper/PhpParser'); |
317 | 290 |
|
318 | 291 | $this->registerTagged( |
319 | 292 | $rectorConfig, |
|
0 commit comments