Mopa Bootstrap 包安装失败

Mopa Bootstrap bundle failing to install

我在尝试通过命令行安装 Mopa bootstrap 包时遇到此错误:

"C:\ProgramData\ComposerSetup\bin\composer.bat" require mopa/bootstrap-bundle ^3.0

Error:

installation failed reverting ./composer.json to its original content mopa

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...

我迷路了,因为我没有得到任何关于失败原因的解释。

所以听这里,我有一个解决方案给你。当我看到你正在与作曲家合作时,我会教你如何去做。

首先,您必须更改项目中的 "composer.json" 文件,在 "require" 部分添加:

"require": {
    ...
    "mopa/bootstrap-bundle": "*",
    "twbs/bootstrap": "*",
    "knplabs/knp-menu-bundle": "*"
}
(注意:"knplabs/knp-menu-bundle":使用twbs时建议也加上“*”)。

然后在 json 中添加此存储库:

"repositories": [
        {
            "type": "package",
            "package": {
                "version": "2.2.1",
                "name": "twitter/bootstrap",
                "source": {
                    "url": "https://github.com/twitter/bootstrap.git",
                    "type": "git",
                    "reference": "master"
                },
                "dist": {
                    "url": "https://github.com/twitter/bootstrap/zipball/master",
                    "type": "zip"
                }
            }
        }
    ]

保存,最后,你应该执行你的 composer update(dev) 命令。

希望有用!