Slow updating of composer dependencies, despite --prefer-dist flag(尽管 --prefer-dist 标志,作曲家依赖项的更新缓慢)
问题描述
为什么我的作曲家依赖项最多需要两分钟才能更新,即使没有任何更改?
Why does it take up to two minutes for my composer dependencies to update, even when there have been no changes?
流行建议是附加 --prefer-dist
标志:
php composer.phar update --prefer-dist
但这对我的情况没有影响.下面是我的 composer.json 文件——我是否遗漏了一些明显的东西?
But this makes no difference in my case. Below is my composer.json file – am I missing something obvious?
{
"name": "my-namespace/symfony",
"type": "project",
"description": "",
"require": {
"php": ">=5.3.3",
"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/monolog-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"sensio/distribution-bundle": "2.2.*",
"my-namespace/my-bundle": "1.0.*"
},
"repositories": [
{
"type": "vcs",
"url": "http://username:password@git.com/my-bundle.git"
}
],
"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": "dev",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
推荐答案
这个问题通常与在 CLI 环境中加载 xdebug 有关.(是否启用 xdebug 无关紧要.)
This problem is often related to xdebug being loaded in your CLI environment. (It doesn't matter if xdebug is enabled or not.)
您可以使用以下命令之一检查是否启用了 xdebug.
You can check whether xdebug is enabled using one of the followinc commands.
// Unix
php -m | grep xdebug
// Windows
php -m | findstr xdebug
通过启用最大详细程度和分析信息,可以获得有关哪些操作需要这么长时间的更多信息.(如果要更新软件包,请将 install 替换为 update.)
Further information on what operations take so long can be gained by enabling maximum verbosity and profiling information. (Replace install with update if you are updating the packages.)
composer install --prefer-dist -vvv --profile
这篇关于尽管 --prefer-dist 标志,作曲家依赖项的更新缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:尽管 --prefer-dist 标志,作曲家依赖项的更新缓慢


- PHP Count 布尔数组中真值的数量 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- Laravel 仓库 2022-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 带有通配符的 Laravel 验证器 2021-01-01