gpt4 book ai didi

symfony - 为什么 Composer 中的依赖更新这么慢?

转载 作者:行者123 更新时间:2023-12-03 05:30:35 25 4
gpt4 key购买 nike

我正在使用 Composer ( http://getcomposer.org/ ) 来管理 Symfony2 (symfony v 2.1.3) 中已安装的包。 Composer 的版本是de3188c

我遇到的问题是,当我将新包添加到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::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"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

关于symfony - 为什么 Composer 中的依赖更新这么慢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13413788/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com