magento / magento/magento2

Consumers & ObjectManager & Area code issue

Open
#37,726 5 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Area: Framework Component: Amqp Issue: Confirmed Priority: P2 Progress: PR in progress Reported on 2.4.6-p1 Reproduced on 2.4.x Triage: Dev.Experience
Dominant language
PHP
Stars
12.2k
Forks
9.4k
PR merge metrics
No merged PRs in 30d

Description

Preconditions and environment
  • Magento version 2.4.6-p1
  • AMQP
Steps to reproduce
  1. Create a consumer that try to create an object : ObjectManager::getInstance()->create(CustomClass::class)
  2. Add an \Magento\Catalog\Model\Product\Copier argument to CustomClass constructor
  3. bin/magento queue:consumers:start your-consumer --area-code=adminhtml
  4. dispatch a message on queue
Expected result

nothing happens

Actual result

Cannot instantiate interface Magento\Catalog\Model\Product\CopyConstructorInterface

Additional information

No response

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”.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.