Skip to content

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

Open
ViniTou wants to merge 2 commits into
6.0from
IBX-12374-behat-attributes
Open

IBX-12374: Convert Behat annotations to attributes and add PHP suite configuration#812
ViniTou wants to merge 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

@sonarqubecloud

Copy link
Copy Markdown

* 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.

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