Skip to content

[Behat] Convert main config from YAML to PHP#18866

Merged
TheMilek merged 1 commit intoSylius:2.3from
NoResponseMate:behat/convert-config-main
Feb 24, 2026
Merged

[Behat] Convert main config from YAML to PHP#18866
TheMilek merged 1 commit intoSylius:2.3from
NoResponseMate:behat/convert-config-main

Conversation

@NoResponseMate
Copy link
Copy Markdown
Contributor

@NoResponseMate NoResponseMate commented Feb 24, 2026

Q A
Branch? 2.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets split from #18847
License MIT

Summary by CodeRabbit

  • Chores
    • Restructured the Behat test configuration into a centralized, consolidated configuration approach.
    • Removed legacy Behat configuration and replaced it with a new programmatic config structure.
    • Updated project ignore patterns to reflect configuration file changes and avoid stale config being tracked.
    • Reorganized test suite declarations for clearer grouping of API, CLI, domain, hybrid, and UI suites.

@NoResponseMate NoResponseMate requested review from a team as code owners February 24, 2026 14:03
@NoResponseMate NoResponseMate added Behat Issues and PRs aimed at improving Behat usage. Maintenance CI configurations, READMEs, releases, etc. labels Feb 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 751f084 and 0207fcc.

📒 Files selected for processing (5)
  • .gitignore
  • behat.dist.php
  • behat.yml.dist
  • src/Sylius/Behat/Resources/config/suites.php
  • src/Sylius/Behat/Resources/config/suites.yml
💤 Files with no reviewable changes (2)
  • src/Sylius/Behat/Resources/config/suites.yml
  • behat.yml.dist
🚧 Files skipped from review as they are similar to previous changes (2)
  • behat.dist.php
  • src/Sylius/Behat/Resources/config/suites.php

📝 Walkthrough

Walkthrough

This pull request replaces YAML-based Behat configuration with PHP-based configuration: adds behat.dist.php and src/.../suites.php, removes behat.yml.dist and the imports in src/.../suites.yml, and updates .gitignore to reference the new file name.

Changes

Cohort / File(s) Summary
Top-level config files
/.gitignore, behat.dist.php, behat.yml.dist
Adds behat.dist.php (new PHP Behat config with formatters, extensions, Mink sessions and Chrome/Panther settings), deletes legacy behat.yml.dist, and updates .gitignore to exclude the PHP config (/behat.php entry change).
Suite aggregation
src/Sylius/Behat/Resources/config/suites.php, src/Sylius/Behat/Resources/config/suites.yml
Adds suites.php that returns a Behat Config importing suites/*.yml (api, cli, domain, hybrid, ui); removes the imports section from suites.yml so suite imports are managed by the new PHP file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • TheMilek

Poem

🐇 I nibble configs with a twitchy hop,
From YAML leaves to PHP crop,
Suites in one burrow, tidy and neat,
Tests awake on nimble feet,
A carrot cheer for this small swap! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main change: converting Behat configuration from YAML to PHP format, which aligns with the file modifications shown in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 24, 2026

❌ Preview Environment deleted from Bunnyshell

Available commands:

  • 🚀 /bns:deploy to redeploy the environment

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
behat.dist.php (1)

27-31: Several configuration arrays have non-alphabetical key ordering.

The coding guidelines require alphabetical ordering of PHP array keys where applicable. The following arrays are out of order:

Array Current order Alphabetical order
MinkDebugExtension config directory, clean_start, screenshot clean_start, directory, screenshot
MinkExtension config files_path, base_url, default_session, javascript_session, sessions, show_auto base_url, default_session, files_path, javascript_session, sessions, show_auto
sessions symfony, chromedriver, chrome_headless_second_session, panther chrome_headless_second_session, chromedriver, panther, symfony
capabilities acceptSslCerts, acceptInsecureCerts, unexpectedAlertBehaviour, goog:chromeOptions acceptInsecureCerts, acceptSslCerts, goog:chromeOptions, unexpectedAlertBehaviour

As per coding guidelines: "Order PHP array keys alphabetically where applicable."

Also applies to: 32-90

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@behat.dist.php` around lines 27 - 31, The array keys in the Behat config
blocks are not alphabetically ordered; update the arrays used with
Extension(MinkDebugExtension::class, ...) and Extension(MinkExtension::class,
...) so their keys are alphabetized (e.g., for MinkDebugExtension change
'directory','clean_start','screenshot' to
'clean_start','directory','screenshot'); also reorder the nested 'sessions'
array keys to alphabetic order (e.g.,
'chrome_headless_second_session','chromedriver','panther','symfony') and reorder
the 'capabilities' keys to alphabetical order (e.g.,
'acceptInsecureCerts','acceptSslCerts','goog:chromeOptions','unexpectedAlertBehaviour')
so all PHP array keys follow the project's alphabetical-key guideline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@behat.dist.php`:
- Around line 1-2: Add the strict types declaration to this PHP file by
inserting declare(strict_types=1); immediately after the opening <?php tag so
the file follows the project's coding guideline requiring strict_types for all
PHP files (same change applied in suites.php).

In `@src/Sylius/Behat/Resources/config/suites.php`:
- Around line 1-2: Add a strict types declaration by inserting
declare(strict_types=1); immediately after the opening <?php tag at the top of
the file (i.e., ensure the file begins with "<?php declare(strict_types=1);"),
so the file respects the project's coding guideline requiring strict types.

---

Nitpick comments:
In `@behat.dist.php`:
- Around line 27-31: The array keys in the Behat config blocks are not
alphabetically ordered; update the arrays used with
Extension(MinkDebugExtension::class, ...) and Extension(MinkExtension::class,
...) so their keys are alphabetized (e.g., for MinkDebugExtension change
'directory','clean_start','screenshot' to
'clean_start','directory','screenshot'); also reorder the nested 'sessions'
array keys to alphabetic order (e.g.,
'chrome_headless_second_session','chromedriver','panther','symfony') and reorder
the 'capabilities' keys to alphabetical order (e.g.,
'acceptInsecureCerts','acceptSslCerts','goog:chromeOptions','unexpectedAlertBehaviour')
so all PHP array keys follow the project's alphabetical-key guideline.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32df5bf and 751f084.

📒 Files selected for processing (5)
  • .gitignore
  • behat.dist.php
  • behat.yml.dist
  • src/Sylius/Behat/Resources/config/suites.php
  • src/Sylius/Behat/Resources/config/suites.yml
💤 Files with no reviewable changes (2)
  • src/Sylius/Behat/Resources/config/suites.yml
  • behat.yml.dist

Co-Authored-By: Loïc Frémont <lc.fremont@gmail.com>
@NoResponseMate NoResponseMate force-pushed the behat/convert-config-main branch from 751f084 to 0207fcc Compare February 24, 2026 14:33
@TheMilek TheMilek merged commit f7ae105 into Sylius:2.3 Feb 24, 2026
30 of 36 checks passed
@NoResponseMate NoResponseMate deleted the behat/convert-config-main branch February 24, 2026 14:57
@NoResponseMate NoResponseMate mentioned this pull request Feb 26, 2026
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Behat Issues and PRs aimed at improving Behat usage. Maintenance CI configurations, READMEs, releases, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants