无法使用作曲家更新 -v 更新"Updating dependencies (including require-dev)"



无法使用composer update -v更新"更新依赖项(包括require-dev)"

使用Windows 7 PHP: 5.4.7 OpenSSL为CLI Composer版本启用c93aecee4d3998d17a1986f042187d38dd394397

得到错误:

E:xampphtdocspartner-portal>composer update -v
Loading composer repositories with package information
Updating dependencies (including require-dev)
  [ErrorException]
  zlib_decode(): data error
Exception trace:
 () at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:166
 ComposerUtilErrorHandler::handle() at n/a:n/a
 zlib_decode() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:166
 ComposerUtilRemoteFilesystem->get() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Util/RemoteFilesystem.php:76
 ComposerUtilRemoteFilesystem->getContents() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:541
 ComposerRepositoryComposerRepository->fetchFile() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Repository/ComposerRepository.php:278
 ComposerRepositoryComposerRepository->whatProvides() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:240
 ComposerDependencyResolverPool->computeWhatProvides() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/DependencyResolver/Pool.php:229
 ComposerDependencyResolverPool->whatProvides() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:179
 ComposerDependencyResolverRuleSetGenerator->addRulesForPackage() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:274
 ComposerDependencyResolverRuleSetGenerator->getRulesFor() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/DependencyResolver/Solver.php:166
 ComposerDependencyResolverSolver->solve() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Installer.php:446
 ComposerInstaller->doInstall() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Installer.php:208
 ComposerInstaller->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Command/UpdateCommand.php:103
 ComposerCommandUpdateCommand->execute() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
 SymfonyComponentConsoleCommandCommand->run() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:882
 SymfonyComponentConsoleApplication->doRunCommand() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:212
 SymfonyComponentConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:117
 ComposerConsoleApplication->doRun() at phar://C:/ProgramData/Composer/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:119
 SymfonyComponentConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Console/Application.php:83
 ComposerConsoleApplication->run() at phar://C:/ProgramData/Composer/bin/composer.phar/bin/composer:43
 require() at C:ProgramDataComposerbincomposer.phar:15

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
 [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [
-o|--optimize-autoloader] [packages1] ... [packagesN]

编辑:添加作曲家。json ->

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The "Symfony Standard Edition" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "composer/composer": "1.0.*@dev",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "incenteev/composer-parameter-handler": "~2.0",
        "sonata-project/admin-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "sonata-project/intl-bundle": "dev-master",
        "sonata-project/cache-bundle": "dev-master",
        "sonata-project/user-bundle": "dev-master",
        "sonata-project/media-bundle": "dev-master"
    },
    "scripts": {
        "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"
        ],
        "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"
        ]
    },
    "config": {
        "bin-dir": "bin",
        "process-timeout": 5000
    },
    "minimum-stability": "dev",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    }
}

这个问题似乎和这个问题是一样的。

zlib_decode(): data error

请把我在那边回复的可能解决方案列表通读一遍。

此外,确保您的编曲器。Json也不是composer。两个都是UTF-8编码。

使用

显示更多调试信息
composer -vvv update

请尝试将Composer/Util/remotefilessystem .php中的if语句从第164行改为

if ($decode) {
    $result = file_get_contents('compress.zlib://data:application/octet-stream;base64,'.base64_encode($result));
}

您可以使用koto/phar-util来提取/重新构建composer.phar。

相关内容

  • 没有找到相关文章