php-semver icon indicating copy to clipboard operation
php-semver copied to clipboard

Tilde version range

Open konradmichalik opened this issue 7 years ago • 0 comments

I got some problems with version comparisons.

$range = new expression('~4.1');
$range->satisfiedBy(new version('4.9.6')); //false -> should be true

The tilde operator should work like the following example from composer: ~1.2 is equivalent to >=1.2 <2.0.0. It's like you documented in your Readme, but it's actually not working.

konradmichalik avatar Jul 09 '18 09:07 konradmichalik