Я пытаюсь установить 3 пакета, один из которых я разветвлял на GitHub.Установка завершается неудачно, и в сообщении об ошибке говорится об удалении корневого пакета и ветви git, в которой я (развиваюсь), что не имеет смысла.
Что я пробовал:
- Удалитеcomposer.lock
- Удалить папку поставщика
- Выполнить команду clearcache composer
- Попробуйте создать пустой проект: он работает
В итоге,в пустом проекте это работает правильно, но не в моем другом проекте (esynaps / api-v2.e-synaps.com).
Сообщение об ошибке:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- don't install elasticsearch/elasticsearch 5.0.x-dev|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.0.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.1|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.2|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.3|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.2.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.3.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.3.1|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.3.2|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.3.2|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.3.1|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.3.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.2.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.3|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.2|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.1|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.1.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch v5.0.0|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch 5.3.3|remove esynaps/api-v2.e-synaps.com dev-develop
- don't install elasticsearch/elasticsearch 5.0.x-dev|remove esynaps/api-v2.e-synaps.com dev-develop
- Installation request for esynaps/api-v2.e-synaps.com dev-develop -> satisfiable by esynaps/api-v2.e-synaps.com[dev-develop].
- Installation request for elasticsearch/elasticsearch ^5.0 -> satisfiable by elasticsearch/elasticsearch[5.0.x-dev, v5.0.0, v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.2.0, v5.3.0, v5.3.1, v5.3.2, 5.3.3].
Вот композитор.json пустого проекта:
{
"name": "project/test",
"minimum-stability": "dev",
"prefer-stable": true,
"authors": [
{
"name": "my name",
"email": "my@email.com"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/esynaps/elasticsearch-php"
}
],
"require": {
"ongr/elasticsearch-bundle": "^5.0",
"ongr/elasticsearch-dsl": "^5.0",
"elasticsearch/elasticsearch": "^5.0"
}
"replace": {
"elasticsearch/elasticsearch": "dev-master"
}
}
Ссылка на форк: https://github.com/esynaps/elasticsearch-php
Вот composer.json целевого проекта:
{
"name": "esynaps/api-v2.e-synaps.com",
"license": "proprietary",
"type": "project",
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/esynaps/elasticsearch-php"
},
{
"type": "vcs",
"url": "https://github.com/esynaps/neo4j-php-ogm"
},
{
"type": "vcs",
"url": "https://github.com/angelov/neo4j-symfony"
}
],
"require": {
"php": ">=7.1",
"akeneo/spreadsheet-parser": "^1.2",
"beberlei/DoctrineExtensions": "^1.0",
"box/spout": "^2.7",
"c0de8/matchmaker": "^2.0",
"defuse/php-encryption": "^2.1",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"friendsofsymfony/rest-bundle": "^2.2",
"graphaware/neo4j-php-ogm": "dev-master",
"incenteev/composer-parameter-handler": "^2.0",
"jms/serializer-bundle": "^1.1",
"justinrainbow/json-schema": "^5.2",
"nelmio/api-doc-bundle": "dev-master",
"nelmio/cors-bundle": "^1.5",
"neo4j/neo4j-bundle": "dev-method-reset",
"ongr/elasticsearch-bundle": "5.*",
"ongr/elasticsearch-dsl": "5.*",
"elasticsearch/elasticsearch": "5.*",
"phpdocumentor/reflection-docblock": "*",
"phpoffice/phpexcel": "^1.8",
"piwik/device-detector": "^3.7",
"ptrofimov/matchmaker": "*",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"behat/behat": "^3.3",
"behat/mink": "^1.7",
"behat/mink-browserkit-driver": "^1.3",
"behat/mink-extension": "^2.2",
"behat/mink-selenium2-driver": "^1.3",
"behat/symfony2-extension": "^2.1",
"phpunit/phpunit": "^6.3",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.3"
},
"replace": {
"elasticsearch/elasticsearch": "dev-master"
},
"scripts": {
"symfony-scripts": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
],
"test": "phpunit",
"assets": "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets"
},
"config": {
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": null
}
}
$ php -v
PHP 7.1.7 (cli) (built: Jul 6 2017 16:51:52) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.7, Copyright (c) 1999-2017, by Zend Technologies
$ composer -v
Версия Composer 1.6.52018-05-04 11: 44: 59