将symfony 2.8更新到symfony 3.4时出错

时间:2018-11-19 05:29:13

标签: php symfony symfony-3.4

我将symfony版本从2.8更新到symfony 3.4,这是我的composer.json

 "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "3.4.*",
        "doctrine/orm": "~2.5.0",
        "doctrine/doctrine-bundle": "~1.3",
        "twig/extensions": "~1",
        "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",
        "twig/twig": "^1.0||^2.0",
        "sensio/generator-bundle": "~2.1",
        "jms/security-extra-bundle": "~1.2",
        "jms/di-extra-bundle": "~1.1",
        "friendsofsymfony/user-bundle": "~1.3",
        "friendsofsymfony/jsrouting-bundle": "~1.0",
        "gregwar/captcha-bundle": "~1.1",
        "liuggio/excelbundle": "~2.0",
        "knplabs/knp-menu-bundle": "~2.0.0",
        "avalanche123/imagine-bundle": "~2.1",
        "knplabs/knp-paginator-bundle": "~2.3",
        "knplabs/knp-components": "~1.2.1",
        "kbsali/redmine-api": "~1.0",
        "exercise/htmlpurifier-bundle": "^0.2.2",
        "doctrine/migrations": "^1",
        "beberlei/DoctrineExtensions": "^1.0",
        "swiftmailer/swiftmailer": "^5.4",
        "react/zmq": "0.3.*",
        "cboden/ratchet": "0.4.*",
        "symfony/framework-bundle": "~2.8.9",
        "symfony/translation": "~2.8",
        "symfony/templating": "~3.0.9",
        "symfony/stopwatch": "~3.0.9",
        "symfony/security-csrf": "~3.0.9",
        "symfony/security-core": "~3.0.9",
        "symfony/routing": "~3.0.9",
        "symfony/http-kernel": "~2.8.9",
        "symfony/finder": "~2.1",
        "symfony/http-foundation": "~2.7",
        "symfony/options-resolver": "~2.8.9",
        "symfony/event-dispatcher": "~2.1",
        "symfony/debug": "~2.8.9",
        "symfony/filesystem": "~3.0.9",
        "symfony/dependency-injection": "~2.8.9",
        "symfony/config": "~2.8.9",
        "symfony/class-loader": "~3.0.9",
        "symfony/asset": "~3.0.9",
        "symfony/form": "~2.1",
        "symfony/property-access": "~3.0.9",
        "symfony/serializer": "~2.8.9",
        "symfony/console": "~2.8.9",
        "symfony/security-bundle": "~2.8.9",
        "symfony/monolog-bridge": "~2.8.9",
        "symfony/yaml": "~2.8.9",
        "symfony/process": "~2.8.9",
        "symfony/security": "~2.8",
        "symfony/doctrine-bridge": "~2.8.9",
        "symfony/intl": "~3.2.9"
    }

更新时出现错误

  

[Symfony \ Component \ DependencyInjection \ Exception \ InvalidArgumentException

  Unable to parse file "vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/../Resources/config/templating.xml".

  [InvalidArgumentException]                                                                                                                                                                                                        
  [ERROR 1871] Element '{http://symfony.com/schema/dic/services}defaults': This element is
     

不可预期。预期是(   {http://symfony.com/schema/dic/services}服务)

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
     

处理post-update-cmd事件因异常终止

  [RuntimeException]                                                         
  An error occurred when executing the "'cache:clear --no-warmup'" command.

我将日志和缓存文件夹移到了新目录var。 将控制台移至bin目录并替换require_once _DIR__.'/bootstrap.php.cache'; with require _DIR__.'/../app/autoload.php';

在作曲家中更改了symfony的版本并运行此命令

composer update symfony/symfony --with-dependencies

请帮助解决它。

0 个答案:

没有答案