Minify - Composer安装错误

时间:2018-04-04 08:42:29

标签: php composer-php minify

我正在尝试使用composer.jsoncomposer install文件中使用Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested package scrapbook/psr-cache could not be found in any version, there may be a typo in the package name. Problem 2 - The requested package satooshi/php-coveralls dev-master exists as satooshi/php-coveralls[0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 1.0.x-dev, 1.1.x-dev, 2.0.x-dev, v0.6.0, v0.6.1, v0.7.0, v0.7.1, v1.0.0, v1.0.1, v1.0.2, v1.1.0, v2.0.0] but these are rejected by your constraint. 安装,但我收到此错误:

public static void main(String[] args) {

    String[] name = "myName is popy".split(" ");
    int strlen = 0;
    String longestName = null;
    for(String rec: name)
    {
        rec.length();
        if(rec.length() > strlen)
        {
            strlen = rec.length();
            longestName = rec.toString();
        }
    }
    System.out.println("Longest Name is : "+longestName);
}

1 个答案:

答案 0 :(得分:1)

你有一些问题:
1)packagist中没有任何名为scrapbook/psr-cache的包 2)satooshi/php-coveralls没有有效的版本到你的composer.json

我建议你用一个有效的更改包psr-cache并修复php-coveralls版本

作曲家的错误很明显。

如果您想查看所有有效套餐,请参阅:

Packagist