Download Latest Version v4.0.0-alpha1 source code.tar.gz (207.6 kB)
Email in envelope

Get an email when there's a new version of Behat

Home / v4.0.0-alpha1
Name Modified Size InfoDownloads / Week
Parent folder
behat.phar 2026-06-22 3.8 MB
README.md 2026-06-22 3.8 kB
v4.0.0-alpha1 source code.tar.gz 2026-06-22 207.6 kB
v4.0.0-alpha1 source code.zip 2026-06-22 581.7 kB
Totals: 4 Items   4.6 MB 0

This release introduces a number of breaking changes. We have tried to limit the impact of these on end-users – most are in code that we expect is only referenced internally. There are some unavoidable changes that will affect end-users and extension authors, but we expect you will be able to apply the vast majority of updates using automated tools. See https://docs.behat.org/en/v4.x/releases/upgrading-to-4.0.html for advice on upgrading.

For end-users, this is essentially a stable release, ready to use in your CI. The only reason for shipping as an alpha first is to allow extension authors to add support for Behat 4.x and feed back on any issues before we finalise 4.0.0.

We expect there will be a small number of breaking changes between 4.0.0-alpha1 and 4.0.0. See https://docs.behat.org/en/v4.x/releases/upgrading-to-4.0.html for details.

Behat has no corporate backing - the 4.0 release has taken a huge effort from the volunteer maintainers over the last 9 months. If you use Behat for work, please consider showing your appreciation by supporting the project - even small contributions make a big difference.

Changed

  • Future 4.x releases will not guarantee backwards compatibility except for code that is explicitly marked as being part of our public API. See https://docs.behat.org/en/v4.x/releases/backwards-compatibility.html for details.
  • Drop support for using @annotations to define steps, hooks, and transformations by @carlos-granados in #1790
  • Drop support for YAML config and finding files in config dir by @carlos-granados in #1791
  • Drop support for configuring extensions using short names by @carlos-granados in #1793
  • Use GherkinCompatibilityMode::GHERKIN_32 by default by @acoulton in #1812
  • Extension interface should not extend third-party interface by @acoulton in #1796
  • Remove ScenarioLikeTested in favour of separate events by @acoulton in #1834
  • Add strict parameter, property and return types throughout the codebase By @acoulton in #1820, #1822, #1824, and #1831 And by @stof in #1837, #1836, #1839 and #1838.
  • Use explicit type for late-bound Context callable methods by @acoulton in #1854
  • Define a mandatory constructor for SimpleArgumentTransformation implementations by @acoulton in #1854
  • Drop deprecated constants, methods, constructor parameters and similar code. By @acoulton in #1694 and by @carlos-granados in #1814

Added

  • Support Symfony 8 by @Kocal in #1687 and @acoulton in #1758

Internal

NOTE: this includes breaking changes to some classes that are not considered part of the public API from 4.0 onwards.

  • Move StopOnFailureController to Testwork\Tester\Cli namespace by @carlos-granados in #1809
  • Finalise all non-API classes that are not extended by @acoulton in #1815
Source: README.md, updated 2026-06-22