{"data":{"id":"magento2-40081","source":"github-pr","sourceRef":"magento/magento2#40081","title":"Log undeclared plugin only if it is not disabled","pr":{"number":40081,"url":"https://github.com/magento/magento2/pull/40081","author":"thomas-kl1","mergedAt":"2025-09-09T11:04:43Z","mergeCommit":"aaf530fcffddf790e11c4677c04d3c4b5d13da9e","headCommit":"471b82ef2362751be5ce0ae387525061356bbfdb","baseRef":"2.4-develop","diffSha256":"af443eb7b4d187a83a29ecfe0647ef60237afb6786d8678a429803e743b00e5e"},"issues":[{"number":40086,"url":"https://github.com/magento/magento2/issues/40086","title":"[Issue] Log undeclared plugin only if it is not disabled","labels":["Area: Framework","Component: Framework/ObjectManager","Issue: Confirmed","Priority: P2","Progress: done","Reproduced on 2.4.x","Triage: Dev.Experience"],"kind":"pr-derived"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":null,"codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10","2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/framework"],"files":[{"path":"lib/internal/Magento/Framework/Interception/PluginListGenerator.php","change":"modified","package":"magento/framework"}],"stripped":{"tests":[],"docs":[],"outsideCode":["app/etc/di.xml"]},"linesChanged":139,"mergeBatched":false,"excluded":null,"sections":{"description":"Developer may disable a plugin from module (A) with a third party module (B).\nThe plugin is referenced in di.xml thanks to its name and the attribute \"disabled\" is set to 'true'. The attribute \"type\" is not set.\nIf 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.\nIndeed, we should only log the plugin who are actually undeclared and not used (enabled and missing instance).","stepsToReproduce":"Module A:\n```\n<type name=\"Magento\\SalesRule\\Model\\Rule\\Condition\\Product\">\n    <plugin name=\"Foo_Bar::Conditions\" type=\"Foo\\Bar\\Plugin\\Condition\\Product\"/>\n</type>\n```\n\nRemove the plugin declaration from module A (above declaration).\n\nModule B (with sequence on Module A):\n```\n<type name=\"Magento\\SalesRule\\Model\\Rule\\Condition\\Product\">\n    <plugin name=\"Foo_Bar::Conditions\" disabled=\"true\"/>\n</type>\n```\n\n**Expected**: no logs.\n\n**Actual**: logs entries:\n\n> [2025-07-18T12:18:49.535562+00:00] main.INFO: Reference to undeclared plugin with name 'Foo_Bar::Conditions'. [] []","expectedResult":null,"actualResult":null,"source":"pr"},"signatures":[],"labels":{"area":["Framework"],"component":["Framework/ObjectManager"],"priority":"P2","severity":null,"reportedOn":[]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"9414bc2f4551b0d91ed9d3d1efcf00c71b67d28e62544ec6b8ea7332d8eab98b","isBugfix":0.8457,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.8661,"feature":0.0099,"refactor":0.1088,"tests_only":0.0069,"docs_only":0.0039,"dependency":0.0044},"confidence":0.7145},"scope":{"score":1.3282,"probabilities":{"0":0.1097,"1":0.4525,"2":0.4378},"confidence":0.1127},"risk":{"score":0.6201,"probabilities":{"0":0.4598,"1":0.4603,"2":0.0799},"confidence":0.1445},"area":{"choice":"framework","probabilities":{"catalog":0.0046,"checkout":0.0042,"customer":0.0034,"admin":0.0059,"graphql_api":0.0033,"framework":0.967,"frontend":0.0053,"other":0.0063},"confidence":0.9261},"securityRelevant":0.006,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.003,"2.4.0-p1":0.0031,"2.4.1":0.0031,"2.4.1-p1":0.0031,"2.4.2":0.0038,"2.4.2-p1":0.0035,"2.4.2-p2":0.0046,"2.4.3":0.0059,"2.4.3-p1":0.0068,"2.4.3-p2":0.0086,"2.4.3-p3":0.0052,"2.4.4":0.0084,"2.4.4-p1":0.0061,"2.4.4-p10":0.0055,"2.4.4-p11":0.0062,"2.4.4-p12":0.0057,"2.4.4-p13":0.0066,"2.4.4-p14":0.0071,"2.4.4-p15":0.0053,"2.4.4-p16":0.0067,"2.4.4-p17":0.0054,"2.4.4-p18":0.005,"2.4.4-p2":0.0022,"2.4.4-p3":0.0022,"2.4.4-p4":0.0025,"2.4.4-p5":0.0032,"2.4.4-p6":0.0039,"2.4.4-p7":0.0032,"2.4.4-p8":0.0041,"2.4.4-p9":0.0031,"2.4.5":0.0114,"2.4.5-p1":0.0085,"2.4.5-p10":0.006,"2.4.5-p11":0.0107,"2.4.5-p12":0.009,"2.4.5-p13":0.0069,"2.4.5-p14":0.0089,"2.4.5-p15":0.0069,"2.4.5-p16":0.0086,"2.4.5-p17":0.0069,"2.4.5-p2":0.0032,"2.4.5-p3":0.0045,"2.4.5-p4":0.0045,"2.4.5-p5":0.0041,"2.4.5-p6":0.0051,"2.4.5-p7":0.0065,"2.4.5-p8":0.0048,"2.4.5-p9":0.0042,"2.4.6":0.0241,"2.4.6-p1":0.0159,"2.4.6-p10":0.0103,"2.4.6-p11":0.0122,"2.4.6-p12":0.0134,"2.4.6-p13":0.0115,"2.4.6-p14":0.0111,"2.4.6-p15":0.0096,"2.4.6-p2":0.0036,"2.4.6-p3":0.0059,"2.4.6-p4":0.0071,"2.4.6-p5":0.0061,"2.4.6-p6":0.0107,"2.4.6-p7":0.0087,"2.4.6-p8":0.0062,"2.4.6-p9":0.0044,"2.4.7":0.0242,"2.4.7-p1":0.021,"2.4.7-p10":0.0117,"2.4.7-p2":0.007,"2.4.7-p3":0.0174,"2.4.7-p4":0.0137,"2.4.7-p5":0.0142,"2.4.7-p6":0.0191,"2.4.7-p7":0.0159,"2.4.7-p8":0.0123,"2.4.7-p9":0.0077,"2.4.8":0.0392,"2.4.8-p1":0.0294,"2.4.8-p2":0.0232,"2.4.8-p3":0.0232,"2.4.8-p4":0.0195,"2.4.8-p5":0.018,"2.4.9":0.0354,"unspecified":0.2233},"confidence":0.0503},"backportWorthy":{"score":1.1223,"probabilities":{"0":0.2672,"1":0.3433,"2":0.3895},"confidence":0.0114}},"curated":{"title":"Fixes log noise for plugins disabled in di.xml whose original module was removed","description":"When module B disables a plugin of module A in di.xml and module A is removed, Magento logs \"Reference to undeclared plugin\" at info level, flooding the logs with false positive cases. PluginListGenerator::filterPlugins now logs at debug level, and only when the plugin is not disabled or the app is in Developer mode.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40081 details"}