-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This issue is automatically created based on existing pull request: #40081: Log undeclared plugin only if it is not disabled
Description (*)
Developer may disable a plugin from module (A) with a third party module (B).
The plugin is referenced in di.xml thanks to its name and the attribute "disabled" is set to 'true'. The attribute "type" is not set.
If the module (A) is removed, and the referenced plugin in module (B) is not removed, Magento will report this as an error (info level) in the logs. This has effect to flood the logs with false positive cases.
Indeed, we should only log the plugin who are actually undeclared and not used (enabled and missing instance).
Manual testing scenarios (*)
Module A:
<type name="Magento\SalesRule\Model\Rule\Condition\Product">
<plugin name="Foo_Bar::Conditions" type="Foo\Bar\Plugin\Condition\Product"/>
</type>
Remove the plugin declaration from module A (above declaration).
Module B (with sequence on Module A):
<type name="Magento\SalesRule\Model\Rule\Condition\Product">
<plugin name="Foo_Bar::Conditions" disabled="true"/>
</type>
Expected: no logs.
Actual: logs entries:
[2025-07-18T12:18:49.535562+00:00] main.INFO: Reference to undeclared plugin with name 'Foo_Bar::Conditions'. [] []
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status