Magento 2 branches, composer packages and sample data

Right after Merchant Beta release, we changed our Continues Delivery approach. We decided to be completely open and do pushes immediately, as we are doing development, in public github. Yes, we still do coding in internal github[hidden by firewall and intranet], and then we do merge to public. It may looks like not ideal solution, but it works for all of us at the moment. Maybe in future we will move our development to public github, but it will be in future.

At the moment we have 2 ways to get Magento 2 code delivered to developers: github and composer packages. While i prefer github, our recommended way to use composer.

Github & Composer

In Magento 2 github we have 2 main branches:

Master branch – has stable official releases (currently 1.0.0-beta), recommended one. I don’t want go deep in stability term, but we do invest good amount of time & quality efforts to make it stable.

Develop branch – is our main development branch. Teams (and we have 15!!! teams are working on Magento 2) do their everyday/hour/minute commits, after story/task/bug completed, tested, reviewed and of course all mandatory builds are green. And yes – it may not be stable, even if our builds are green. Biggest difference between Master and Develop branches are: for Develop we are using “mandatory” builds validation, and for Master we do full list of testing, builds, including manual regression testing.

Github is pure expert-level developer’s way to get Magento 2. We still recommend to use composer installer to get latest stable build (1.0.0-beta as for now). But the way –  master branch has the same code as latest composer package.

At the moment we are using repository to store our packages, and Master branch to create the packages. We DO NOT USE Develop branch to build composer package, because we do everyday commits there.

Sample Data

Until 9/14/2015 only way to get sample data was composer. But because we do massive development and because sample data package depends on few Magento modules, which are changing – it was not possible (or possible, but not easy) to get sample data running on latest code from develop branch. Develop branch code is not packaged in composer and it does not have any specific version, which may be used by sample-data package as dependency. As soon as we have changes made in code of sample data or in depended Magento module, we would need to create new package and new version for sample data, and as result we would need to package Magento 2 modules again with the latest changes and newer version. So – it was recursion, which we decided to resolve in different way.

In order to provide sample data for developers, who are using develop branch and latest code via github, we have opened sample date code and published in into github sample data repo. In Readme.MD file there is complete instruction how to install sample data on existing Magento 2 instance, or with new installation Magento 2 by using either composer (only for 1.0.0-beta) or Github (latest develop code).

I did sample data installation by my own few times, and can ensure you – it works!

P.S. it was long time since last post, but it because recently i had 2 biggest events in my recent life 🙂 I became a father of very cute girl Alisa, and three of us (Anna, Alisa and myself) moved to Austin, TX.


3 thoughts on “Magento 2 branches, composer packages and sample data

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s