Skip to content

4.0.0

Latest

Choose a tag to compare

@hatimox hatimox released this 21 Jan 13:41

Upgrade to PHP 8.0+ and replace SwiftMailer with Symfony Mailer

  • Update minimum PHP version requirement from 7.4 to 8.0
  • Replace swiftmailer/swiftmailer with symfony/mailer
  • Add guzzlehttp/guzzle as explicit dependency
  • Update PHPUnit to ^9.0|^10.0|^11.0
  • Update Symfony components to ^5.0|^6.0|^7.0

Source code modernization:

  • Add PHP 8 typed properties and return types throughout codebase
  • Use union types (string|false, string|callable)
  • Use nullable types (?Type) instead of = null
  • Replace list() with array destructuring syntax
  • Replace call_user_func() with direct invocation
  • Use match expression for SMTP security scheme
  • Fix loose comparisons (== to ===)

Test suite updates:

  • Migrate from PHPUnit_Framework_TestCase to PHPUnit\Framework\TestCase
  • Add :void return types to setUp/tearDown methods
  • Replace deprecated getMock() with createMock()/createPartialMock()
  • Replace deprecated assertInternalType() with assertIsArray()
  • Replace deprecated assertContains() with assertStringContainsString()
  • Replace @ExpectedException annotations with expectException() method
  • Update mail tests to use Symfony MailerInterface