Skip to content

Releases: Codeception/module-symfony

3.10.0

Choose a tag to compare

@TavoNiievez TavoNiievez released this 27 Jun 01:10
558c038

Minor release featuring two new assertion trait groups, Symfony 8.1 test support, plus DX, performance, and bug fixes.

🚀 New Features

Messenger Assertions

Introduced MessengerAssertionsTrait for testing dispatched messages ([#241]):

  • seeMessageDispatched()
  • dontSeeMessageDispatched()
  • seeDispatchedMessageCount()
  • grabDispatchedMessageClasses()

Symfony-Inherited Assertions

Ported directly from Symfony's own test helpers ([#240]):

  • Browser: assertBrowserHistoryIsOnFirstPage(), assertBrowserHistoryIsNotOnFirstPage(), assertBrowserHistoryIsOnLastPage(), assertBrowserHistoryIsNotOnLastPage()
  • DomCrawler: assertSelectorCount(), assertAnySelectorTextContains(), assertAnySelectorTextSame(), assertAnySelectorTextNotContains()
  • Mailer: getMailerEvents(), getMailerMessages(), getMailerMessage()
  • Mime: assertEmailAddressNotContains(), assertEmailSubjectContains(), assertEmailSubjectNotContains()

🔄 Changed

Mail/Mime Assertions Refactor

Assertions now operate on RawMessage instead of Email to support any sent message type ([#232]):

  • grabLastSentEmail() return type widened from ?Email to ?RawMessage.
  • assertEmailAddressContains(), assertEmailHasHeader(), assertEmailNotHasHeader(), assertEmailHeaderSame(), and assertEmailHeaderNotSame() now accept ?Message instead of ?Email.

⚠️ Important Runtime Note:
The object returned by grabLastSentEmail() remains an Email instance at runtime, but its declared type is now the wider RawMessage. If your tests rely on Email-specific methods (like ->getTo() or ->getSubject()), you must explicitly narrow the type using instanceof Email or a type cast. Alternatively, migrate to the new assertEmailSubjectContains() or header assertions where possible.

Quality of Life & Performance

  • Improved DX, type safety, and performance across all assertion traits by adding/tightening type hints and reducing redundant operations in hot paths. ([#235], [#234])

🐛 Fixed

  • Doctrine: Fixed missing security context in Doctrine entity listeners after a kernel reboot. ([#236])
  • Profiler: Fixed profiler service deprecation by switching to the non-deprecated internal service ID. ([#237])

🛠️ Maintenance

  • Added Symfony 8.1 to the test matrix and included symfony/messenger as an unchanged dev dependency. ([#243])
  • Applied the 7.4 reset-formats patch using GNU patch (fuzz) and pinned codeception/module-rest to ^3.4 in the functional suite. ([#242])

🤝 New Contributors

Full Changelog: 3.9.1...3.10.0

3.9.2

Choose a tag to compare

@TavoNiievez TavoNiievez released this 23 Jun 05:24
99fe8e4

What's Changed

  • Restore InnerBrowser navigation state for Codeception runs by @TavoNiievez in #238

Full Changelog: 3.9.1...3.9.2

3.9.1

Choose a tag to compare

@TavoNiievez TavoNiievez released this 14 Apr 20:34
bed4de2

What's Changed

  • fix inconsistencies across assertion traits and tests in #228, #229 and #230.

Full Changelog: 3.9.0...3.9.1

3.9.0

Choose a tag to compare

@TavoNiievez TavoNiievez released this 01 Apr 00:06

What's Changed

Full Changelog: 3.8.0...3.9.0

3.8.0

Choose a tag to compare

@TavoNiievez TavoNiievez released this 27 Nov 21:32
70e5e06

What's Changed

New Contributors

Full Changelog: 3.7.1...3.8.0

3.7.1

Choose a tag to compare

@TavoNiievez TavoNiievez released this 07 Aug 11:35
ee7cb9c

What's Changed

  • Fix profiler issue in #216

Full Changelog: 3.7.0...3.7.1

3.7.0

Choose a tag to compare

@TavoNiievez TavoNiievez released this 07 Aug 03:40
b6d609c

What's Changed

  • Module code adapted for PHPStan in #213
  • Update to Symfony 7.3 in #214

Full Changelog: 3.6.0...3.7.0

3.6.0

Choose a tag to compare

@TavoNiievez TavoNiievez released this 04 Jun 14:01
c2adb5c

What's Changed

New Contributors

Full Changelog: 3.5.1...3.6.0

3.5.1

Choose a tag to compare

@TavoNiievez TavoNiievez released this 09 Mar 23:04
12fdf09

What's Changed

Support Symfony 7.2 (#203).
Added Symfony Translation assertions (#205):

  • dontSeeFallbackTranslations
  • dontSeeMissingTranslations
  • grabDefinedTranslationsCount
  • seeAllTranslationsDefined
  • seeDefaultLocaleIs
  • seeFallbackLocalesAre
  • seeFallbackTranslationsCountLessThan
  • seeMissingTranslationsCountLessThan

Added Symfony Logger assertion (dontSeeDeprecations) (#206).

Full Changelog: 3.5.0...3.5.1

3.5.0

Choose a tag to compare

@TavoNiievez TavoNiievez released this 14 Nov 05:59
cad3c7a

🎉 Release 3.5.0

🆕 New Assertions

you can now use all Symfony assertions directly in Codeception with the $I-> syntax.

  • Browser assertions:
assertBrowserCookieValueSame
assertBrowserHasCookie
assertBrowserNotHasCookie
assertRequestAttributeValueSame
assertResponseCookieValueSame
assertResponseFormatSame
assertResponseHasCookie
assertResponseHasHeader
assertResponseHeaderNotSame
assertResponseHeaderSame
assertResponseIsSuccessful
assertResponseIsUnprocessable
assertResponseNotHasCookie
assertResponseNotHasHeader
assertResponseRedirects
assertResponseStatusCodeSame
  • DomCrawler assertions:
assertCheckboxChecked
assertCheckboxNotChecked
assertInputValueNotSame
assertInputValueSame
assertPageTitleContains
assertPageTitleSame
assertSelectorExists
assertSelectorNotExists
assertSelectorTextContains
assertSelectorTextNotContains
assertSelectorTextSame
  • HttpClient assertions:
assertHttpClientRequest
assertHttpClientRequestCount
assertNotHttpClientRequest
  • Mailer assertions:
assertEmailCount
assertEmailIsQueued
assertEmailIsNotQueued
assertQueuedEmailCount
  • Form assertions:
assertFormValue
assertNoFormValue

🔧 Other Changes

  • cache_router documentation enhancement by @rtwent in #195
  • Simplify module logic in #196
  • PHP 8.4 compatibility: nullable types and tests by @W0rma in #197 and #201

🚀 Enjoy the new features and keep building better tests!

New Contributors

Full Changelog: 3.4.0...3.5.0