Skip to content

Fix booting the test application in the prod environment - #100

Merged
loevgaard merged 1 commit into
1.14.xfrom
fix-prod-doctrine-cache-1.14.x
Nov 2, 2026
Merged

loevgaard merged 1 commit into
1.14.xfrom
fix-prod-doctrine-cache-1.14.x

Conversation

@loevgaard

Copy link
Copy Markdown
Member

The test application's prod/doctrine.yaml wired the ORM metadata, query and result caches through Symfony\Component\Cache\DoctrineProvider. Symfony 6 removed that class, so the prod environment didn't boot:

Attempted to load class "DoctrineProvider" from namespace "Symfony\Component\Cache".

The caches now use DoctrineBundle's pool cache type, which takes the existing doctrine.system_cache_pool and doctrine.result_cache_pool directly. The separate provider services are gone.

Reported in Setono/sylius-conversion-attribution-plugin#14. That plugin runs its e2e tests in prod and had to keep its own copy of this file.

Verification

With Sylius 1.14.21, Symfony 6.4.49 and DoctrineBundle 2.19.3 on PHP 8.1:

  • before: APP_ENV=prod bin/console cache:clear fails with the error above
  • after: the prod cache clears and lint:container passes. Booting the prod kernel with debug off gives PhpFilesAdapter for the metadata and query caches and FilesystemAdapter for the result cache
  • PHPStan, PHPUnit and lint:yaml pass

The prod Doctrine config wired the ORM caches through
Symfony\Component\Cache\DoctrineProvider, which Symfony 6 removed, so the
prod container failed with a ClassNotFoundError. The caches now use
DoctrineBundle's pool type, which takes the PSR-6 pools directly.

Reported in Setono/sylius-conversion-attribution-plugin#14
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a4e4a01) to head (475bc52).

Additional details and impacted files
@@             Coverage Diff             @@
##              1.14.x      #100   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity         2         2           
===========================================
  Files              2         2           
  Lines             16        16           
===========================================
  Hits              16        16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loevgaard
loevgaard merged commit 8f3cef2 into 1.14.x Nov 2, 2026
30 checks passed
@loevgaard
loevgaard deleted the fix-prod-doctrine-cache-1.14.x branch November 2, 2026 09:57
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