gpt4 book ai didi

php - Symfony composer update "freeze"更新依赖

转载 作者:可可西里 更新时间:2023-11-01 13:28:07 26 4
gpt4 key购买 nike

使用 Symfony2,将 nelmio/api-doc-bundle 添加到我的 composer.json 中。我的文件是这样的

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"jms/serializer-bundle" : "0.13.0",
"friendsofsymfony/rest-bundle": "1.2.2",
"friendsofsymfony/user-bundle": "~2.0@dev",
"coresphere/console-bundle": "dev-master",
"nelmio/api-doc-bundle": "2.4.5"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"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": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"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"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}

但是当我运行 composer update 时,脚本会阻止更新依赖项。详细说明,我可以看到这一行卡住了:

Reading /root/.composer/cache/repo/https---packagist.org/provider-jms$cg.json from cache

在我添加 nelmio/api-doc-bundle 之前它很好,但是我在另一个包中遇到了同样的问题(我最终重新设置了项目)。


编辑 02/07:当我安装 Composer 时(使用 --prefer-dist 或 --prefer-source),我遇到了这些错误:

Your requirements could not be resolved to an installable set of packages.



Problem 1
- The requested package friendsofsymfony/rest-bundle could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package jms/serializer-bundle could not be found in any version, there may be a typo in the package name.
Problem 3
- Installation request for symfony/framework-standard-edition 2.4.x-dev -> satisfiable by symfony/framework-standard-edition[2.4.x-dev].
- symfony/framework-standard-edition 2.4.x-dev requires jms/serializer-bundle 0.13.0 -> no matching package found.

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

编辑 2:我将我的 Symfony 降级到 ~2.3,当我进行更新时,卡住的行发生了变化

Reading /root/.composer/cache/repo/https---packagist.org/provider-dflydev$markdown.json from cache

最佳答案

有效,尝试将 "minimum-stability": "dev"添加到 composer。 google groups from phar error

{ "name": "symfony/framework-standard-edition", "license": "MIT", "type": "project", "description": "The \"Symfony Standard Edition\" distribution", "autoload": {
"psr-0": { "": "src/" } }, "require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0",
"jms/serializer-bundle" : "0.13.0",
"friendsofsymfony/rest-bundle": "1.2.2",
"friendsofsymfony/user-bundle": "~2.0@dev",
"coresphere/console-bundle": "dev-master",
"nelmio/api-doc-bundle": "2.4.5" }, "scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"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": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"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",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
} } }

关于php - Symfony composer update "freeze"更新依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21608274/

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