gpt4 book ai didi

php - 尽管 --prefer-dist 标志, Composer 依赖项的更新缓慢

转载 作者:IT老高 更新时间:2023-10-28 12:03:50 25 4
gpt4 key购买 nike

为什么我的 Composer 依赖项最多需要两分钟才能更新,即使没有任何更改?

一个 popular suggestion是附加 --prefer-dist 标志:

php composer.phar update --prefer-dist

但这对我的情况没有影响。下面是我的 composer.json 文件——我是否遗漏了一些明显的东西?

{
"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 无关紧要。)

您可以使用以下命令之一检查是否启用了 xdebug。

// Unix
php -m | grep xdebug
// Windows
php -m | findstr xdebug

通过启用最大详细程度和分析信息,可以获得有关哪些操作需要这么长时间的更多信息。 (如果要更新软件包,请将 install 替换为 update。)

composer install --prefer-dist -vvv --profile

关于php - 尽管 --prefer-dist 标志, Composer 依赖项的更新缓慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19316650/

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