简体   繁体   English

Symfony 2.7作曲家更新swiftmailer

[英]Symfony 2.7 composer update swiftmailer

I had the following composer.json working for years in a Symfony2 project 我在Symfony2项目中让以下composer.json工作了多年

{
"name": "sima/api",
  "license": "Private",
  "type": "project",
  "description": "SIMA API",
  "autoload": {
    "psr-4": {
      "": "src/",
      "SymfonyStandard\\": "app/SymfonyStandard/"
    }
  },
  "require": {
    "php": ">=5.3.9",
    "symfony/symfony": "2.7.*",
    "doctrine/orm": "~2.2,>=2.2.3,<2.5",
    "doctrine/dbal": "<2.5",
    "doctrine/doctrine-bundle": "~1.4",
    "symfony/assetic-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~4.0",
    "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/rest-bundle": "^1.7",
    "nelmio/api-doc-bundle": "^2.9",
    "jms/serializer-bundle": "^1.0",
    "jms/security-extra-bundle": "^1.5",
    "ramsey/uuid": "^2.8",
    "friendsofsymfony/user-bundle" : "~2.0@dev",
    "phpunit/phpunit" : "4.8.3",
    "willdurand/rest-extra-bundle": "^1.0",
    "doctrine/doctrine-fixtures-bundle": "^2.2",
    "vich/uploader-bundle": "^0.14.0",
    "cspoo/swiftmailer-mailgun-bundle": "dev-master",
    "stof/doctrine-extensions-bundle": "^1.2",
    "liuggio/excelbundle": "^2.0",
    "mpdf/mpdf": "^6.0",
    "pelago/emogrifier": "@dev",
    "knplabs/knp-snappy-bundle": "dev-master",
    "eightpoints/guzzle-bundle": "^4.5",
    "box/spout": "^2.7",
    "swiftmailer/swiftmailer": "^5.4"
  },
  "require-dev": {
    "sensio/generator-bundle": "~2.3"
  },
  "scripts": {
    "post-root-package-install": [
      "SymfonyStandard\\Composer::hookRootPackageInstall"
    ],
    "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",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "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",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ]
  },
  "config": {
    "bin-dir": "bin"
  },
  "extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
      "file": "app/config/parameters.yml"
    },
    "branch-alias": {
      "dev-master": "2.7-dev"
    }
  }
}

Now when I do composer update I get the following error: 现在,当我进行作曲家更新时,出现以下错误:

Fatal error: Class 'Symfony\\Bundle\\SwiftmailerBundle\\SwiftmailerBundle' not found in C:\\Git\\web\\app\\AppKernel.php on line 16 Script Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception 致命错误:在第16行的C:\\ Git \\ web \\ app \\ AppKernel.php中找不到类'Symfony \\ Bundle \\ SwiftmailerBundle \\ SwiftmailerBundle'脚本Sensio \\ Bundle \\ DistributionBundle \\ Composer \\ ScriptHandler :: clearCache处理更新后cmd事件异常终止

Tried in two different environments using PHP 5.6.25 and 5.6.30 使用PHP 5.6.25和5.6.30在两个不同的环境中尝试

Tried removing vendors directory 尝试删除供应商目录

Tried composer install 尝试过作曲家安装

My bad. 我的错。 I Accidentally removed "symfony/swiftmailer-bundle": "~2.3", from composer.json 我不小心从composer.json中删除了“ symfony / swiftmailer-bundle”:“〜2.3”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM