12. Composer Adoption Obstacles in 1.x
• Monolith CE Composer package
• Files not in one directory:
– Module files
– Theme & skin files
• Versioning:
– Not strict release version
– No module API version
– No theme version
– No locale version
magento/core
1.9.0.1
Feature Modules
Magento libraries
3rd party libraries
Design themes/skins
Localizations
composer.json
19. Module Versioning in Magento 2
• Composer promotes semantic versioning
semver.org
• Adoption of Semantic Version 2.0.0
<major>.<minor>.<patch>[-<suffix>]
<major> – Incompatible API changes
<minor> – Add functionality in BC manner
<patch> – BC bug fixes
<suffix> – Stability
20. Module Version Declaration
Magento 1.x
config.xml
app/code/<pool>/<Namespace>/<Module>/
etc/
Magento 2
module.xml
app/code/<Vendor>/<Module>/
etc/
composer.json
Version, not semantic
DB schema version
API version, semantic
21. Module Dependencies Declaration
Magento 1.x
<Namespace>_<Module>.xml
app/etc/
modules/
Magento 2
module.xml
app/code/<Vendor>/<Module>/
etc/
composer.json
Dependencies
ordered, not versioned
Modules sort order
Dependencies
not ordered, versioned
22. Magento 2 Repositories
• Source code of Community Edition
github.com/magento/magento2
• Composer project for Community Edition
github.com/magento/magento2-community-edition
25. Magento 2 Release Schedule
Q4 2014 – Dev Beta Released Dec 17, 2014
Q1 2015 – Dev RC Released Mar 23, 2015
Q3 2015 – Merchant Beta
Q4 2015 – Merchant GA
Because Magento won’t even notice packages downloaded by Composer into file system
Application won’t notice files managed by Composer
Plugin developed by community at Magento bugathon
Plugin is published at Packagist
Release version influenced by marketing
Not semantic module versioning
DB schema version, but no module API version
Single Composer package for CE release
Magento 2 Dev Beta (released Dec 17, 2014) comes with the Composer adoption
Self-contained modules/themes – all files in one directory
Forked the hackathon Composer plugin for Magento 1.x to adopt for Magento 2
Forked the hackathon Composer plugin for Magento 1.x to adopt for Magento 2
Forked the hackathon Composer plugin for Magento 1.x to adopt for Magento 2
BC – backward-compatibility
<suffix> – dev, patch/p, alpha/a, beta/b, RC
PHP library dependencies, such as Imagemagic, Mcrypt, etc.
Theme dependencies on 3rd party libs, such as Angular.js, jQuery carousel, etc.