40
loading...
This website collects cookies to deliver better user experience
conflict
, which is useful when third-party code you rely on is too permissive for your needs.Lists packages that conflict with this version of this package. They will not be allowed to be installed together with your package.
<1.0 >=1.1
in a conflict
link, this will state a conflict with all versions that are less than 1.0 and equal or newer than 1.1 at the same time, which is probably not what you want. You probably want to go for <1.0 || >=1.1
in this case.Dropping support for PHP older versions (check the PHP supported versions here)
Reflecting this change on .travis.yaml (a file that tells the CI platform how to create the environment to run your tests on)
Shifting the deps=low flag to the lowest supported PHP version in order to tell Composer to use the --prefer-lowest
flag when installing the dependencies.
deps=low
flag to PHP 7.2, we found the above issue. It was already there, but we hadn’t noticed as the flag was only on PHP 7.1, meaning that tests never ran against PHP 7.2 with lowest dependencies. As PHP 7.2 introduced a warning on certain count()
usages, our code didn’t manage to pass the tests.Warning: count(): Parameter must be an array or an object that implements Countable in /home/travis/build/sensiolabs/BehatPageObjectExtension/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 66
deps=low
and give up on this kind of tests or dig in the Composer manual and look for something that could possibly help us: you guessed right, conflict
is what we needed (thanks to jakzal!).conflict
you can force the minimum version of a dependency you cannot control directly, avoiding headaches or third party code forks.conflict
as shown in this article to block unsafe packages. Give it a look!