Magento 2 Certification Questions List | How magento 2 merge di.xml

A module contains the following files:

ModuleA/
|-- etc/
 |-- di.xml
 |-- frontend/
   |-- di.xml

When a visitor is browsing the frontend of the website, what happenes if a similar XML directive is specified in both di.xml files above?

Answer:
  • The two di.xml files are merged with etc/frontend/di.xml taking precedence.
Prepear for Magento 2 certefication with our interactive quiz