Skip to content

Remove HTMLAverseRectorInterface, inline containsHTML() guard in rules - #8618

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-remove-html-averse
Oct 11, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-remove-html-averse

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Drop the HTMLAverseRectorInterface marker and the centralized HTML filtering in RectorRegistry::forFile().

Each of the 7 rules that were HTML-averse now guards itself at the top of refactor():

if ($this->getFile()->containsHTML()) {
    return null;
}

This keeps the skip-on-HTML behavior local to each rule, removes the marker interface indirection, and simplifies RectorRegistry (forFile(File) -> getRectors()).

@TomasVotruba
TomasVotruba merged commit 5911691 into main Oct 11, 2026
64 of 74 checks passed
@TomasVotruba
TomasVotruba deleted the tv-remove-html-averse branch October 11, 2026 09:47
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