Exit AD0-E722 Adobe Commerce Architect Master
Question 1 of 5
0% complete
Q1 Single choice

While developing a new functionality for a website in developer mode with all cache types enabled, an Adobe Commerce Developer needs to add \Magento\Sales\Model\Service\InvoiceService SinvoiceService as a new dependency to an existing page action controller in Vendor\CustomModule\Controller\Index
\Index . This is accomplished as follows:

After cleaning the f ull_page cache and reloading the page, the developer encounters the following exception:

Recoverable Error: Argument 2 passed to Vendor\CustomModule\Controller\Index\Index::__construct() must be an instance of

\Magento\Sales\Model\Service\InvoiceService [...

] Which action should the Architect recommend to the developer to fix this error?

  • A

    Clean the block_html cache along with full_page cache.

  • B

    Add the new \Magento\sales\Model\service\invoiceService Sinvoiceservice dependency at the end of the constructor signature.

  • C

    Remove the generated Child ClaSS from generated/code/Vendor/CustomModule/Controller/Index/
    Index.

Previous Next