5

Composerを使用してphpの読みやすさのgitプロジェクトを含めたいと思います。これは私のcomposer.jsonファイルです:

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "php-readability/php-readability",
                "version": "master",
                "source": {
                    "url": "https://github.com/feelinglucky/php-readability.git",
                    "type": "git",
                    "reference": "branches/master"
                }
            }
        }
    ],
    "require": {
        "php-readability/php-readability": "master"
    }
}

私が得るエラーは次のとおりです。

Problem 1
 - The requested package php-readability/php-readability master could not be found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your min
imum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
or more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common
 problems.

Composerを使用するのはこれが初めてなので、構成が間違っている可能性があります。

4

1 に答える 1

10

php-readability プロジェクトにはタグがありません (そのため、composer 用語では安定していません)。デフォルトでは、安定したパッケージのみが考慮されます。

パッケージの dev バージョンをインストールすることを示すには、そのバージョンを「dev-master」または「*@dev」として定義します。

また、リポジトリ定義で間違った参照を指定しました。ここに作業がありcomposer.jsonます:

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "php-readability/php-readability",
                "version": "master",
                "source": {
                    "url": "https://github.com/feelinglucky/php-readability.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
    ],
    "require": {
        "php-readability/php-readability": "dev-master"
    }
}
于 2013-03-19T09:38:02.503 に答える