Description
Preconditions and environment
- Magento Open Source 2.4.7
Steps to reproduce
This file has a dependency on Magento_Csp: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Paypal/Model/Config.php#L9
However it's not listed in the modules module.xml.
Expected result
Do not use Magento_Csp in module, or declare it as a dependency in the module.xml
Actual result
When Magento_Csp is disabled product detail pages throw an error because of the missing dependency:
==> exception.log <==
[2024-05-28T09:50:40.591031+00:00] main.CRITICAL: Error: Cannot instantiate interface Magento\Csp\Model\Collector\MergerInterface in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#1 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#2 vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get()
#3 vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#4 vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get()
#5 vendor/magento/framework/ObjectManager/ObjectManager.php(73): Magento\Framework\ObjectManager\Factory\Compiled->create()
#6 vendor/magento/module-paypal/Model/Config.php(642): Magento\Framework\ObjectManager\ObjectManager->get()
#7 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Paypal\Model\Config->__construct()
#8 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#9 vendor/magento/framework/ObjectManager/ObjectManager.php(59): Magento\Framework\ObjectManager\Factory\Compiled->create()
#10 generated/code/Magento/Paypal/Model/ConfigFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create()
#11 vendor/magento/module-paypal/Model/PayLaterConfig.php(46): Magento\Paypal\Model\ConfigFactory->create()
Additional information
As Magento_Csp
module cannot be disabled with 2.4.7 as it is tightly integrated, this issue can be reproduced by disabling the Magento_Csp
module in 2.4.6 and upgrade it to 2.4.7.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.