Skip to content

[cleanup] remove unused RelatedConfigInterface, fix couple phpstan errors - #8395

Merged
TomasVotruba merged 9 commits into
mainfrom
tv-phpstan-5
Aug 29, 2026
Merged

[cleanup] remove unused RelatedConfigInterface, fix couple phpstan errors#8395
TomasVotruba merged 9 commits into
mainfrom
tv-phpstan-5

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Aug 28, 2026

Copy link
Copy Markdown
Member

No description provided.

@TomasVotruba TomasVotruba changed the title tv phpstan 5 [cleanup] remove unused RelatedConfigInterface, fix couple phpstan errors Aug 28, 2026
@TomasVotruba
TomasVotruba force-pushed the tv-phpstan-5 branch 2 times, most recently from c72c321 to bbd0854 Compare August 29, 2026 08:36
@TomasVotruba
TomasVotruba merged commit 22dd273 into main Aug 29, 2026
87 of 88 checks passed
@TomasVotruba
TomasVotruba deleted the tv-phpstan-5 branch August 29, 2026 08:38
SanderMuller added a commit to hihaho/rector-rules that referenced this pull request Aug 31, 2026
rectorphp/rector-src#8395 deleted `RelatedConfigInterface` and the
`RectorConfig` block that imported a rule's `getConfigFile()`. The suffix
rules implemented it, so loading them fatals on rector/rector 2.6.5:

    Interface "Rector\Contract\DependencyInjection\RelatedConfigInterface" not found

Dropping the `implements` alone would be a silent downgrade — the config it
pulled in (`config/related/rename-propagation.php`) was the only thing binding
`SuffixRenameMap` as a singleton and registering `RenameClassRector` and
`RenameDocBlockSeeTagRector`. Without it the rules rename declarations and
leave every reference and `@see`/`@link`/`@uses` tag dangling.

So the wiring moves to the package's own `config/config.php`, reached two ways:
`extra.rector.includes` (hence the new `rector/extension-installer` require —
its generated config is what `ExtensionConfigResolver` reads), and an explicit
import from `config/sets/naming.php` so the set works even where the plugin is
disallowed. Both are idempotent: `RectorConfig::rule()` records a class once.

Registering unconditionally is free — both rules short-circuit on an empty
rename map.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant