Make the five always-on legacy rules configurable and fix a wrong error identifier - #1029
Merged
Conversation
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
August 5, 2026 16:20
a84e67e to
5a205bc
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
August 5, 2026 16:44
5a205bc to
172090a
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
August 5, 2026 17:15
172090a to
0396c17
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
August 5, 2026 19:13
0396c17 to
4843df6
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
August 5, 2026 19:33
4843df6 to
54ac02c
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
September 8, 2026 17:42
54ac02c to
9e04855
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
September 8, 2026 18:14
9e04855 to
b2de393
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
September 8, 2026 18:27
b2de393 to
488d6a9
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
2 times, most recently
from
September 8, 2026 18:59
134a974 to
34def2c
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
2 times, most recently
from
September 8, 2026 19:47
487b2f9 to
cf96ccf
Compare
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
September 9, 2026 01:08
cf96ccf to
a9fe51c
Compare
…or identifier DiscouragedFunctionsRule, GlobalDrupalDependencyInjectionRule, PluginManagerSetsCacheBackendRule, ModuleLoadInclude, and LoadIncludes move from the flat rules: block to the conditionalTags registration all newer rules use, gated on new drupal.rules.* parameters that default to true. Behavior is unchanged; consumers gain a per-rule opt-out. The 'must override __construct' message in PluginManagerInspectionRule was reported under pluginManagerInspection.callAlterInfo, which belongs to a different check. It is now pluginManagerInspection.constructorOverrideMissing. Anyone ignoring the old identifier for this message must update their configuration. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mglaman
force-pushed
the
audit/4-bc-changes
branch
from
September 9, 2026 14:24
a9fe51c to
31d1b9f
Compare
mglaman
marked this pull request as ready for review
September 9, 2026 14:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 8 of 9 in the legacy-code audit stack. One change that deserves release-note visibility and one small correctness fix.
What changed
Five always-on rules become configurable.
DiscouragedFunctionsRule,GlobalDrupalDependencyInjectionRule,PluginManagerSetsCacheBackendRule,ModuleLoadInclude, andLoadIncludesmove from the flatrules:block to theconditionalTagsregistration every newer rule uses, gated on newdrupal.rules.*parameters. They default to true, so nothing changes for existing users — they gain a per-rule opt-out, documented in the README.Wrong error identifier fixed. The "
%s must override __construct if using YAML plugins." message inPluginManagerInspectionRulewas reported underpluginManagerInspection.callAlterInfo, which belongs to a different check. It is nowpluginManagerInspection.constructorOverrideMissing. No upgrade step is needed: since #1027 the rule only inspects classes that declare their own constructor, so this message cannot currently be reported and nobody has anignoreErrorsentry for it. Removing the unreachable branch is a separate follow-up.Testing
Full suite, self-analysis, and phpcs are green.
🤖 Generated with Claude Code