Repository navigation
docs: state that installed extensions are not read - #19
Merged
Merged
Conversation
A hook or plugin for a module the site does not install counts as used, since the package never reads core.extension.yml. The README did not say so. Add it to the limitations by design, with the reason. The reason is dpl-web's history up to 2026-10-02. Of 20 removals from its core.extension.yml, nine were uninstalls; the rest were installed again or moved to config_exclude_modules. Each time the integration code went before or with the uninstall: - address_dawa: its formatter was removed in a refactor months before. - gsearch: the uninstalling PR removed a formatter extending AddressGsearchFormatter, its interface uses and its config reads. On develop, only one-off update and deploy functions still name an uninstalled module. None of its 345 hook implementations, class references or event subscribers serve one. Reading the list would also cost more than parsing one file: - Hook owners come from core's and contrib's *.api.php files, outside the analysed paths. - Pattern hooks such as form_FORM_ID_alter need form IDs, theme hooks and entity types mapped to modules; matching names gives false hits. - Procedural hooks are functions, which dead-code-detector does not report. Assisted-by: Claude <noreply@anthropic.com>
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.
The package never reads
core.extension.yml, so a hook or plugin for a module the site does not install counts as used. The README did not say so.This adds it to the limitations by design, with the reason: on the sites measured, such code was deleted together with the module, so detecting leftovers is not worth reading configuration and mapping each hook to the module that defines it.
The evidence is dpl-web's history up to 2026-10-02:
core.extension.yml, nine were uninstalls. The rest were installed again or moved toconfig_exclude_modules.AddressGsearchFormatter, its interface uses and its config reads.develop, none of its 345 hook implementations, class references or event subscribers serve an uninstalled module. Only one-off update and deploy functions still name one.Reading the list would also take more than parsing one file: hook owners come from core's and contrib's
*.api.phpoutside the analysed paths, pattern hooks such asform_FORM_ID_alterneed form IDs, theme hooks and entity types mapped to modules, and procedural hooks are functions, which dead-code-detector does not report.Verified locally:
make checksandmake lint-commitspass.