Skip to content

Convert Behat annotations to PHP attributes in Api contexts#18842

Merged
TheMilek merged 1 commit intoSylius:2.3from
loic425:behat-annotations-to-attributes/api
Feb 18, 2026
Merged

Convert Behat annotations to PHP attributes in Api contexts#18842
TheMilek merged 1 commit intoSylius:2.3from
loic425:behat-annotations-to-attributes/api

Conversation

@loic425
Copy link
Copy Markdown
Member

@loic425 loic425 commented Feb 18, 2026

Q A
Branch? 2.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets partially #18822
License MIT

Summary by CodeRabbit

  • Refactor
    • Updated annotation syntax in test context utilities to align with modern PHP standards.

@loic425 loic425 requested review from a team as code owners February 18, 2026 12:49
@loic425 loic425 mentioned this pull request Feb 18, 2026
27 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The pull request migrates Behat context classes from legacy docblock annotations to PHP 8 attributes. Two files are updated: DebugContext.php (converting hook annotations) and EmailContext.php (converting step annotations), with no changes to method signatures or control flow.

Changes

Cohort / File(s) Summary
Behat Annotation Migration
src/Sylius/Behat/Context/Api/DebugContext.php, src/Sylius/Behat/Context/Api/EmailContext.php
Converted docblock-style annotations to PHP 8 attributes. Added corresponding use statements for Behat hooks/steps. Method signatures and logic remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

Maintenance

Suggested reviewers

  • TheMilek
  • GSadee

Poem

🐰 ✨ From docblocks old to attributes new,
PHP 8 shines with cleaner view,
The Behat hooks now gleam so bright,
No logic changed—just metadata's light! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: converting Behat annotations to PHP attributes in API context files, which is clearly supported by the file-level summaries showing annotation format changes in DebugContext.php and EmailContext.php.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@TheMilek TheMilek merged commit dd03fd2 into Sylius:2.3 Feb 18, 2026
36 checks passed
@github-actions
Copy link
Copy Markdown

❗ Preview Environment delete from Bunnyshell failed

Check https://github.com/Sylius/Sylius/actions/runs/22142702966 for details.

See: Environment Details

Available commands:

  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@loic425 loic425 deleted the behat-annotations-to-attributes/api branch February 18, 2026 14:09
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