Magento 2 Product and Composer Version Numbering

ComposerMagento 2 will support Composer for creating sites. Introducing Composer into Magento will impact the way version numbers work in Magento 2. Here is a high level summary of the changes.

Disclaimer: Details may change before final release based on feedback.  And of course, these opinions are my own and not necessarily that of my employer. (This is my private blog after all!)

Acknowledgements: There has been some great community efforts around Composer with Magento 1. Alan Storm wrote up a great post on Composer and the Hackathon efforts here. With 27 contributors already listed in GitHub, I am not going to mention all involved here! There was also a recent post on magenticians.com by Tim Bezhashvyly based on incomplete Magento 2 work pushed to GitHub. This was work Tim undertook on his own. Somehow I think Composer support in Magento 2 might get a lot of scrutiny from the community – which is a good thing! We want to get it right!

Composer Integration

The current plan is to have one Composer package per module, theme, and language pack. The framework will also be shipped using Composer. The goal is to get a first release out and then iterate. The libraries currently within the current Magento code base for example may stay initially and get pulled out later.

For Merchants, use of Composer will be hidden behind nice user interfaces. They will not need to know about the use of Composer. Hard core developers may choose to use Composer packages directly to construct a site if they wish. The use of Composer is targeted to help with creating a new site, adding extensions, and installing upgrades – moving a site from development to production is not a goal for Composer integration (although it might be useful in some cases here as well).

Extension developers will be expected to package their extensions as groups of Composer packages. For example, an extension could include two packages – a module plus a language pack. I suspect it will be common for an extension to be a single Composer package (a single module). Using Composer packages will give the best user experience when installing the extension.

Product Version Numbers

Products for now in Magento 2 are restricted to Magento Community Edition (CE) and Magento Enterprise Edition (EE). The version numbers of Editions are designed for use in discussions with Merchants. That is, major and minor increments to the version number will reflect the significance of changes to Merchants. This may or may not reflect equally significant changes to developers. Thus Composer package dependencies will not use product version numbers.

Composer Version Numbers

Magento 2 will use Composer to define dependency and compatibility between packages. The versioning numbers at this level will be driven by Engineering based on Semantic Versioning. This means these numbers will be different to the product version numbers. For example, a change from CE 2.0 to 2.1 could be more significant from an Engineering perspective and so involve a major version number change at the Composer package version number level.

Conclusions

In Magento 1 there was only one version number. In Magento 2 with moving to Composer this will formally separate into product version numbers and the Composer package version numbers. This could create some confusion, but the goal is that Merchants should not need to be concerned with Composer package version numbers – they are only relevant to developer level discussions.

The split is however necessary to support efforts such as better sharing of common code between CE and EE while allowing CE and EE to have separate version numbers. We have to keep the marketing team happy after all! 😉  It will hopefully also help extension developers as they can declare dependencies on the Engineering controlled semantic version numbers making it easier to detect extension conflicts or unsupported combinations of modules.

Oh, and I have purposefully left out some details here that are still being discussed. For example, would starting the Composer version number at 1.0.0 for the official release confuse people with Magento 1? How will release of patches change with the introduction of Composer? Where will the Composer packages for CE be hosted? What about EE? Can CE and EE share packages without invalidating legal license notices? Will Magento Connect be changed with the introduction of Composer? These topics are all being worked through. However my goal in these blog posts is to share tidbits of pretty stable information, so those topics can wait for another time.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.