Skip to content

Commit d25fcb9

Browse files
committed
minor #24591 adding AdapterInterface alias for cache.app (weaverryan)
This PR was merged into the 3.4 branch. Discussion ---------- adding AdapterInterface alias for cache.app | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no-ish | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | TODO I'd like to add this alias for autowiring. If only `CacheItemPoolInterface` is available, then it's a bit weird to use the extra Symfony cache features (e.g. tagging), as I'm calling methods on the `CacheItemPoolInterface` that don't exist. I'd rather type-hint `AdapterInterface` and confidently call those (+ get auto-complete). Commits ------- 454f65a77d adding AdapterInterface alias for cache.app
2 parents 49580df + 6659c08 commit d25fcb9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Resources/config/cache.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,6 @@
111111
<service id="cache.global_clearer" parent="cache.default_clearer" public="true" />
112112
<service id="cache.app_clearer" alias="cache.default_clearer" public="true" />
113113
<service id="Psr\Cache\CacheItemPoolInterface" alias="cache.app" />
114+
<service id="Symfony\Component\Cache\Adapter\AdapterInterface" alias="cache.app" />
114115
</services>
115116
</container>

0 commit comments

Comments
 (0)