AD0-E724 · Question #19
What file is used to define module dependencies in Adobe Commerce?
The correct answer is D. 'composer.json'. composer.json defines module dependencies in Adobe Commerce because it is the standard PHP package manifest used by Composer, the dependency manager for PHP projects - it specifies which other modules, libraries, or packages a module requires to function. While etc/di.xml handles
Question
What file is used to define module dependencies in Adobe Commerce?
Options
- A'etc/di.xml'
- B'registration.php'
- C'module.xml'
- D'composer.json'
How the community answered
(25 responses)- A4% (1)
- B8% (2)
- C4% (1)
- D84% (21)
Explanation
composer.json defines module dependencies in Adobe Commerce because it is the standard PHP package manifest used by Composer, the dependency manager for PHP projects - it specifies which other modules, libraries, or packages a module requires to function. While etc/di.xml handles dependency injection configuration (wiring classes together at runtime), it does not declare module-level package dependencies. registration.php simply registers the module with the Magento framework so it can be discovered, and module.xml (located in etc/) declares the module's name and sequence (load order relative to other modules), not its package dependencies.
Memory tip: Think "Composer = Component dependencies" - whenever you need to pull in external packages or other modules as requirements, that's Composer's job via composer.json.
Topics
Community Discussion
No community discussion yet for this question.