Skip to content

IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration - #116

Open
ViniTou wants to merge 1 commit into
6.0from
IBX-12374-behat-attributes
Open

IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration#116
ViniTou wants to merge 1 commit into
6.0from
IBX-12374-behat-attributes

Conversation

@ViniTou

@ViniTou ViniTou commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12374

Description:

Part of the Behat 4 upgrade. Behat 4 removes docblock annotations (@Given/@When/@Then) and YAML configuration; the Behat 3.32 already installed accepts PHP attributes and PHP config, so this converts the bundle ahead of the ibexa/behat switch without changing behaviour. Every bundle with Behat contexts gets the same treatment independently.

The 55 annotations (incl. 4 @BeforeScenario hooks) in the 6 Behat contexts were converted by Rector (->withAttributesSets(behat: true), now enabled in rector.php, so new annotations fail the rector CI job); Behat 4 also requires explicit parameter/return types on step methods, added where missing (3 methods, with the corresponding "no type specified" phpstan baseline entries dropped). behat_suites.php is the --convert-config output of behat_suites.yml; the YAML file stays until ibexa/behat imports the PHP one, because the root config references it by filename and the two packages' versions drift within an app.

The direct behat/behat dev requirement is widened to ^3.32 || ^4.0 so the attributes are recognised.

For QA:

No functional change to the scenarios; same suites run. phpstan and check-cs green.

Documentation:

N/A

@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants