Skip to content

IBX-12041: Allowed the behat env on Symfony 8.1 Kernels - #150

Merged
ViniTou merged 3 commits into
mainfrom
IBX-12046-allow-behat-env
Oct 8, 2026
Merged

ViniTou merged 3 commits into
mainfrom
IBX-12046-allow-behat-env

Conversation

@ViniTou

@ViniTou ViniTou commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12041

Related PRs:

Description:

Symfony 8.1's framework-bundle recipe ships a Kernel with getAllowedEnvs() returning ['prod', 'dev', 'test'], and the project here runs in behat - so once 6.0 resolves Symfony 8.1, every browser test build fails on Kernel boot.

allow_behat_env adds 'behat' to that list in the project's src/Kernel.php. It's a no-op for Kernels without getAllowedEnvs() (Symfony 7.x recipes), so current 6.0 builds are unaffected, and only bin/6.0.x-dev and v6 stable builds (bin/stable, gated on v6.0) are touched. In the stable script all composer runs already use --no-scripts, so one call before the project boots is enough. The helper is inline in both scripts on purpose: nested scripts are fetched from CI_SCRIPTS_REF (main by default), so a new _common file would 404 until this is merged. The first composer update now runs with --no-scripts and the scripts run after the Kernel is patched, since post-update-cmd boots it.

Has to be merged before (or together with) the IBX-12041 batch.

For QA:

CI only. Same code ran in the browser tests of the batch PRs via a tmp ci-scripts branch.

Documentation:

N/A

Symfony 8.1's framework-bundle recipe ships a Kernel that limits APP_ENV to getAllowedEnvs() (prod, dev, test), so 6.0 project builds running in the behat env fail to boot.
@ViniTou
ViniTou requested a review from a team October 8, 2026 07:05
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@ViniTou
ViniTou merged commit 770fd0c into main Oct 8, 2026
6 checks passed
@ViniTou
ViniTou deleted the IBX-12046-allow-behat-env branch October 8, 2026 12:24
ViniTou added a commit that referenced this pull request Oct 8, 2026
* IBX-12041: Allowed the behat env on Symfony 8.1 Kernels

Symfony 8.1's framework-bundle recipe ships a Kernel that limits APP_ENV to getAllowedEnvs() (prod, dev, test), so 6.0 project builds running in the behat env fail to boot.

* IBX-12041: Allowed the behat env on Symfony 8.1 Kernels of stable v6 builds

* IBX-12041: Matched v6.0 like the other stable version checks
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.

4 participants