从中下载代码 https://github.com/cmfcmf/OpenWeatherMap-PHP-Api
我遵循README file
中提到的说明。我运行了以下命令。
composer require "cmfcmf/openweathermap-php-api"
Using version ^2.2 for cmfcmf/openweathermap-php-api
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
问题1 - 请求的包cmfcmf / openweathermap-php-api cmfcmf / openweathermap-php-api无法满足任何版本集(解析为1.0.0)[否] 版本集(解析为1.0.0)]但这些与您的版本冲突 要求或最小稳定性。
安装失败,将./composer.json恢复为原始版本 内容。
EDIT Composer.json文件。
https://github.com/cmfcmf/OpenWeatherMap-PHP-Api/blob/master/composer.json