NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1620 most downloaded on Packagist
Codeception module for Symfony framework
Latest stable
3.11.0
Last release 2 months ago
04 Sep 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 36 of 38 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
38 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
> 20 new methods. No breaking changes, no new configuration options, no new traits.
20 new methods. No breaking changes, no new configuration options, no new traits. PHP
^8.2· Symfony5.4·6.4·7.4·8.1
| Method | |
|---|---|
grabEntityManager() |
The EntityManager on the Actor, honouring em_service. |
resetDoctrineManager() |
Reopens an EntityManager closed by a failed flush(). Clears it if still open. |
seeDoctrineSchemaIsValid() |
In-process doctrine:schema:validate. |
seeNumQueriesIsLessThan() |
N+1 guard. |
dontSeeDuplicateQueries() |
N+1 guard. |
$I->amOnPage('/register');
$I->resetDoctrineManager();
$I->seeNumRecords(1, User::class);
| Method | |
|---|---|
grabContainer() |
The test container — private services included. |
mockService() / unmockService() |
Swap a service for a double. Survives kernel reboots. |
$I->mockService('http_client', new MockHttpClient($responses));
| Method | |
|---|---|
seeUserIsGranted() / dontSeeUserIsGranted() |
Runs the app's voters — with a subject. |
$I->seeUserIsGranted('EDIT', $post);
[!NOTE] Requires
symfony/messenger >= 6.3.
| Method | |
|---|---|
grabMessengerTransport() |
The in-memory transport itself. |
seeMessengerTransportContains() |
A message class is queued. |
seeMessengerQueueCount() |
Pending count — sent minus acknowledged or rejected. |
consumeMessengerMessages() |
Handles queued envelopes in-process. |
$I->seeMessengerQueueCount(1, 'async');
$I->consumeMessengerMessages('async');
[!NOTE] Requires Symfony
8.1.runSymfonyConsoleCommand()is unchanged and remains the path for earlier versions.
| Method | |
|---|---|
runCommand() |
Returns an ExecutionResult: status code, stdout and stderr separately. |
assertCommandIsSuccessful() |
|
assertCommandFailed() |
|
assertCommandIsInvalid() |
|
assertCommandResultEquals() |
$result = $I->runCommand('app:import', ['--dry-run' => true]);
$I->assertCommandIsSuccessful($result);
| Method | |
|---|---|
assertSessionHasFlashMessage() |
Non-destructive — reads the flash bag with peek(). |
$I->assertSessionHasFlashMessage('success', 'Your changes were saved.');
_getEntityManager() reopens a closed manager, so one failed write no longer cascades through the test.em_service service is missing or is the wrong type.O(N) instead of O(N²).<sub>#246 · #247 · #248 — Full changelog</sub>
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Restore doctrine.connections after kernel shutdown by @d-mitrofanov-v in https://github.com/Codeception/module-symfony/pull/244
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.10.0...3.10.1
Profiler: Fixed profiler service deprecation by switching to the non-deprecated internal service ID. ([#237])
Minor release featuring two new assertion trait groups, Symfony 8.1 test support, plus DX, performance, and bug fixes.
Introduced MessengerAssertionsTrait for testing dispatched messages ([#241]):
seeMessageDispatched()dontSeeMessageDispatched()seeDispatchedMessageCount()grabDispatchedMessageClasses()Ported directly from Symfony's own test helpers ([#240]):
assertBrowserHistoryIsOnFirstPage(), assertBrowserHistoryIsNotOnFirstPage(), assertBrowserHistoryIsOnLastPage(), assertBrowserHistoryIsNotOnLastPage()assertSelectorCount(), assertAnySelectorTextContains(), assertAnySelectorTextSame(), assertAnySelectorTextNotContains()getMailerEvents(), getMailerMessages(), getMailerMessage()assertEmailAddressNotContains(), assertEmailSubjectContains(), assertEmailSubjectNotContains()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 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.
symfony/messenger as an unchanged dev dependency. ([#243])reset-formats patch using GNU patch (fuzz) and pinned codeception/module-rest to ^3.4 in the functional suite. ([#242])Full Changelog: https://github.com/Codeception/module-symfony/compare/3.9.1...3.10.0
Restore InnerBrowser navigation state for Codeception runs by @TavoNiievez in https://github.com/Codeception/module-symfony/pull/238
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.9.1...3.9.2
fix inconsistencies across assertion traits and tests in https://github.com/Codeception/module-symfony/pull/228, https://github.com/Codeception/module
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.9.0...3.9.1
Allow Symfony 8 by @W0rma in https://github.com/Codeception/module-symfony/pull/225
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.8.0...3.9.0
Standardize to PHP 8.2 and PSR-4 by @TavoNiievez in https://github.com/Codeception/module-symfony/pull/217
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.7.1...3.8.0
Fix profiler issue in https://github.com/Codeception/module-symfony/pull/216
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.7.0...3.7.1
Module code adapted for PHPStan in https://github.com/Codeception/module-symfony/pull/213
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.6.0...3.7.0
Document new Symfony assertions by @TavoNiievez in https://github.com/Codeception/module-symfony/pull/208
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.5.1...3.6.0
Added Symfony Logger assertion (dontSeeDeprecations) (https://github.com/Codeception/module-symfony/pull/206).
Support Symfony 7.2 (https://github.com/Codeception/module-symfony/pull/203). Added Symfony Translation assertions (https://github.com/Codeception/module-symfony/pull/205):
dontSeeFallbackTranslationsdontSeeMissingTranslationsgrabDefinedTranslationsCountseeAllTranslationsDefinedseeDefaultLocaleIsseeFallbackLocalesAreseeFallbackTranslationsCountLessThanseeMissingTranslationsCountLessThanAdded Symfony Logger assertion (dontSeeDeprecations) (https://github.com/Codeception/module-symfony/pull/206).
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.5.0...3.5.1
you can now use all Symfony assertions directly in Codeception with the $I-> syntax.
🆕 New Assertions
you can now use all Symfony assertions directly in Codeception with the $I-> syntax.
assertBrowserCookieValueSame
assertBrowserHasCookie
assertBrowserNotHasCookie
assertRequestAttributeValueSame
assertResponseCookieValueSame
assertResponseFormatSame
assertResponseHasCookie
assertResponseHasHeader
assertResponseHeaderNotSame
assertResponseHeaderSame
assertResponseIsSuccessful
assertResponseIsUnprocessable
assertResponseNotHasCookie
assertResponseNotHasHeader
assertResponseRedirects
assertResponseStatusCodeSame
assertCheckboxChecked
assertCheckboxNotChecked
assertInputValueNotSame
assertInputValueSame
assertPageTitleContains
assertPageTitleSame
assertSelectorExists
assertSelectorNotExists
assertSelectorTextContains
assertSelectorTextNotContains
assertSelectorTextSame
assertHttpClientRequest
assertHttpClientRequestCount
assertNotHttpClientRequest
assertEmailCount
assertEmailIsQueued
assertEmailIsNotQueued
assertQueuedEmailCount
assertFormValue
assertNoFormValue
🔧 Other Changes
cache_router documentation enhancement by @rtwent in https://github.com/Codeception/module-symfony/pull/195🚀 Enjoy the new features and keep building better tests!
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.4.0...3.5.0
Added Symfony Validator assertions in https://github.com/Codeception/module-symfony/pull/189
tests/bootstrap.php if exists, to load all necessary .env files in https://github.com/Codeception/module-symfony/pull/190amLoggedInWithToken method by @codedge in https://github.com/Codeception/module-symfony/pull/182grabParameter: Adding info about bind by @ThomasLandauer in https://github.com/Codeception/module-symfony/pull/193Full Changelog: https://github.com/Codeception/module-symfony/compare/3.3.2...3.4.0
Fix: runSymfonyConsoleCommand ignores specific options in https://github.com/Codeception/module-symfony/pull/188
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.3.1...3.3.2
Renaming Doctrine2 to Doctrine by @ThomasLandauer in https://github.com/Codeception/module-symfony/pull/184
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.3.0...3.3.1
Improved support for PHP 8.1, removed support for PHP 8.0
grabSecurityService for compatibility with Symfony 7.0 by @W0rma in https://github.com/Codeception/module-symfony/pull/178Full Changelog: https://github.com/Codeception/module-symfony/compare/3.2.0...3.3.0
Deprecate event triggered assertions by @xEdelweiss in https://github.com/Codeception/module-symfony/pull/169
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.1.1...3.2.0
Allow installation of lib-innerbrowser v4 to support PHPUnit 10.
Symfony 6.0 support: Session Assertions by @semaz in https://github.com/Codeception/module-symfony/pull/157 and @TavoNiievez in https://github.com/Cod
Full Changelog: https://github.com/Codeception/module-symfony/compare/3.0.0...3.1.0
Nothing published for this version
Update dependencies by @ThomasLandauer and @TavoNiievez in https://github.com/Codeception/module-symfony/pull/149
Improving error message for public services
By @TavoNiievez:
By @ThomasLandauer:
public services ( https://github.com/Codeception/module-symfony/pull/145 )Symfony.php -> trait ( https://github.com/Codeception/module-symfony/pull/143 )Full Changelog: https://github.com/Codeception/module-symfony/compare/2.0.5...2.1.0
Added assertions for Symfony Mime component (#139):
Added assertions for Symfony Mime component (#139):
assertEmailAddressContainsassertEmailAttachmentCountassertEmailHasHeaderassertEmailHeaderNotSameassertEmailHeaderSameassertEmailHtmlBodyContainsassertEmailHtmlBodyNotContainsassertEmailNotHasHeaderassertEmailTextBodyContainsassertEmailTextBodyNotContainsNew method: $I->goToLogoutPath();
New method: $I->goToLogoutPath();
$I->logout(); is now an alias for $I->logoutProgrammatically();
Added changelog link to readme.md (#136) by @Arhell
Added Symfony 5.3 compatibility (#133).
$I->seeRequestTimeIsLessThan() (#132).Fix Doctrine Connection service alias
Logical changes by @mrsombre :
Documentation changes by @ThomasLandauer :
submitSymfonyForm(): Mentioning name attribute (#128)Minor changes in documentation by @ThomasLandauer :
Minor changes in documentation by @ThomasLandauer :
stopFollowingRedirects() restriction for email (#118)"@example.com" as domain in documentation (#124)Added Twig assertions: `seeCurrentTemplateIs`, `seeRenderedTemplate` and `dontSeeRenderedTemplate`.
seeCurrentTemplateIs, seeRenderedTemplate and dontSeeRenderedTemplate.grabSentEmails and grabLastSentEmail functions were added.SeeOrphanEvent and dontSeeOrphanEvent assertions.$url parameter is now optional in the seePageIsAvailable assertion.Symfony 3.4 support removed. Symfony 4.4 or higher is now required.Swift Mailer was dropped in favor of Symfony Mailer; the mailer configuration parameter was removed.If you are already using
Symfony 4.4or higher it should not be necessary to make changes to your tests to update!
Remembered authentication methods now also verify the Cookie generated
New methods by @TavoNiievez:
Remembered authentication methods now also verify the Cookie generated (#81)
Fixed time metric when running test with --debug (#77)
If you're interested in contributing to this module and didn't know where to start, a contribution guide is now available, thanks to @ThomasLandauer and @TavoNiievez (#79).
BC: Removed support for PHP 7.1 and PHP 7.2.
Minor changes: (#65) (#78)
dontSeeRememberedAuthentication
New method by @ThomasLandauer:
New methods by @TavoNiievez:
Now you can run test for all the methods of this module in https://github.com/Codeception/symfony-module-tests .
BC: Remove PHP 7.0 support (#69), code standards updated to PHP 7.1+ (#75)
BC: Removed parameter flags in seeAuthentication, dontSeeAuthentication and persistService, use seeRememberedAuthentication, dontSeeRememberedAuthentication and persistPermanentService instead.
Minor logical change in #74.
> Minor non-logical changes in #57 and #62.
Minor non-logical changes in #57 and #62.
Minor logic fixes (#58), (#59), and (#60) by @TavoNiievez
Minor logic fixes (#51), (#47), (#44), (#41) and (#56).
New methods by @TavoNiievez:
Minor logic fixes (#51), (#47), (#44), (#41) and (#56).
seeUserPasswordDoesNotNeedRehash
New methods by @TavoNiievez:
Supports vlucas/phpdotenv v5 (#28)
Minor logic fixes (#35), (#36), (#37) and (#38)
Improved documentation of the 'Parts' feature by @ThomasLandauer (#40)
BC: Removed support for php 5.6 and Symfony 2.8 (#39)
Supports vlucas/phpdotenv ^3.6 and ^4.1
New methods by @TavoNiievez:
Supports vlucas/phpdotenv ^3.6 and ^4.1
Improved description and error messages of grabService and seeEmailIsSent by @ThomasLandauer
#9 by @ThomasLandauer and @TavoNiievez
#9 by @ThomasLandauer and @TavoNiievez
runSymfonyConsoleCommand works with arguments, options and also console input
Nothing published for this version
One column per quarter.