- Rollback getSubscribedEvents Extension refactor by @TavoNiievez in #6862
- Issue 6857: Update Actor::__call() to have return type 'mixed' by @troy-rudolph in #6858
- Fix auto-injection of the tester property by @W0rma in #6856
- Update readme.md by @rossaddison in #6834
- Fix loading keywords in behat/gherkin v4.12 by @W0rma in #6839
- Update Scenario.php: Adding default value to current() by @ThomasLandauer in #6798
- Simplify Step classes by @TavoNiievez in #6842
- Simplify reporter classes by @TavoNiievez in #6803
- Simplify Subscriber classes by @TavoNiievez in #6843
- Fix AssertsTest CI pipeline by @W0rma in #6847
- Simplify Test classes by @TavoNiievez in #6845
- Simplify Template classes by @TavoNiievez in #6844
- Simplify Util classes by @TavoNiievez in #6846
- Simplify src root classes by @TavoNiievez in #6849
- Remove PHP 8.1 support by @TavoNiievez in #6848
- Migrate commands to use AsCommand attribute by @TavoNiievez in #6850
- Add PHPStan integration by @TavoNiievez in #6851
- Support PHPUnit 12 by @W0rma in #6826
- Fix missing absolute path resolving in ParamsLoader by @garvinhicking in #6828
- Fix FAIL message color highlighting by @antonvolokha in #6754
- Update the codebase to PHP 8.1 by @TavoNiievez in #6747
- generate:cest: Adding
declare(strict_types=1);and return typevoidto generated files by @ThomasLandauer in #6736 - Declare nullable parameter types explicitly by @W0rma in #6774 , #6775
- chore: Included githubactions in the dependabot config (#6471) by @SamMousa in #6783
- Added new option --disable-coverage-php to skip coverage.serialized report by @adrenalinkin in #6761
- chore: add branch alias for main to fix composer install with dev deps by @SamMousa in #6787
- chore(ci): prevent test CI running twice on PR branches by @SamMousa in #6788
- Simplify classes by @TavoNiievez in #6767 , #6750 , #6764
- PHP 8.4:
E_STRICTdeprecation by @W0rma in #6802 - Fix PHP 8.4 deprecation. by @kagg-design in #6811
- Fix test suite names in bootstrap command by @W0rma in #6813
- Docs (minor) by @ThomasLandauer in #6804 , #6805 , #6806 , 6807 , #6792 , #6810 , #6751 , #6744
- Prevent unrelated error from being displayed if a scenario step has failed by @craig-mcmahon in #6743
- Replace Laravel5 with Laravel module in module installation suggestion by @W0rma in #6742
- Reimplemented coverage:exclude option for PHPUnit 11 in #6739
- Improved output of Bootstrap command by @ThomasLandauer in #6735
- Support PHPUnit 11
- Note: PHPUnit 11 does not support excluding files from code coverage report
- Add actor to Cest tests dataProviders by @weeg in #6696
- Support symfony 7 by @W0rma in #6723
- Avoid infinite loop while waiting for all running tests to finish by @MarcelBolten in #6710
- Add missing "Attribute::IS_REPEATABLE" to DataProvider attribute by @Fahl-Design in #6715
- Support binary data intest examples by @pongee in #6708
- Improve rendering of $I->assertThat step by @jtheuerkauf in #6719
- Wait for all tests to finish before accessing the serialized test results by @MarcelBolten in #6702
- Updated Support Ukraine link in version string
- Fix sharding for empty tests file by @SamMousa in #6667
- Add AllowDynamicProperties attribute to Unit by @erickskrauch in #6666
- Include mock expectations in assertion count by @rene-bos in #6672
- Allow multiple test dependencies by @mbrodala in #6676
- JUnitReporter: Fixed compatibility with PHPUnit 10.3 by @Naktibalda in #6685
- JUnitReporter: Fixed compatibility with PHPUnit 10.0.16 #6656
- Recorder extension: Fixed type error #6643 by @thomashohn
- Validate test filter pattern without warning #6641 by @dmitryuk
- JUnitReporter: Do not set 'useless' testsuite attribute in strict mode #6635 by @gileri
- Fixed static $defaultName deprecated in _completion command #6633 by @dmitryuk
- Replaced object property assertions removed from PHPUnit 10
- Support for PHPUnit 10
- Disabled phpcs checks in generated action files #6621
$I->wantTo()no longer changes test title at runtime #6622- Display correct failed step when failures and errors happened during test run #6623
- Fixed indentation of
step_decoratorsin config files generated bybootstrap#6624 - Enabled
Conditional,RetryandtryTodecorators in acceptance suite generated bybootstrap#6624 - Improved handling of anonymous classes in parser #6626
- Fixed
canSeeassertions in Unit format #6610 tryTomethods must return boolean result #6614- Fixed various issues with handling of
@skipand@incompleteannotations and attributes in Cest format #6617 - Stopped adding
__mockedfield to mocks created by Stub library #6620 - Fixed deprecated string syntax in Run command #6618 by @shtiher-pp
- Don't disable test shuffling when --shard option is used (#6605)
- Provided typed signatures for attributes (#6600) by @mdoelker
- Support for Attributes in generated Actions files (#6593) by @yesdevnull
- Fixed expectNotToPerformAssertions in unit tests (#6602) by @yesdevnull
- Execute FailFast subscriber before module _failed hooks #6586 by @yesdevnull
- Fixed parsing of @skip annotation #6596
- Undeprecated untyped method arguments in Cest format #6591
- Removed unnecessary overrides of $resultAggregator property in Unit format and TestCaseWrapper #6590
- Print failure/error/warning/skipped/incomplete messages in HTML reports #6595
- Fixed counting of successful tests #6595
- Fixed passing test result to dependent tests in unit tests (#6580)
- Fixed
TypeErrorwhen @coversNothing annotation is used by Slamdunk (#6582) codecept init unitcreatestests/Supportdirectory (#6578)- Fixed phar file url in
self-updatecommand by @voku (#6563) - Added message how to exit Codeception console by @ThomasLandauer (#6561)
- Improved compatibility with PHPUnit 10
- Fixed remote code coverage for namespaced suites (#6533)
- Fixed data provider in abstract Cest class @p-golovin (#6560)
- Fixed issue when include groups and test groups empty @geega (#6557)
- Propagate --ext and --override parameters to included test suites by @calvinalkan (#6536)
- Fixed false negative message about stecman/symfony-console-completion package by @geega (#6541)
- Fixed a number of issues in template functionality (#6552)
- Fixed DataProvider, to properly load dataProviders from abstract classes by @Basster (#6549)
Summary of all differences from Codeception 4
- Basic attribute support
--shard,--grep,--filteroptions- Test can be filtered by data provider case number or name
- Tests of all formats are reported as useless if they perform no assertions and
reports_useless_testssetting is enabled - Array of variables can be passed to all
pausefunctions/methods - Dynamic configuration with parameters can use arrays and other non-string types (#6409)
codecept_pausefunction and$this->pause()in unit tests (#6387)- Interactive console is executed in the scope of paused test class.
- New code coverage settings:
path_coverage- enables path and branch coveragestrict_covers_annotation- marks test as risky if it has@coversannotation but executes some other codeignore_deprecated_code- doesn't collect code coverage for code having@deprecatedannotationdisable_code_coverage_ignore- ignores@codeCoverageIgnore,@codeCoverageIgnoreStartand@codeCoverageIgnoreEndannotations
- Optional value to
fail-fastoption - Dynamic configuration with parameters can use arrays and other non-string types
- PHPUnit is no longer the engine of Codeception, but TestCase format is still supported and assertions are still used
- Generators create namespaced test suites by default
- Replaced Hoa Console with PsySH in
codecept console - Used Symfony VarDumper in
codecept_debug - Fixed DotReporter output format
- Module
afterandfailedhooks are executed in reverse order - Introduced strict typing and other features of PHP 7 and 8.
- Cest format can use data providers from other classes
- Fixed injecting dependencies to actor in Cest and Gherkin formats #6506
- Variadic parameters can be skipped in dependency injection #6505
- Deprecated untyped method arguments in Cest format #6521
JSONandTAPreport formats- Code coverage blacklist functionality
generate:ceptcommand (Ceptformat itself is deprecated)- Deprecated class aliases:
- Codeception\TestCase\Test
- Codeception\Platform\Group
- Codeception\Platform\Group
- Codeception\TestCase
- Settings
log_incomplete_skippedpaths.log(replaced bypaths.output)- Suite setting
class_name(replaced byactor) - Global setting
actor(replaced byactor_prefix)
Configuration::logDirmethod (replaced byConfiguration::outputDirin 2.0)- Custom reporters implementing TestListener are no longer supported and must be converted to Extensions
- PHP 8
- PHPUnit 9 (prepared for upcoming PHPUnit 10)
- Symfony 4.4 - 6.x
- Deprecated untyped method arguments in Cest format #6521
- Improved code style of generated files #6522
- Removed "Powered by PHPUnit" message #6520
- Fixed injecting dependencies to actor in Cest and Gherkin formats #6506
- Variadic parameters can be skipped in dependency injection #6505
- Added new attributes (Prepare, Env, BeforeClass,AfterClass, Given, When, Then)
- Class level attributes are applied to all methods
- Codeception attributes are supported in unit tests
- Cest format can use data providers from other classes
- Substitute invalid UTF-8 characters in debug and step output by @SamoylenkoSU (#6483)
- Implemented basic attribute support (#6449) by @DavertMik
- Significantly reduced dependencies on PHPUnit
- Replaced PHPUnit\Framework\TestResult with ResultAggregator
- Added assertionCount method to ResultAggregator
- DotReporter prints standard result summary (#6441) by @Orchestrator404
- Fixed DotReporter output format
- Fixed fetching remote code coverage data (#6448)
- Loading .env file must not override existing environment variables (#6477)
- All changes from 4.2.0 and 4.2.1:
- Improved multi-application experience, allow filtering suites by name (#6435) by @calvinalkan
- Configuration override is passed to included suites (#5978) by @calvinalkan
- Made dry-run command work with module methods having return types (#6470)
- Support for expectError/Warning/Notice/Deprecation methods in unit tests (Requires PHPUnit 8.4+)
- Implemented new setting
convert_deprecations_to_exceptions(#6469) - Action file generator: Do not return when return type is never (#6462)
- Execute setupBeforeClass/tearDownAfterClass only once (#6481)
- Fix incorrect type declaration in InitTemplate by @ziadoz
- Stricter check for phpdotenv v5 (older versions are not supported)
- Throw exception if actor setting is missing in suite configuration
- Use correct types in ParamsLoader and Configuration classes, avoid type errors
- Added
--shard,--grep,--filteroptions (#6399) - Added new code coverage settings (#6423)
- Dynamic configuration with parameters can use arrays and other non-string types (#6409)
- Introduced
codecept_pausefunction and$this->pause()in unit tests (#6387) - Interactive console is executed in the scope of paused test class.
- Array of variables can be passed to all
pausefunctions/methods - Replaced Hoa Console with PsySH in
codecept console - Used Symfony VarDumper in
codecept_debug(#6406) - Fixed type error in code coverage exclude filter by @W0rma
- Fix type error in Recorder extension
- Use PHPUnit 9 until PHPUnit 10 is released
- Support intersection types in actions
- Introduced PSR-12 code style
- Extracted some code to modules and shared libs
- Fixed new incompatibilities with PHPUnit 10
- Generators create namespaced test suites by default (#6071) by @DavertMik
- Test can be filtered by data provider case number or name (#6363) by @Naktibalda
- Removed
generate:ceptcommand (Cept format is deprecated) - Removed settings
disallow_test_outputandlog_incomplete_skipped. - Removed setting
paths.log(it was replaced bypaths.outputin Codeception 2.3) - Removed suite setting
class_name(replaced byactorin Codeception 2.3) - Removed global setting
actor(replaced byactor_prefixin Codeception 2.3) - Removed
Configuration::logDirmethod (replaced byConfiguration::outputDirin 2.0) - ParamLoader throws exception if xml file is used but simplexml extension is missing (#6346) by @mdoelker
- Updated codebase to use PHP 8.0 features by @TavoNiievez
- Don't report test as useless if it failed (fixed bug introduced in alpha1)
- Don't report local test coverage for remote suites (fixed bug introduced in alpha1)
- Moved XmlBuilder class to module-soap
- Decoupled test execution and reporting from PHPUnit
- Custom reporters implementing TestListener are no longer supported and must be converted to Extensions
- Tests of all formats are reported as useless if they perform no assertions and
reports_useless_testssetting is enabled - Added path_coverage setting to enable path and branch coverage #6158 by @s0lus
- Added optional value to
fail-fastoption (#6275) by #Verest - Module after and failed hooks are executed in reverse order (#6062) by WillemHoman
- Removed
JSONandTAPloggers - Removed code coverage blacklist functionality
- Removed deprecated class aliases
- Codeception\TestCase\Test
- Codeception\Platform\Group
- Codeception\Platform\Group
- Codeception\TestCase
- Introduced strict types in the code base.
- Compatible with PHPUnit 10 only
- Compatible with Symfony 4.4 - 6.0
- Requires PHP 8.0 or higher