Skip to content

feat: support Symfony 7.4 alongside Symfony 8 - #5

Merged
tomas-kulhanek merged 1 commit into
mainfrom
feat/symfony-7.4-support
Aug 17, 2026
Merged

feat: support Symfony 7.4 alongside Symfony 8#5
tomas-kulhanek merged 1 commit into
mainfrom
feat/symfony-7.4-support

Conversation

@tomas-kulhanek

@tomas-kulhanek tomas-kulhanek commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Widens every Symfony requirement from ^8.0 to ^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 bare ContainerBuilder. Building the extension's ContainerConfigurator reads parameters off that container:

parameter 7.4 8.0 8.1
kernel.environment required required optional
kernel.build_dir required

So the test was already relying on resolving to 8.1; 19 of its cases fail on a pinned 8.0 stack on main today. It now sets both parameters, the way a real kernel does.

CI

ci.yaml and monthly.yaml gain a symfony-version matrix dimension (7.4.*, 8.*) crossed with the existing PHP versions — 4 jobs per workflow.

reusable-checks.yaml drops php-actions/composer in favour of the composer that setup-php already installs. The old action runs composer inside its own container and forwards no environment, so it cannot carry SYMFONY_REQUIRE to 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:

  • Symfony 7.4 (7.4.* → 7.4.14–7.4.16)
  • Symfony 8.0 (8.0.* → 8.0.15)
  • Symfony 8.1 (unpinned, as main resolves today)

88 tests, 186 assertions, OK on each.

🤖 Generated with Claude Code

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
tomas-kulhanek force-pushed the feat/symfony-7.4-support branch from cab4e61 to a99f8b3 Compare August 17, 2026 11:09
@tomas-kulhanek
tomas-kulhanek merged commit d65c32a into main Aug 17, 2026
8 checks passed
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