Skip to content

Conversation

@shahinataei-ts
Copy link

Summary

This PR adds support for Symfony 8 and Behat 4.

The extension code already has the required return types on process() methods, making it compatible with both Behat 3.x and 4.x interfaces (as noted by @mpdude in #218).

Changes

  • Update behat/behat constraint to ^3.22 || ^4.0
  • Update symfony/* dependencies to include ^8.0
  • Add CI matrix entry for Symfony 8.0 with Behat 4.x-dev

Notes

  • Symfony 8 requires Behat 4.x-dev as Behat 3.x doesn't declare Symfony 8 compatibility
  • This PR builds on the discussion in Add Symfony 8 support #218, incorporating @mpdude's insight that the extension is already code-compatible

Related

The extension code already has the required return types on process() methods,
making it compatible with both Behat 3.x and 4.x interfaces.

Changes:
- Update behat/behat constraint to ^3.22 || ^4.0
- Update symfony/* dependencies to include ^8.0
- Add CI matrix entry for Symfony 8.0 with Behat 4.x-dev

Note: Symfony 8 requires Behat 4.x-dev as Behat 3.x doesn't declare
Symfony 8 compatibility in its composer.json constraints.

Relates to Behat/Behat#1687
@mpdude
Copy link
Contributor

mpdude commented Dec 22, 2025

Careful: There is no Behat 4 (yet), so you cannot truly know what the API might look like or how it might change. So maybe it's too early to declare compatibility.

@shahinataei-ts
Copy link
Author

shahinataei-ts commented Dec 23, 2025

Careful: There is no Behat 4 (yet), so you cannot truly know what the API might look like or how it might change. So maybe it's too early to declare compatibility.

Thanks @mpdude, fair point.

You're right that Behat 4 isn't released yet. However, we're blocked on Symfony 8 since Behat 3.x doesn't support it, and the extension only uses core Behat interfaces that are unlikely to change before release.

If you prefer a more conservative approach, I'm happy to:

  • Keep ^3.22 only and just add CI testing for 4.x-dev
  • Or use ^3.22 || 4.0.x-dev to be explicit about the dev constraint

What works best for this project?

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.

2 participants