feat: support Symfony 7.4 alongside Symfony 8 - #5
Merged
Conversation
Every Symfony requirement now reads `^7.4 || ^8.0`. No production code changed: `AbstractBundle`, `DefinitionConfigurator::enumFqcn()` and the console attributes this bundle uses all exist in 7.4. The bundle test loaded the extension against a bare `ContainerBuilder`. Building the extension's `ContainerConfigurator` reads `kernel.environment` off the container on 7.4 and 8.0 alike — optional only since 8.1, which is why the suite passed — and `kernel.build_dir` on 7.4 besides. The test sets both now, the way a real kernel does. CI gains a Symfony dimension so both majors run on both supported PHP versions. Flex pins the whole stack to one major per job, which php-actions/composer could not do because it runs composer in its own container and forwards no environment; the jobs now use the composer that setup-php already installs. Released as 2.1.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tomas-kulhanek
force-pushed
the
feat/symfony-7.4-support
branch
from
August 17, 2026 11:09
cab4e61 to
a99f8b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Widens every Symfony requirement from
^8.0to^7.4 || ^8.0, so the bundle installs on the current LTS. Released as 2.1.0.No production code changed
Everything the bundle uses already exists in 7.4:
AbstractBundle,DefinitionConfigurator::enumFqcn()(7.3), the console attributes,ContainerConfigurator.src/is untouched in this PR.One test fix
EncryptionBundleTest::load()handed the extension a bareContainerBuilder. Building the extension'sContainerConfiguratorreads parameters off that container:kernel.environmentkernel.build_dirSo the test was already relying on resolving to 8.1; 19 of its cases fail on a pinned 8.0 stack on
maintoday. It now sets both parameters, the way a real kernel does.CI
ci.yamlandmonthly.yamlgain asymfony-versionmatrix dimension (7.4.*,8.*) crossed with the existing PHP versions — 4 jobs per workflow.reusable-checks.yamldropsphp-actions/composerin favour of the composer thatsetup-phpalready installs. The old action runs composer inside its own container and forwards no environment, so it cannot carrySYMFONY_REQUIREto Flex. With Flex installed globally, each job resolves one whole Symfony major instead of a mix the constraints happen to permit — the transitive components (symfony/string,symfony/cache, …) would otherwise float to 8.x even in a 7.4 job.Verified locally
Full gate —
phpunit,phpstan,phpcs,rector:check,composer validate --strict— green on PHP 8.5 against three Flex-pinned stacks:7.4.*→ 7.4.14–7.4.16)8.0.*→ 8.0.15)mainresolves today)88 tests, 186 assertions, OK on each.
🤖 Generated with Claude Code