1

在我当前的 symfony 2.2.1 项目中,我想安装 TCPDFBundle(用于生成 PDF 文档的包)

我的 composer.json 看起来像这样:

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "tecnick.com/tcpdf": "*"
    },
    "scripts": {
        "post-install-cmd": [
            "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": [
            "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"
    },
    "minimum-stability": "alpha",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "branch-alias": {
            "dev-master": "2.2-dev"
        }
    }
}

所以在等待克隆很长时间后,它说时间到了。

[Symfony\Component\Process\Exception\RunTimeException]
The process time-out

这个错误有什么帮助吗?

4

2 回答 2

1

你试过WhiteOctoberTCPDFBundle吗?这个包使得使用 TCPDF 库变得很容易。只需添加这个composer.json喜欢这个

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.2.*",
    "whiteoctober/tcpdf-bundle": "dev-master"
}

在此之后,按照此链接中的说明进行操作

于 2013-09-06T12:20:16.413 回答
0

这是答案:

COMPOSER_PROCESS_TIMEOUT=30000 php composer.phar install

这意味着,您应该更改超时参数才能安装此要求。

于 2013-11-06T14:16:58.547 回答