<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Le dim. 20 sept. 2015 à 00:07, Hugues Peccatte <<a href="mailto:hugues.peccatte@gmail.com">hugues.peccatte@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I just saw that in our composer.json, the dependencies in require-dev section are using ">=".</div><div>Composer deals with version number, considering that projects are following semantic versioning (see <a href="http://semver.org/" target="_blank">http://semver.org/</a>). And in this "standard", there is one important thing: "Given a version number MAJOR.MINOR.PATCH, increment the MAJOR version when you make incompatible API changes". That means that 4.8 (current version) of PHPUnit might not be compatible with 3.7, while an hypothetical 3.50 should be compatible. (In reality… 3.7.7 is the last, for now.)</div><div>Knowing this, and to be sure that we won't have bad surprises, shouldn't we use "~3.7"? And so replace:</div><div><div><i>    "require-dev": {</i></div><div><i>        "satooshi/php-coveralls": ">=0.6",</i></div><div><i>        "phpunit/phpunit": ">=3.7",</i></div><div><i>        "phpunit/phpunit-selenium": ">=1.2",</i></div><div><i>        "squizlabs/php_codesniffer": "2.*"</i></div><div><i>    },</i></div></div><div>by</div><div><div><i>    "require-dev": {</i></div><div><i>        "satooshi/php-coveralls": "~0.6",</i></div><div><i>        "phpunit/phpunit": "~3.7",</i></div><div><i>        "phpunit/phpunit-selenium": "~1.2",</i></div><div><i>        "squizlabs/php_codesniffer": "2.*"</i></div><div><i>    },</i></div></div><div>?</div><div>And if we really want to use PHPUnit 4.*, so let's fill the version with "~4.8".</div><div>All these dependencies are for dev, so this won't be a big deal if versions are not compatible, but this could leads to errors with PHPUnit the day it will have an incompatible version.</div><div><br></div><div>What do you think about this?</div><div><br></div><div>Thanks for your feedbacks,</div><div>H.</div></div></blockquote><div><br></div><div>I forgot the link about the "~": <a href="https://getcomposer.org/doc/articles/versions.md#tilde">https://getcomposer.org/doc/articles/versions.md#tilde</a></div><div>The "^" may also be interesting. But I think that it is useless for us, until we only limit version to minor version number and not to patch.</div><div><br></div><div>H.</div></div></div>