Dependencies in Magento 2

There are two types of dependencies in magento 2.

Hard Dependencies:
Hard dependencies refers that a module can not be run with other dependencies on which it dependes.

Soft Dependencies:
Soft dependencies refers that a module can function without other dependencies on which it dependes.

There are three main steps for managing module dependencies.
1- Define the name and declare the module in module.xml file
2- Declare any other dependencies that the module has on other module in composer.json file.
3- Define the Sequences / Load Order in module.xml It is not always important.

About Ejaz Alam

A Software Engineer who Believes in a simple lifestyle and follow a simple logic to make himself better than yesterday. :)

View all posts by Ejaz Alam →

Leave a Reply

Your email address will not be published. Required fields are marked *