Skip to content

Add Symfony 8.0 and 8.1 to CI matrix#229

Open
pamil wants to merge 6 commits into
masterfrom
ci/add-symfony-8
Open

Add Symfony 8.0 and 8.1 to CI matrix#229
pamil wants to merge 6 commits into
masterfrom
ci/add-symfony-8

Conversation

@pamil

@pamil pamil commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add 8.0.* and 8.1.* to the Symfony version matrix
  • Add a conditional step that patches behat/behat to 4.x-dev@dev for Symfony 8+ jobs, since behat 3.x does not support Symfony 8 — the main composer.json stays on ^3.22
  • The lock-symfony-version.sh script already handles pinning symfony/* packages to the target minor

Note

behat/behat has no tagged 4.x release yet (only 4.x-dev). Once v4.0.0-alpha1 is tagged on Packagist the constraint can be tightened to a proper version.

🤖 Generated with Claude Code

pamil and others added 6 commits June 12, 2026 12:49
behat 3.x does not support Symfony 8+. A conditional workflow step
patches the behat/behat constraint to 4.x-dev@dev for Symfony 8+ jobs
only, keeping the main composer.json on the stable ^3.22 constraint.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…SF 8.1

- Use inline alias "4.x-dev@dev as 3.31.0" so behat 4.x satisfies the
  ^3.x constraints of friends-of-behat/* packages without removing them
- Exclude PHP 8.3 + Symfony 8.1 from the matrix since SF 8.1 requires PHP >=8.4.1

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Drop the @dev stability flag from the inline alias (it caused Composer
to treat it as an exact version match rather than an alias), and
explicitly set minimum-stability=dev + prefer-stable=true so the
4.x-dev branch is resolvable.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ility

Behat 4.x dropped YAML config and docblock annotations entirely:

- Add behat.dist.php (PHP config format behat 4.x requires)
- Add tests/Behat/Config/ArrayConfig.php to wrap merged YAML arrays
  as ConfigInterface for subprocess behat.dist.php generation
- Update TestContext to write both YAML (behat 3.x) and PHP (behat 4.x)
  configs in thereIsConfiguration, updated incrementally on each call
- Add PHP 8 step/hook attributes alongside existing docblock annotations
  in thereIsFile so embedded context classes work under behat 4.x
- Resolve behat 3.x short extension names to full class names in the
  PHP config (behat 4.x requires FQCNs)
- Exclude mink_integration and fob_page_object_integration from Symfony
  8+ CI runs (those extensions do not yet support behat 4.x)
- Also exclude PHP 8.3 + Symfony 8.0 (Symfony 8.0 requires PHP >=8.4)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… only

- Bump behat to ^3.31 (first version with both PHP 8 attr and PHP config support)
- Replace all short extension names in feature files with FQCNs so no
  name resolution is needed in TestContext
- TestContext: single code path for behat 3.31 and 4.x — no isBehat4
  detection, no behat3Imports, no resolveExtensionClass map
- thereIsConfiguration: writes only behat.dist.php (PHP config); both
  behat 3.31 and 4.x can read it, with behat.yml.dist taking priority
  for the outer run in behat 3.31
- thereIsFile: always replaces @Given/@When/@then docblocks with PHP 8
  attributes so subprocess context classes work identically under both
- Also exclude PHP 8.3 + Symfony 8.0 from CI matrix (SF 8.0 requires PHP >=8.4)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
friends-of-behat/service-container-extension uses XmlFileLoader which
was removed in Symfony 8. Exclude the three affected sanity_checks
feature files instead of the whole directory.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@GSadee GSadee mentioned this pull request Jun 22, 2026
25 tasks
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.

1 participant