Skip to content

Custom module structure - Composer dependencies #3595

@jsakars

Description

@jsakars

Having custom vendor module e.g. Acme_Demo located in app/code/Acme/Demo it's not clear how it's composer.json should be utilized.
Based on Create your component file structure - composer.json: Specifies component dependencies. For more information, see Composer integration.

Let's say Acme_Demo has a dependency on cocur/slugify - so naturally You would specify such dependency in app/code/Acme/Demo/composer.json.

Given such scenario(which is basically for all custom modules You would buy/get from custom vendors unless they put it for free on Packagist):

  • custom module dependencies must be defined in it's own composer.json(how Composer is intended to be used)
  • to actually get it working You would need to define the same dependencies in Your root composer.json

So the questions:

  • How should custom modules composer.json be utilized?
  • What is the M2 idea of Composer integration with custom modules and resolving their dependencies?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions