Convert Behat annotations to PHP attributes in Api common contexts#18834
Conversation
📝 WalkthroughWalkthroughThree Behat test step methods in the ResponseContext class were modernized to use PHP 8 attributes instead of docblock annotations, with the corresponding import statement added. No functional or control flow changes were made. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
❗ Preview Environment delete from Bunnyshell failedCheck https://github.com/Sylius/Sylius/actions/runs/22131501580 for details. See: Environment Details Available commands:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/Sylius/Behat/Context/Api/Common/ResponseContext.php (1)
16-17: Import order:usestatements are not sorted alphabetically.
Behat\Step\Then(line 16) is placed beforeBehat\Behat\Context\Context(line 17), but alphabeticallyBehat\Behat\…should precedeBehat\Step\….Suggested fix
-use Behat\Step\Then; use Behat\Behat\Context\Context; +use Behat\Step\Then; use Sylius\Behat\Client\ApiClientInterface;As per coding guidelines: "Sort PHP
useimports alphabetically and group by type (classes, functions, constants)".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Context/Api/Common/ResponseContext.php` around lines 16 - 17, Import order is incorrect: swap and alphabetize the use statements so Behat\Behat\Context\Context comes before Behat\Step\Then (and ensure all other imports are sorted alphabetically and grouped by type); update the use block in ResponseContext.php to list classes in alphabetical order (e.g., Behat\Behat\Context\Context then Behat\Step\Then) to comply with the project's import ordering guideline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/Sylius/Behat/Context/Api/Common/ResponseContext.php`:
- Around line 16-17: Import order is incorrect: swap and alphabetize the use
statements so Behat\Behat\Context\Context comes before Behat\Step\Then (and
ensure all other imports are sorted alphabetically and grouped by type); update
the use block in ResponseContext.php to list classes in alphabetical order
(e.g., Behat\Behat\Context\Context then Behat\Step\Then) to comply with the
project's import ordering guideline.
Summary by CodeRabbit