Phing不会在composer安装上安装

时间:2015-04-16 04:46:30

标签: php composer-php phing

我正在尝试在我的本地开发环境中运行composer install。不幸的是,我在安装phing时遇到了致命的错误。我做了谷歌搜索以及查看作曲家和phing项目的问题队列,但可以找到有关此错误的任何信息。

composer install的输出:

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing doctrine/lexer (v1.0)
  - Installing doctrine/lexer (v1.0.1)
    Downloading: 100%         

  - Removing symfony/event-dispatcher (v2.5.4)
  - Installing symfony/event-dispatcher (v2.6.6)
    Downloading: 100%         

  - Removing symfony/process (v2.5.4)
  - Installing symfony/process (v2.6.6)
    Downloading: 100%         

  - Removing symfony/finder (v2.3.19)
  - Installing symfony/finder (v2.3.27)
    Downloading: 100%         

  - Removing symfony/dom-crawler (v2.5.4)
  - Installing symfony/dom-crawler (v2.6.6)
    Downloading: 100%         

  - Removing symfony/css-selector (v2.5.4)
  - Installing symfony/css-selector (v2.6.6)
    Downloading: 100%         

  - Removing symfony/browser-kit (v2.5.4)
  - Installing symfony/browser-kit (v2.6.6)
    Downloading: 100%         

  - Updating fabpot/goutte (v1.0.6 => v1.0.7)
    Checking out 794b196e76bdd37b5155cdecbad311f0a3b07625

  - Installing behat/mink-selenium2-driver (v1.1.1)
    Downloading: 100%         

  - Installing symfony/filesystem (v2.6.6)
    Downloading: 100%         

  - Installing symfony/config (v2.6.6)
    Downloading: 100%         

  - Installing symfony/yaml (v2.6.6)
    Downloading: 100%         

  - Installing symfony/translation (v2.6.6)
    Downloading: 100%         

  - Installing symfony/dependency-injection (v2.6.6)
    Downloading: 100%         

  - Removing symfony/console (v2.5.4)
  - Installing symfony/console (v2.6.6)
    Downloading: 100%         

  - Installing behat/behat (v2.4.6)
    Downloading: 100%         

  - Installing behat/mink-extension (v1.1.4)
    Downloading: 100%         

  - Installing zodyac/behat-perceptual-diff-extension (dev-master c35edc2)
    Cloning c35edc2444ce218b0844bf3c035105060798249e

  - Installing zodyac/behat-extensible-html-formatter (dev-master df6a076)
    Cloning df6a0769dee639cf1303a60600427b1c331bb91c

  - Installing zerkalica/phpcs (dev-master e2d4488)
    Cloning e2d4488665c722b81e04141c5615ced3277509d9
    Failed to download zerkalica/phpcs from source: The process "git checkout 'master'" exceeded the timeout of 300 seconds.
    Now trying to download from dist
  - Installing zerkalica/phpcs (dev-master e2d4488)
    Downloading: 100%         

  - Installing phing/phing (dev-master 8b0e4d5)
    Cloning 8b0e4d5fb4d68533a1826b9fc3d865860be2e050
    Failed to download phing/phing from source: The process "git clone --no-checkout 'git://github.com/phingofficial/phing.git' '/var/www/site/docroot/XXXXXXXX/vendor/phing/phing' && cd '/var/www/site/docroot/XXXXXX/vendor/phing/phing' && git remote add composer 'git://github.com/phingofficial/phing.git' && git fetch composer" exceeded the timeout of 300 seconds.
    Now trying to download from dist
  - Installing phing/phing (dev-master 8b0e4d5)



  [RuntimeException]                                                           
  Could not delete /var/www/site/docroot/XXXXXXX/vendor/phing/phing/.git/objec  
  ts/pack/.nfs0000000003841e4600000002:  

composer.json的内容:

{
    "name": "XXXXXXX/XXXXXXX",
    "description": "XXXXXXX project",
    "authors": [
        {
            "name": "XXXXXX",
            "email": "XXXXXX@XXXXXX.com.au"
        }
    ],
    "require": {
        "behat/behat": "2.4.*@stable",
        "behat/mink": "*",
        "behat/mink-extension": "*",
        "behat/mink-goutte-driver": "*",
        "behat/mink-selenium2-driver": "*",
        "behat/mink-zombie-driver": "*",
        "zodyac/behat-perceptual-diff-extension": "dev-master",
        "zodyac/behat-extensible-html-formatter": "dev-master",
        "zerkalica/phpcs": "dev-master",
        "phing/phing": "dev-master",
        "phpmd/phpmd": "dev-master",
        "sebastian/phpcpd": "2.0.*@dev",
        "phploc/phploc": "2.1.*@dev",
        "phpdocumentor/phpdocumentor": "dev-master",
        "zerkalica/php-code-browser": "dev-master",
        "zendframework/zend-mail": "2.1.*"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.*"
    },
    "config": {
        "bin-dir": "bin/"
    }
}

