Skip to content

Releases

Released version 2.7.0

Choose a tag to compare

@dg dg released this 26 Oct 22:25

Tester 2.7 makes itself at home in CI: failures land right in the pull request diff, hanging tests no longer hang the pipeline, and slow tests have nowhere to hide.

✨ New Features

  • GitHub Actions annotations – the new -o github output marks failed tests directly in the PR diff view, and it switches on automatically when Tester runs on GitHub Actions, so there is nothing to configure
  • Test time limit – --timeout <seconds> sets a limit for every test, @timeout overrides it per file; a test that runs over is terminated and reported as a failure instead of blocking the whole run
  • --slowest – prints the 10 (or as many as you ask for) slowest tests after the run, so you know exactly where the time goes
  • #[DataProvider] and #[Throws] attributes – TestCase methods can now use PHP attributes instead of docblock annotations; the annotations keep working
  • HttpAssert::fetch() accepts a timeout (30 seconds by default), so an unresponsive server can't stall a test
  • JUnit reports now include test durations, for failed and skipped tests as well
  • Faster cold start – TestCase methods are discovered in parallel with other tests, and each test file's annotations are parsed only once

💥 Breaking Changes

  • PHP 8.1 is now the minimum required version
  • Environment::skip(), Environment::exit() and TestCase::skip() now return never; a subclass overriding them must change its return type too
  • The tester command exits with a non-zero code when it finds no tests, so a mistyped path no longer passes in CI
  • A TestCase data provider that returns no data sets is now an error, just like an empty file-level provider
  • Assertion type 'integer' in Assert::type() is deprecated, use 'int'

🐛 Bug Fixes

  • TAP and JUnit outputs no longer contain ANSI color sequences
  • Environment::lock() reports an error when the lock directory does not exist

Released version 2.6.3

Choose a tag to compare

@dg dg released this 23 Oct 11:22

✨ New Features

  • Runner now warns you when Xdebug is active and slows the whole run down many times over, so a forgotten xdebug.mode no longer quietly costs you minutes (no warning when Xdebug serves as the code coverage engine)

🐛 Bug Fixes

  • FileMock is ready for PHP 8.6
  • Call arguments in stack traces stay on a single line even when strings contain newlines or tabs

Released version 2.6.2

Choose a tag to compare

@dg dg released this 13 Sep 00:22

✨ New Features

  • TestCase::run() runs every test method even after one fails, so a single run shows you all failures at once: results first, details of each failure after them (#469)
  • Stack traces show call arguments, so you see right away which call failed: redirect('https://…', 302) instead of a bare redirect()
  • PHP 8.6 support

🐛 Bug Fixes

  • @phpVersion handles the boundary versions correctly: @phpVersion 8.4.3 runs on PHP 8.4.3 and < 8.0 no longer runs on 8.0; common forms like @phpVersion 8.1 behave as before
  • Assert::exception() and Assert::error() check the message also when it is '' or '0'; to skip the message check, pass null
  • JUnit report counts failed tests in the failures attribute instead of errors; update your CI if it reads only errors
  • With --stop-on-fail and parallel jobs, running tests are finished before the runner exits, and Ctrl+C terminates them
  • Environment::lock() on Windows leaves the test its full time limit after waiting for the lock
  • HttpAssert with follow: true takes headers from the final response only
  • Code coverage: fixes in the HTML report and Clover metrics, the summary line no longer mixes into TAP or JUnit output on stdout, and tester exits with code 1 when the requested report cannot be generated

🛡️ Robustness

  • Fixes in edge cases of Assert::match() masks (UTF-8, %f%), FileMock (append, rb+, touch()), DomQuery selectors on PHP < 8.4, Dumper with references and the JUnit report with invalid UTF-8 in the output
  • @multiple with an invalid value and Helpers::purge() on a path resolving to the root directory are reported as errors

Released version 2.6.1

Choose a tag to compare

@dg dg released this 11 May 18:21
  • PhpInterpreter now passes the command to proc_open() as an array, so PHP handles argument escaping itself and the subshell is bypassed on Linux too – fewer surprises with paths and arguments containing spaces or special characters
  • Test::getResult() throws a LogicException instead of silently returning an unset value when the test hasn't finished running yet – mistakes surface immediately rather than turning into puzzling downstream errors
  • Improved PHPDoc types and descriptions throughout the framework for better IDE hints and static analysis

Released version 2.6.0

Choose a tag to compare

@dg dg released this 22 Jan 06:49

This release brings true parallel test execution on Windows, smarter PHP configuration handling, and a bunch of quality-of-life improvements. The headline: Tester now respects your system php.ini by default, which is a breaking change but makes the "it works on my machine" debugging sessions a lot shorter.

Breaking Changes

  • Tester now uses system php.ini by default (#465)

Improvements

  • Parallel execution on Windows finally works properly – PHP 8.5's stream_select() fix means Windows users can now enjoy actual parallelism, not just the illusion of it.
  • Fixed output loss on fast-exiting processes – A race condition could swallow test output when processes finished too quickly. Your test results now survive speed.

New Features

  • test() and testException() lifecycle improvements – Both functions now properly call setUp() and tearDown(), and tearDown() runs even when tests fail. Your cleanup code will actually clean up.
  • Added global function testNoError()

Released version 2.5.7

Choose a tag to compare

@dg dg released this 22 Nov 18:52

support for PHP 8.5

Released version 2.5.6

Choose a tag to compare

@dg dg released this 06 Aug 23:21
  • support for PHP 8.5
  • added HttpAssert
  • added Assert::notMatch()

Released version 2.5.5

Choose a tag to compare

@dg dg released this 19 Jun 18:33
  • Dumper::toPhp() prints enum case directly (#457)
  • DomQuery: uses PHP 8.4 HTML DOM
  • added DomQuery::closest()
  • DomQuery:: fixed UTF-8 handling
  • DomQuery:: supports :scope
  • optimized global function calls

Released version v2.5.4

Choose a tag to compare

@dg dg released this 23 Oct 23:44
  • supports PHP 8.4
  • TestHandler: improve cache file uniqueness (#454)
  • DataProvider: parses INI files using INI_SCANNER_TYPED mode (BC break)

Released version 2.5.3

Choose a tag to compare

@dg dg released this 18 Jun 18:45
  • Add testcase method's name to the test's title. (#451)
  • TestCase: removed NULL byte from class names, thx @smuuf #450 #449
  • added DomQuery::matches()
  • code coverage: fix compatibility with PHP 8.3 #446
  • test(): checks count of arguments