Composer, travis-ci Zend and php versions 7.0 - 7.2

xerkus solution is 100% correct and you should definitely drop 7.0.

But in case if you stumble on a similar situation in the future, one way to solve it would be to generate composer.lock with the oldest PHP version. So instead of the usual:

composer update

you should do something like:

php7.0 `which composer` update

or maybe restart from scratch:

rm -rf vendor/ composer.lock && php7.0 `which composer` install

This would call composer with php7.0 and create a working lock file for 7.0. Then if you are lucky, those locked dependencies will also be compatible with PHP 7.2. But it’s entirely up to the packages you depend on, so it might, or might not, work.

The obvious downside to this is that you explicitly forbid PHP 7.2 to use the newest packages and you are stuck on older packages that were compatible with both PHP 7.0 and 7.2. Depending on your use-case it might be acceptable…