composer.lock的相关部分:

        {
            "name": "phing/phing",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/phingofficial/phing.git",
                "reference": "a4239641f685c0f06258309620e28ea4c2911fd0"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/phingofficial/phing/zipball/a4239641f685c0f06258309620e28ea4c2911fd0",
                "reference": "a4239641f685c0f06258309620e28ea4c2911fd0",
                "shasum": ""
            },
            "require": {
                "php": ">=5.2.0"
            },
            "require-dev": {
                "ext-pdo_sqlite": "*",
                "lastcraft/simpletest": "@dev",
                "pdepend/pdepend": "1.x",
                "pear-pear.php.net/http_request2": "2.2.x",
                "pear-pear.php.net/net_growl": "2.7.x",
                "pear-pear.php.net/pear_packagefilemanager": "1.7.x",
                "pear-pear.php.net/pear_packagefilemanager2": "1.0.x",
                "pear-pear.php.net/xml_serializer": "0.20.x",
                "pear/pear_exception": "@dev",
                "pear/versioncontrol_git": "@dev",
                "pear/versioncontrol_svn": "@dev",
                "phpdocumentor/phpdocumentor": "2.x",
                "phploc/phploc": "2.x",
                "phpunit/phpunit": ">=3.7",
                "sebastian/phpcpd": "2.x",
                "squizlabs/php_codesniffer": "1.5.x"
            },
            "suggest": {
                "pdepend/pdepend": "PHP version of JDepend",
                "pear/archive_tar": "Tar file management class",
                "pear/versioncontrol_git": "A library that provides OO interface to handle Git repository",
                "pear/versioncontrol_svn": "A simple OO-style interface for Subversion, the free/open-source version control system",
                "phpdocumentor/phpdocumentor": "Documentation Generator for PHP",
                "phploc/phploc": "A tool for quickly measuring the size of a PHP project",
                "phpmd/phpmd": "PHP version of PMD tool",
                "phpunit/php-code-coverage": "Library that provides collection, processing, and rendering functionality for PHP code coverage information",
                "phpunit/phpunit": "The PHP Unit Testing Framework",
                "sebastian/phpcpd": "Copy/Paste Detector (CPD) for PHP code",
                "tedivm/jshrink": "Javascript Minifier built in PHP"
            },
            "bin": [
                "bin/phing"
            ],
            "type": "library",
            "autoload": {
                "classmap": [
                    "classes/phing/"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "include-path": [
                "classes"
            ],
            "license": [
                "LGPL-3.0"
            ],
            "authors": [
                {
                    "name": "Phing Community",
                    "homepage": "http://www.phing.info/trac/wiki/Development/Contributors"
                },
                {
                    "name": "Michiel Rook",
                    "email": "mrook@php.net"
                }
            ],
            "description": "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.",
            "homepage": "http://www.phing.info/",
            "keywords": [
                "build",
                "phing",
                "task",
                "tool"
            ],
            "time": "2014-09-18 12:52:32"
        },

2 个答案:

答案 0 :(得分:0)

首先尝试使用下面的示例并删除不必要的内容。我将它用于Symfony项目并且工作正常。在现实生活中,测试内容通常会在"require-dev"块下进行!

<强> COMPOSER.JON:

{
    "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.4",
        "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",
        "doctrine/doctrine-fixtures-bundle": "2.2.0",
        "behat/behat": "2.5.3",
        "behat/behat-bundle": "1.0.0",
        "behat/symfony2-extension": "1.1.2",
        "behat/mink": "1.5.0",
        "behat/mink-extension": "~1.3",
        "behat/mink-selenium2-driver": "1.1.1",
        "behat/mink-goutte-driver": "1.0.9",
        "phing/phing": "2.8.2",
        "squizlabs/php_codesniffer": "1.5.1",
        "pdepend/pdepend": "2.0.2",
        "phpmd/phpmd" : "2.0.0",
        "phploc/phploc": "2.0.6",
        "sebastian/phpcpd": "2.0.1",
        "sebastian/finder-facade": "~1.1",
        "phpdocumentor/phpdocumentor": "2.7.0"
    },
    "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"
    },
    "minimum-stability": "dev",
    "prefer-stable" : true,
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.5-dev"
        }
    }
}

编辑器的BUILD.XML条目

<target name="composer">
    <exec executable="composer">
        <arg value="self-update"/>
    </exec>
    <exec executable="composer">
        <arg value="install"/>
    </exec>
</target>

答案 1 :(得分:0)

我认为问题的原因是由于下载所需库时出现连接问题。我最近在另一个项目中遇到过类似的问题在多次尝试失败后,当我切换到另一个更快的网络连接时,问题就解决了。