Skip to content

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

Merged
ViniTou merged 2 commits into
6.0from
IBX-12374-behat-attributes
Sep 7, 2026
Merged

IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration#812
ViniTou merged 2 commits into
6.0from
IBX-12374-behat-attributes

Conversation

@ViniTou

@ViniTou ViniTou commented Aug 28, 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 65 annotations 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. 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.

For QA:

No functional change to the scenarios; same suites run. Any phpstan/phpunit failures on this branch are pre-existing on 6.0 with the local vendor state; nothing was baselined.

Documentation:

N/A


🟢 Verified green CI run: https://github.com/ibexa/core/actions/runs/33147930434

* Makes sure a content type with $identifier and with the provided $fields definition.
*/
#[Given('(that) a content type exists with identifier :identifier with fields:')]
#[Given('(that) a content type exists with identifier :identifier in Group with identifier :groupIdentifier with fields:')]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? It's supposed to be a data table.

@ViniTou ViniTou Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is, that table definition was never part of step definition, it serves only as documentation - actual table stil sits in TableNode.

@ViniTou ViniTou changed the title IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration [TMP] IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration Sep 4, 2026
@ViniTou ViniTou changed the title [TMP] IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration Sep 7, 2026
@ViniTou
ViniTou force-pushed the IBX-12374-behat-attributes branch from 92fa960 to 9fb0b99 Compare September 7, 2026 06:43
@ViniTou
ViniTou force-pushed the IBX-12374-behat-attributes branch from 9fb0b99 to 21bc348 Compare September 7, 2026 10:16
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

@ViniTou
ViniTou merged commit 7a11de1 into 6.0 Sep 7, 2026
13 checks passed
@ViniTou
ViniTou deleted the IBX-12374-behat-attributes branch September 7, 2026 10:51
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.

5 participants