Require symfony/cache, wired in services.yaml - #90
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The DI wiring in services.yaml was never exercised by the test suite: all tests build validators by hand, so a missing symfony/cache or psr/simple-cache package could not be detected. This boots the real container, runs PublicSuffixListCacheWarmer against a stubbed PSR-18 client, and asserts the second warm-up is served from the PSR-16 cache. The Pdp\Storage glob resource only resolved when the bundle was installed under a consumer vendor/ directory; it is replaced by the single explicit service that relied on it so the container can compile inside this repository too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Symfony 7.0 runs non-optional warmers during kernel boot while 7.4 does not, so the stub request count is asserted relative to a post-boot baseline instead of an absolute value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
1 similar comment
|
This was referenced Aug 21, 2026
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.



Adds
symfony/cache: ^7.0torequire.config/services.yamlwiresSymfony\Component\Cache\Psr16CacheandSymfony\Component\Cache\Adapter\FilesystemAdapterfor the php-domain-parser public-suffix-list cache, but the package providing them was never required — it only worked because consuming apps happen to ship symfony/cache themselves.psr/simple-cachestays: it looks redundant but is load-bearing — both symfony/cache and php-domain-parser list it only in their require-dev, so without our direct require thePsr\SimpleCache\CacheInterfaceimplemented byPsr16Cachewould not be installed at runtime (verified: dropping it removesvendor/psr/simple-cacheentirely, and the test suite does not catch it because the pdp cache services are not instantiated there).Validated in a PHP 8.4 container:
composer validate --strict,composer update, PHPUnit green (290 tests).🤖 Generated with Claude Code
Test coverage
The suite previously never exercised the DI wiring: every test builds validators by hand, so neither a missing
symfony/cachenor a missingpsr/simple-cachecould be detected (both were verified to slip through). This PR addsPublicSuffixListCacheChainTest, a functional smoke test that boots the kernel, compiles the realservices.yaml, and runsPublicSuffixListCacheWarmertwice against a stubbed, network-free PSR-18 client — asserting the second warm-up is served from the PSR-16 cache. Verified: the test errors when either package is removed fromvendor/.Enabling this surfaced three latent issues, fixed here:
Pdp\Storage\glob resource ('../../../jeremykendall/php-domain-parser/src/Storage/*') only resolves when the bundle sits under a consumer'svendor/; container compilation inside this repo failed withFileLocatorFileNotFoundException. Replaced by the single explicit service that relied on it (PublicSuffixListPsr18Client). Note for consumers: the unused pdpTopLevelDomain*classes are no longer auto-registered.framework.validation.enable_annotations, removed in Symfony 7 — the fixture kernel was un-bootable (enable_attributesnow).symfony/var-exporteris pinned^7.0in require-dev: as an unconstrained transitive dep it resolved to 8.x, whereProxyHelper::generateLazyGhost()no longer exists, making doctrine/orm 3.6 refuse to boot without native lazy objects.