On Thu, Jan 15, 2015 at 3:11 PM, Jan Ehrhardt <php...@ehrhardt.nl> wrote:
> Benjamin Eberlei in php.internals (Thu, 15 Jan 2015 15:53:43 +0100):
>>Not sure how that helps, since you would tag versions anyways using semver,
>>so if there is a master vs next/phpng branch, then they might still result
>>in two tags v1.0 and v2.0 and there is no way to automatically resolve this.
>
> The branch name convention was meant for those developers that want to
> maintain the same version for both PHP7 and PHP5.x. In thoese cases
> there is no difference in version tags. Just a git checkout -b phpng if
> you want the PHP7 branch.

I'll just write down my view of things here from a Composer
perspective, which is relevant assuming that eventually we'll get a
composer.json in extensions that would allow composer to "see"
extensions as packages and resolve them to an installable version
which pickle would then install.

The way I see it, the php5.x branch, no matter what it's called,
should require php 5.* in its composer.json, and it should for example
produce [1] releases in the 1.x range.

If you then make a php7-specific version, in that it does not compile
on php5 anymore, it can remain master or be a new branch it doesn't
matter so much but it should require php 7.0.* instead and start
producing 2.x releases because bumping your dependencies is a BC
break.

The way typical semver-abiding php projects would do this is to make
master the new 2.x producer and create a 1.x branch to keep
maintaining the 1.0 version.

If the master branch instead still compiles on php 5 AND 7 then it can
require "5.0 - 7.0" (equivalent to >= 5.0 and < 7.1) and keeps
producing 1.x releases.

It would be great to see pecl folks get more in line with semver and
using more normalized branch and tag names. I understand that pecl is
its own ecosystem and I come in out of nowhere and ask you to change,
but I really believe it's for the best in the longer term.

[1] in the sense that a branch produces releases since tags are made
out of a given branch usually.

-- 
Jordi Boggiano
@seldaek - http://nelm.io/jordi

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to