symfony2 – 为什么更新composer中的依赖是如此缓慢?

前端之家收集整理的这篇文章主要介绍了symfony2 – 为什么更新composer中的依赖是如此缓慢?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用composer( http://getcomposer.org/)来管理Symfony2(symfony v 2.1.3)中安装的软件包。作曲家的版本是de3188c。

我有问题,当我添加新的bundle到composer.json并执行它显示关于更新依赖关系和下一次下载它们的消息的时间非常低。

我有这个数据在composer.json(见下文),执行时间约为20分钟!互联网连接是足够快,我可以下载大文件非常快…

有什么技巧使它更快?

{
"name": "symfony/framework-standard-edition","description": "The \"Symfony Standard Edition\" distribution","autoload": {
    "psr-0": { "": "src/" }
},"require": {
    "PHP": ">=5.3.3","symfony/symfony": "2.1.*","doctrine/orm": ">=2.2.3,<2.4-dev","doctrine/doctrine-bundle": "1.0.*","twig/extensions": "1.0.*","symfony/assetic-bundle": "2.1.*","symfony/swiftmailer-bundle": "2.1.*","symfony/monolog-bundle": "2.1.*","sensio/distribution-bundle": "2.1.*","sensio/framework-extra-bundle": "2.1.*","sensio/generator-bundle": "2.1.*","jms/security-extra-bundle": "1.2.*","jms/di-extra-bundle": "1.1.*","doctrine/doctrine-fixtures-bundle": "dev-master","webignition/doctrine-migrations-bundle": "dev-master"
},"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::installRequirementsFile"
    ]
},"minimum-stability": "dev","extra": {
    "symfony-app-dir": "app","symfony-web-dir": "web"
}
尝试为composer.json中的每个依赖关系指定一个版本,并在调用composer时使用选项–prefer-dist。它将从存储库(如果可用)而不是单个文件下载ZIP文件
PHP composer.phar install --prefer-dist
原文链接:https://www.f2er.com/javaschema/282876.html

猜你在找的设计模式相关文章