Introduction to Composer
Composer and Magento
We use Composer for dependency management. Composer enables us to manage the Magento components and their dependencies.
As an integrator, you want to manage each of your Magento core components and third-party components using the Component Manager and System Upgrade.
To do so, you start by creating a Composer project from our metapackage. The metapackage installs each component so it can be centrally managed after installation.
Composer provides you with the following advantages:
- Enables you to reuse third-party libraries without bundling them with source code
- Component-based architecture with robust dependency management
- Manages dependencies to reduce extension conflicts and compatibility issues
- Versioned dependencies
- Semantic versioning
- Supports the PHP Framework Interoperability standard
Links to Magento code
The key to developing any Magento component
composer.json, which specifies version and dependency information for a component, among other things. You can look at Magento 2 code, such as:
- Metapackage, look at
<your Magento install dir>/composer.json.
- Customer module
- Luma theme
- en_us language package
For more information
For more information about Composer, see the Composer documentation.