Question about package versions in composer
- materix
- Backer | 83
I do not have much advanced experience with composer.
I choose to install (require) nette\caching ver. 2.5.9 because it only requires PHP 5.6 (old server, long story).
But when I install nette\caching it also installs nette\finder ver. 2.5.3, which requires PHP 7.1.
What am I missing?
- nightfish
- Member | 517
@materix Probably your Composer does not know that you are targeting PHP 5.6. Are you running Composer on PHP 5.6 or on a newer version?
If the latter is the case, you can force Composer to consider only packages
and their versions compatible with PHP 5.6 by using
"platform": {"php": "5.6"}
in your composer.json
. See
docs for more information.
- Marek Bartoš
- Nette Blogger | 1263
“platform”: {“php”: “5.6”}
Less problematic is to use 5.6.20
. Libs sometime require bugfix
php version to prevent the bug and 5.6
won't install because it
means 5.6.0