为什么作曲家没有下载软件包?



我不明白我的作曲家或项目出了什么问题。如果我尝试通过composer下载一些,我会得到错误:

安装失败,正在还原/composer.json的原始内容。我习惯了这个代码php composer需要sonata项目/管理捆绑包"2.3.*"

我的代码composer.json:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The "Symfony Standard Edition" distribution",
    "autoload": {
        "psr-0": { "": "src/", "SymfonyStandard": "app/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.5.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~3.0",
        "sensio/framework-extra-bundle": "~3.0",
        "incenteev/composer-parameter-handler": "~2.0",
        "jms/security-extra-bundle": "1.5.*@dev",
        "jms/di-extra-bundle": "1.4.*@dev",
        "symfony/finder": "~2.1",
        "doctrine/data-fixtures": "dev-master",
        "stof/doctrine-extensions-bundle": "dev-master",
        "friendsofsymfony/user-bundle": "~1.3"
    },
    "require-dev": {
        "sensio/generator-bundle": "~2.3"
    },
    "scripts": {
        "post-root-package-install": [
            "SymfonyStandard\Composer::hookRootPackageInstall"
        ],
        "post-install-cmd": [
            "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
            "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::removeSymfonyStandardFiles"
        ],
        "post-update-cmd": [
            "Incenteev\ParameterHandler\ScriptHandler::buildParameters",
            "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::removeSymfonyStandardFiles"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.5-dev"
        }
    }
}

试试本文中的步骤如何?

http://www.dev-metal.com/composer-problems-try-full-reset/

所以

更新Composer本身

composer self-update

运行诊断

composer diagnose

更新依赖项(注意:-v是显示附加信息的详细参数)

composer update -v

如果仍然存在问题:请重新安装依赖项。删除供应商文件夹(手动)或通过rm命令(如果你在项目文件夹中,当然)在linux上之前:

rm -rf vendor/
composer update -v

Composer需要从composer.json安装特定的包。就像你有下面的包,你想安装条纹:

"require": {
        "chriskacerguis/codeigniter-restserver": "^3.0",
        "firebase/php-jwt": "^5.0",
}

Do:

composer require stripe/stripe-php

相关内容

  • 没有找到相关文章

最新更新