nerdexam
Adobe

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

Setup and Configuration

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)
  • A
    4% (1)
  • B
    8% (2)
  • C
    4% (1)
  • D
    84% (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

#module dependencies#composer.json#module structure#registration

Community Discussion

No community discussion yet for this question.

Full AD0-E724 Practice