[pkg-php-pear] Bug#802989: Bug#802989: Composer: ~5 translates badly as (>= 5) and (<< 1~~)

Mathieu Parent math.parent at gmail.com
Mon Oct 26 06:09:19 UTC 2015


2015-10-25 21:03 GMT+01:00 David Prévot <taffit at debian.org>:
> Package: pkg-php-tools
> Version: 1.30
> Severity: normal
>
> Hi,

Hi David,

> While looking at the latest (2.0.1) version of phpunit-dbunit (Vcs up to
> date, except the changelog entry), I noticed that the following entry in
> composer.json:
>
>     "require": {
>         […]
>         "phpunit/phpunit": "~5",
>
> was translated as “phpunit (>= 5), phpunit (<< 1~~)” by dh_phpcomposer,
> making the package uninstallable (even if phpunit 5 were available),
> instead of the expected “phpunit (>= 5), phpunit (<< 6~~)”.

Accorind to doc (https://getcomposer.org/doc/articles/versions.md#tilde):

Note: The ~ operator has an exception on its behavior for the major
release number. This means for example that ~1 is the same as ~1.0 as
it will not allow the major number to increase trying to keep
backwards compatibility.

> I haven’t tracked down the issue, sorry, but filling a bug report not to
> forget it.

Will fix and upload shortly (hopefully).

Regards
-- 
Mathieu



More information about the pkg-php-pear mailing list