I'm developing with Zend 3* on a WAMP System.
Updating composer fails with an error message like this:
composer require zendframework/zend-crypt
- paragonie/random_compat v9.99.99 requires php ^7 -> your PHP version (5.6.31) does not satisfy that requirement.
- paragonie/random_compat v9.99.99 requires php ^7 -> your PHP version (5.6.31) does not satisfy that requirement.
- Installation request for paragonie/random_compat (locked at v9.99.99) -> satisfiable by paragonie/random_compat[v9.99.99].
A sideremark: I already installed crypt and it worked, only because I got the browser message bcrypt couldn't be found, I tried to install again.
My composer.json looks like follows:
{
"name" : "zendframework/skeleton-application",
"description" : "Skeleton Application for Zend Framework zend-mvc applications",
"type" : "project",
"license" : "BSD-3-Clause",
"keywords" : [
"framework",
"mvc",
"zf"
],
"homepage" : "http://framework.zend.com/",
"minimum-stability" : "dev",
"prefer-stable" : true,
"require" : {
"php" : "^5.6 || ^7.0",
"zendframework/zend-component-installer" : "^1.0 || ^0.7 || ^1.0.0-dev@dev",
"zendframework/zend-mvc" : "^3.1",
"zfcampus/zf-development-mode" : "^3.0",
"zendframework/zend-cache" : "^2.7.1",
"zendframework/zend-db" : "^2.10",
"zendframework/zend-mvc-form" : "^1.0",
"zendframework/zend-json" : "^3.0",
"zendframework/zend-log" : "^2.9",
"zendframework/zend-mvc-console" : "^1.1.10",
"zendframework/zend-mvc-i18n" : "^1.0",
"zendframework/zend-mvc-plugins" : "^1.0.1",
"zendframework/zend-psr7bridge" : "^0.2.2",
"zendframework/zend-session" : "^2.7.1",
"zendframework/zend-servicemanager-di" : "^1.0",
"zendframework/zend-paginator" : "^2.8",
"zendframework/zend-servicemanager" : "^3.3",
"zendframework/zend-validator" : "^2.10",
"zendframework/zend-inputfilter" : "^2.8",
"zendframework/zend-form" : "^2.12",
"zendframework/zend-authentication" : "^2.6",
"zendframework/zend-crypt" : "^3.3"
},
"autoload" : {
"psr-4" : {
"Application\\" : "module/Application/src/",
"Stammdaten\\" : "module/Stammdaten/src"
}
},
"autoload-dev" : {
"psr-4" : {
"ApplicationTest\\" : "module/Application/test/"
}
},
"scripts" : {
"cs-check" : "phpcs",
"cs-fix" : "phpcbf",
"development-disable" : "zf-development-mode disable",
"development-enable" : "zf-development-mode enable",
"development-status" : "zf-development-mode status",
"post-create-project-cmd" : "@development-enable",
"serve" : "php -S 0.0.0.0:8080 -t public public/index.php",
"test" : "phpunit"
},
"require-dev" : {
"zendframework/zend-developer-tools" : "^1.1.0",
"zendframework/zend-test" : "^3.0.1"
}
}
My localhost shows php Version:
WAMP also shows this Version:
Only my commandbox confirmed the error above, it really shows php 5.6.31.
My first question is, why is that? Why doesn't use a new Project not automatically the server version? And last, how can I change to the right version?
^5.6 ||
from line"php" : "^5.6 || ^7.0",
in your composer.json file. The check it fails on goes on the highest value of the lowest option (so, 5.6.31 is the highest value of the lowest option (^5.6
) of your required PHP version.) Also, to use "paragonie/halite", enable PHP's "sodium" module in yourphp.ini
file like so: addextension=sodium
on its own line to the bottom of that file. Requires minimum PHP^7.2
(so might want to adjust that in your composer.json as well). – rkeet