Repository navigation
Read Behat step definitions from PHP attributes - #686
Conversation
wp-cli-tests v5.6.0 declares step definitions with attributes such as #[Given( 'an empty directory' )] instead of @given docblock annotations. The generator only parsed the annotations, so it found no steps and removed all Behat steps pages. Read the attributes as well, keeping the docblock parsing as a fallback for older versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWTd5qhPpccgCgUjqYTBZP
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
wp-cli/wp-cli-tests v5.6.0 (wp-cli/wp-cli-tests#428) moved the Behat step definitions from
@Given/@When/@Thendocblock annotations to PHP attributes (#[Given( '...' )]).gen-behat-docsonly parsed the annotations, so it found no steps and deleted every page underreferences/behat-steps/, as seen in #685.This also reads
Behat\Step\Given|When|Thenattributes via reflection and feeds them into the samebehat_step/parametersstructure the docblock parser produces. Docblock parsing is kept as a fallback for older versions.Tested against wp-cli-tests
main: all 49 public step definitions resolve, and step names match the previous format (e.g.Given /^an? (empty|non-existent) ([^\s]+) directory$/).Generated by Claude Code
Summary by CodeRabbit