需求无法解决,个人存储库

时间:2018-10-24 16:04:35

标签: composer-php details

有人可以帮助我解决此问题吗?我正在尝试在个人存储库上添加依赖项。我的其他存储库没有任何问题,但是与此存储库有关。

这是个人存储库的composer.json文件:

{
    "name": "bundle-name-1",
    "type": "symfony-bundle",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "symfony/console": "*",
        "symfony/flex": "^1.1",
        "symfony/framework-bundle": "*",
        "symfony/monolog-bundle": "^3.3",
        "symfony/yaml": "*"
    },
    "require-dev": {
        "symfony/dotenv": "*",
        "symfony/test-pack": "^1.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    ...
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    ...
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.1.*"
        }
    }
}

这是主项目的composer.json文件:

{
    "name": "bundle-name-2",
    "type": "symfony-bundle",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "symfony/console": "*",
        "symfony/flex": "^1.1",
        "symfony/framework-bundle": "*",
        "symfony/monolog-bundle": "^3.3",
        "symfony/yaml": "*",
        "bundle-name-1": "~0.9.2"
    },
    "require-dev": {
        "symfony/dotenv": "*",
        "symfony/test-pack": "^1.0"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "repositories": [
        {"type": "vcs", "url": "ssh://git@stash.domainname.com:8999/core/bundlename1repository.git"}
    ],
    ...
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    ...
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.1.*"
        }
    }
}

我已经删除了两者的自动加载和脚本。

作曲家的信息是:

不要安装bundle-name-1 v0.9.3 |删除bundle-name-2 dev-master bundle-name-1 [v0.9.2,v0.9.3]可以满足bundle-name-1的安装请求〜0.9.2->。

1 个答案:

答案 0 :(得分:0)

问题来自“替换”子句。它是在创建symfony框架时自动添加的,而我的捆绑包并未替代其中的任何一个。

解决方案:

  • 从“ composer.json”中删除“ replace”子句。
  • 运行“ composer更新”