Skip to content

Symfomy 8.x interface compatibility#94

Open
mpdude wants to merge 2 commits into
forceedge01:masterfrom
mpdude:prepare-behat-4
Open

Symfomy 8.x interface compatibility#94
mpdude wants to merge 2 commits into
forceedge01:masterfrom
mpdude:prepare-behat-4

Conversation

@mpdude

@mpdude mpdude commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

Symfony 8 added return types to all interfaces and classes. This leaks through the Behat API in places where Behat used classes from Symfony, for example the Event Dispatcher implementation or the \Behat\Testwork\ServiceContainer\Extension interface which extends \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface.

The Behat maintainers work on creating a new Behat release supporting Symfony 8, but it will also affect extensions like this one (Behat/Behat#1687).

@mpdude mpdude changed the title Prepare for Behat 4.x / Symfomy 8.x compatibility Symfomy 8.x compatibility Dec 17, 2025
Symfony 8 added return types to all interfaces and classes. This leaks through the Behat API in places where Behat used classes from Symfony, for example the Event Dispatcher implementation or the `\Behat\Testwork\ServiceContainer\Extension` interface which extends `\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface`.

The Behat maintainers work on creating a new Behat release supporting Symfony 8, but it will also affect extensions like this one (Behat/Behat#1687).

We cannot yet tell what Behat 4 will look like and whether any other changes will be required, but this change here is a fix that can be applied as of today
@mpdude mpdude changed the title Symfomy 8.x compatibility Symfomy 8.x interface compatibility Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant