Removed 'behat.yml' and 'behat.dist.yml' so Behat 3 and Behat 4 both run the suite from 'behat.php'. - #142
Conversation
…icated 'test_data.bin'.
…e suite from 'behat.php'.
… contributor, agent and upgrade guides.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
💤 Files with no reviewable changes (3)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour. 📝 WalkthroughWalkthroughThe change removes Behat YAML configuration, documents PHP configuration as the sole reference, updates archive handling, and adjusts configuration and file-response tests for the new setup. ChangesPHP Behat configuration migration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The documented Behat 3 compatibility guidance remains valid, and no actionable current-head risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 PHPStan (2.2.12)Composer install failed: the lock file is not up to date with the latest changes in composer.json. Run Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #142 +/- ##
=======================================
Coverage 96.25% 96.25%
=======================================
Files 3 3
Lines 427 427
=======================================
Hits 411 411
Misses 16 16 ☔ View full report in Codecov by Harness. |
Summary
Behat 3 and Behat 4 now both run the suite from
behat.php, andbehat.dist.phpis the only reference configuration the package ships.behat.ymlandbehat.dist.ymlare gone.Behat 3's
ApplicationFactory::getConfigPath()checksbehat.yaml,behat.yml,behat.yaml.dist,behat.yml.dist,behat.dist.yamlandbehat.dist.ymlbefore it looks atbehat.php, so the Behat 3 jobs ranbehat.ymlwhile the Behat 4 jobs ranbehat.php, and every suite change had to land in both files. Deleting onlybehat.ymlwouldn't have worked: Behat 3 would then have loadedbehat.dist.yml, whoseApiServerContextwebroot is avendor/path that doesn't exist in this repo.On Behat 3, the run from
behat.phpmatches the old run frombehat.yml(17 scenarios, 181 steps, 54.24% Behat line coverage), and Behat 4 gives the same numbers.BehatConfigTest::testNoYamlConfig()now fails if any of those 6 YAML names shows up at the repo root. The CI workflow,composer.jsonand the Behat version floors don't change, and consumers can keep using abehat.ymlon Behat 3.Before / After
Changes
behat.ymlandbehat.dist.yml, and dropped/behat.ymlfrom.gitattributes.BehatDistConfigTesttoBehatConfigTest. The YAML-vs-PHP comparison is gone, andtestDistSetsEveryOption()reads the context options frombehat.dist.php. The newtestNoYamlConfig()covers the 6 YAML names Behat 3 checks at the root. It leavesconfig/alone, because Behat 3 only looks there afterbehat.php.ApiServerContextTest::testApiWillRespondWithFile()uses the newtests/behat/fixtures/test_data.binfor the unknown-extension case, so the test no longer needs the repo root in itspaths.README.mdopens Usage with a singlebehat.phpexample that registers both contexts, in place of the 2 YAML examples and the separate PHP configuration section. The version table stays as it is, since Behat 3 still reads the YAML names it lists.CONTRIBUTING.mdandAGENTS.mdno longer describe a separate config file per Behat major, andUPGRADE.mdnotes that the reference configuration ships asbehat.dist.phponly.