{
  "schemaVersion": "ebb.rule.v1",
  "id": "php.package.swiftmailer.swiftmailer.abandoned",
  "ecosystem": "php",
  "purl": "pkg:composer/swiftmailer/swiftmailer",
  "affectedVersions": "vers:composer/*",
  "event": "deprecated",
  "severity": "high",
  "title": "swiftmailer/swiftmailer is abandoned",
  "summary": "Packagist marks swiftmailer/swiftmailer as abandoned and no longer maintained, and the author suggests using symfony/mailer instead. The Symfony project set Swiftmailer's end of maintenance for the end of November 2021.",
  "replacement": "symfony/mailer",
  "deadline": "2021-11-30",
  "sources": [
    {
      "title": "swiftmailer/swiftmailer on Packagist",
      "url": "https://packagist.org/packages/swiftmailer/swiftmailer",
      "accessedAt": "2026-10-19"
    },
    {
      "title": "The end of Swiftmailer (Symfony Blog)",
      "url": "https://symfony.com/blog/the-end-of-swiftmailer",
      "accessedAt": "2026-10-19"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-19",
    "reviewedAt": "2026-10-19",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Preserve message construction, transport configuration, and delivery behavior while moving from Swiftmailer to Symfony Mailer.",
      "Keep composer.json, composer.lock, and any package that still requires swiftmailer/swiftmailer consistent after the replacement."
    ],
    "steps": [
      {
        "id": "replace-swiftmailer-dependency",
        "title": "Replace the dependency",
        "instructions": "Remove swiftmailer/swiftmailer from composer.json and require symfony/mailer (and any transport packages the project needs), then run `composer update`.",
        "targets": "declaration"
      },
      {
        "id": "migrate-swiftmailer-usages",
        "title": "Migrate Swiftmailer usages",
        "instructions": "Replace reported Swift_Mailer and Swift_Message requires, use statements, constructors, and newInstance calls with the Symfony Mailer Email and Mailer APIs.",
        "targets": "usages"
      }
    ],
    "verification": [
      {
        "command": "composer validate && composer show symfony/mailer",
        "purpose": "Confirm the Composer project is valid and symfony/mailer is installed."
      },
      {
        "command": "composer validate && vendor/bin/phpunit",
        "purpose": "Validate the Composer project and run the PHPUnit suite with the replacement mailer."
      }
    ]
  }
}
