atoum / atoum

The modern, simple and intuitive PHP unit testing framework.
http://atoum.org
Other
1.44k stars 147 forks source link

Branch-alias #375

Closed stephpy closed 9 years ago

stephpy commented 9 years ago

Hi, since we use semver and composer, i think we could benefits of the branch-alias system to allow our users to use developement version of atoum without being afraid of a bc break.

1st point, if we follow semver, branch-aliases like 1.x-dev suffices, we have not to use 1.0.x-dev or any Y level since each commits of X level are BC.

Firstly, we introduce tags, but we have not to force user to use tags, if they want to use development version of atoum, they can. And it's a good thing because this is theses guys which will return use errors between we tag a bad version.

Case without a branch alias

user1 has dependency on atoum/atoum: ~1.0
user2 has dependency on atoum/atoum: dev-master

atoum lives his life and versions 1.0.1, 1.1.0, ... are released.

But we introduce a BC break, and now, all new tags will be 2.y.z BUT, in our case, user2 will be impacted by this BC break. Its tests now are failing ... He'll have to update its tests or to make a dependency on ~1.0 ...

Case WITH a branch alias

user1 has dependency on atoum/atoum: ~1.0
user2 has dependency on atoum/atoum: 1.*@dev

We introduce a BC break, when we commit it, we increment branch-alias in composer.json because we know all new versions will be 2.x-dev.

User2 tests will still be ok, because branch 1.*@devis no more exist, and it'll be resolved by last tag of 1.x.

User2 can continue to work and migrate to atoum/atoum 2.*@dev when he want.

The cost of this feature is ridiculous, you'll have to increment the branch-alias of composer.json when you'll introduce a bc break.

jubianchi commented 9 years ago

:+1:

Hywan commented 9 years ago

:+1: for me also. Same system @stephpy already introduced in Hoa and it works great! Bullet proof.

stephpy commented 9 years ago

I closed it in favor of https://github.com/atoum/atoum/pull/376 :)