Releases: Codeception/module-symfony
Release list
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
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
What's Changed
Full Changelog: 3.9.0...3.9.1
3.9.0
What's Changed
- Allow Symfony 8 by @W0rma in #225
- Performance Optimizations and Code Audit by @TavoNiievez in 768cdc6
- Run module tests using PHPUnit by @TavoNiievez in c37d23e
Full Changelog: 3.8.0...3.9.0
3.8.0
What's Changed
- Standardize to PHP 8.2 and PSR-4 by @TavoNiievez in #217
- Add notifier assertions trait by @d-mitrofanov-v in #220
- Simplify the module code by @TavoNiievez in #222
New Contributors
- @d-mitrofanov-v made their first contribution in #220
Full Changelog: 3.7.1...3.8.0
3.7.1
3.7.0
What's Changed
Full Changelog: 3.6.0...3.7.0
3.6.0
What's Changed
- Document new Symfony assertions by @TavoNiievez in #208
- Fix parameter name in exception for case when Kernel has custom names… by @prophetz in #199
- Update MailerAssertionsTrait.php: Adding Mailpit by @ThomasLandauer in #204
- Remove PHP 8.1 Support by @TavoNiievez in #211
- Update ServicesAssertionsTrait.php: Adding another hint about private… by @ThomasLandauer in #210
- Replace kernel reboot with actual boot to reset services by @Seros in #209
New Contributors
Full Changelog: 3.5.1...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
3.5.0
🎉 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_routerdocumentation 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