-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Magento_Paypal module has dependency on Magento_Csp module #38764
Copy link
Copy link
Open
Labels
Area: FrameworkComponent: CspIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.7Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Metadata
Metadata
Assignees
Labels
Area: FrameworkComponent: CspIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.7Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Preconditions and environment
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_Cspmodule cannot be disabled with 2.4.7 as it is tightly integrated, this issue can be reproduced by disabling theMagento_Cspmodule in 2.4.6 and upgrade it to 2.4.7.Release note
No response
Triage and priority