3.10.1
3.10.0
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?Emailto?RawMessage.assertEmailAddressContains(),assertEmailHasHeader(),assertEmailNotHasHeader(),assertEmailHeaderSame(), andassertEmailHeaderNotSame()now accept?Messageinstead of?Email.
⚠️ Important Runtime Note:
The object returned bygrabLastSentEmail()remains anRawMessage. If your tests rely on->getTo()or->getSubject()), you must explicitly narrow the type usinginstanceof Emailor a type cast. Alternatively, migrate to the newassertEmailSubjectContains()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/messengeras an unchanged dev dependency. ([#243]) - Applied the 7.4
reset-formatspatch using GNU patch (fuzz) and pinnedcodeception/module-restto^3.4in the functional suite. ([#242])
🤝 New Contributors
Full Changelog: 3.9.1...3.10.0
3.9.2
3.9.1
3.9.0
3.8.0
3.7.1
3.7.0
What's Changed
Full Changelog: 3.6.0...3.7.0
3.6.0
3.5.1
What's Changed
Support Symfony 7.2 (#203).
Added Symfony Translation assertions (#205):
dontSeeFallbackTranslationsdontSeeMissingTranslationsgrabDefinedTranslationsCountseeAllTranslationsDefinedseeDefaultLocaleIsseeFallbackLocalesAreseeFallbackTranslationsCountLessThanseeMissingTranslationsCountLessThan
Added Symfony Logger assertion (dontSeeDeprecations) (#206).
Full Changelog: 3.5.0...3.5.1