[2.4-develop] Cannot instantiate Magento\Framework\MessageQueue\ConfigInterface if optional module Magento_MessageQueue is disabled #26080
Labels
Component: MessageQueue
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Priority: P2
A defect with this priority could have functionality issues which are not to expectations.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Severity: S2
Major restrictions or short-term circumventions are required until a fix is available.
Triage: Dev.Experience
Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Summary (*)
Steps:
Expected result: Magento installed okay.
Actual result (web setup): dies silently, progress stopped at Magento_Amqp installation
Actual result (via php bin/magento setup:install): Error during installation
Examples (*)
Concrete class for the aforementioned
Magento\Framework\MessageQueue\ConfigInterface
is declared inapp/code/Magento/MessageQueue/etc/di.xml
:Which is fine by itself, except two classes in the Magento_Amqp module rely on this interface, yet Magento_Amqp does not declare any dependencies on Magento_MessageQueue module.
Proposed solution
a) quick workaround for anyone seeing this on their local machine: please either disable Magento_Amqp module or enable Magento_MessageQueue module and try again.
b) declare this dependency from inside Magento_Amqp module via module.xml, composer.json so that the setup would detect and detect this issue at the module selection step
c) move the di.xml entry to the global
app/etc/di.xml
since involves two framework classes anywayd) long-term goal: since
Magento\Framework\MessageQueue\ConfigInterface
is marked as deprecated, its usages in Magento_Amqp should be removed from the classes completely. This will probably be a breaking change (removal of argument from constructor), but I assume it is not a problem for 2.4-develop branch?Please let me know which solution is preferred (I might have some spare time to go forward with it and provide a Pull Request a bit later)
The text was updated successfully, but these errors were encountered: