Composer不会将Symfony从3.2升级到3.3

时间:2017-07-04 09:51:45

标签: symfony symfony-3.2

我正在尝试将我的项目升级到最新的Symfony 3.1至3.2完美无瑕 现在已经有一个小时了,我正试图升级到3.3,我仍然不知道为什么不会发生这种情况。
最奇怪的部分是我在运行composer update命令时没有任何错误消息,但symfony版本没有改变。我检查了调试条并使用bin/console --version命令,仍然是3.2.10。

bin/console --version
Symfony 3.2.10 (kernel: app, env: dev, debug: true)

我想,我的composer.json是正确指定的:

"require" : {
        "php" : ">=7.0",
        "symfony/symfony" : "3.3.*",
        "doctrine/orm" : "^2.5",
        "doctrine/doctrine-bundle" : "^1.6",
        "doctrine/doctrine-cache-bundle" : "^1.2",
        "symfony/swiftmailer-bundle" : "^2.3",
        "symfony/monolog-bundle" : "^2.8",
        "symfony/polyfill-apcu" : "^1.0",
        "sensio/distribution-bundle" : "^5.0",
        "sensio/framework-extra-bundle" : "^3.0.2",
        "incenteev/composer-parameter-handler" : "^2.0",
        "symfony/assetic-bundle" : "^2",
        "friendsofsymfony/user-bundle" : "~2.0",
        "knplabs/knp-menu-bundle" : "^2.0",
        "egeloen/ckeditor-bundle" : "^4.0",
        "twig/twig" : "@stable",
        "twig/extensions" : "^1.4",
        "stof/doctrine-extensions-bundle" : "^1.2",
        "friendsofsymfony/jsrouting-bundle" : "^1.6",
        "yavin/symfony-form-tree" : "~1.0",
        "cnerta/breadcrumb-bundle" : "2.1.*",
        "symfony/security-acl" : "^v3",
        "petrepatrasc/google-map-bundle" : "^2.3",
        "debril/rss-atom-bundle" : "^3.0",
        "beberlei/DoctrineExtensions" : "^1.0",
        "symfony/http-kernel" : "~3.0",
        "tilleuls/ovh-bundle" : "1.0.*",
        "st/flagiconcss-bundle" : "~1.0",
        "th3mouk/yahoo-weather-api" : "^1.0",
        "jms/serializer-bundle" : "^1.2"
    },

这是控制台输出:

composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

 // Clearing the cache for the dev environment with debug 

// And the rest is usual assetic and cache clear stuff

我还尝试升级symfony/symfony,没有区别。

有没有人有线索? 感谢您的时间和帮助。

1 个答案:

答案 0 :(得分:2)

问题可能是您的某个依赖项需要较低版本。

您可以使用:

composer why symfony/symfony 3.2.*

找出它的依赖关系。然后,您可能必须首先更新该依赖项。

为确保一切正常,您应该使用以下方法逐一完成:

composer require dependency/dep ?

?是新版本约束。然后运行测试,然后对symfony执行相同的操作:

composer update symfony/symfony

OP的编辑
问题是由于Eclipse不再将composer.json文件写入磁盘,不要问我原因 但是,我将这个答案标记为解决方案,因为composer why命令促使我朝着正确的方向前进。