Skip to content

feat: support Symfony 5 and 6 - #11

Merged
prgTW merged 3 commits into
masterfrom
feat/symfony-5-6-support
Oct 18, 2026
Merged

prgTW merged 3 commits into
masterfrom
feat/symfony-5-6-support

Conversation

@prgTW

@prgTW prgTW commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

  • On Symfony 4.4, cache_tags:invalidate logs a deprecation because execute() returns null.
  • On Symfony 5 and 6 the bundle does not run: the listeners type-hint the removed Filter*Event classes, setDeprecated() needs 3 arguments on 6.x, and MASTER_REQUEST is gone. composer.json does not allow those versions.
  • The bundle loads YAML config but does not require symfony/yaml.
  • There are no tests and no CI.

Solution

  • execute() returns 0.
  • Listener arguments are untyped; the response listener uses isMainRequest() when available.
  • host_header uses the 3-argument setDeprecated() on Symfony 5.1+.
  • Symfony constraints gain ^5.0 || ^6.0; symfony/yaml is required.
  • A PHPUnit suite: a kernel/container smoke test (FrameworkBundle, SensioFrameworkExtraBundle and this bundle, two Varnish proxies, one with host_header), the controller listener with @CacheTag\Plain, the X-CACHE-TAGS response header, cache_tags:invalidate against a fake local endpoint, and the Configuration tree.
  • A GitHub Actions matrix (below). Symfony 7 is not included: sensio/framework-extra-bundle, a hard requirement, does not support it.

Behaviour

No change to the bundle's behaviour. The tests and CI are additive (dev dependencies and tests/ only).

Verification

All 14 CI legs pass (Symfony / PHP):

  • 3.4: 7.4, 8.1
  • 4.4: 7.4, 8.0, 8.3
  • 4.4, lowest dependencies: 7.4
  • 5.4: 7.4, 8.0, 8.2, 8.4
  • 6.4: 8.1, 8.2, 8.3, 8.4

Suggested release: v2.0.0.

Container smoke test (FrameworkBundle, SensioFrameworkExtraBundle and this
bundle with two Varnish proxies), controller and response listeners,
cache_tags:invalidate against a fake HTTP endpoint, and Configuration.
Symfony 3.4, 4.4, 5.4 and 6.4 on PHP 7.4-8.4, plus one lowest-dependencies leg.
Symfony 7 is not included: sensio/framework-extra-bundle, a hard requirement,
does not support it.
@prgTW
prgTW marked this pull request as ready for review October 18, 2026 18:13
@prgTW
prgTW merged commit 4be2e93 into master Oct 18, 2026
14 checks passed
@prgTW
prgTW deleted the feat/symfony-5-6-support branch October 18, 2026 18:14
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