[8.x] Provide psr/simple-cache-implementation #38767
Merged
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.
Illuminate\Cache\Repository
implements PSR-16'sPsr\SimpleCache\CacheInterface
via theIlluminate\Contracts\Cache\Repository
interface.Let's declare that
illuminate/cache
andlaravel/framework
providepsr/simple-cache-implementation
so that packages relying onpsr/simple-cache-implementation
for a PSR-16 cache can be installed in a Laravel project.Context: I was trying to use the Unleash PHP client (
unleash/client
) in a Laravel project. The client will fail tocomposer install
in a Laravel project as it uses the presence of a package providingpsr/simple-cache-implementation
to ensure that a PSR-16 cache is available.Since Laravel's cache is already PSR-16 compliant, it should provide the
psr/simple-cache-implementation
virtual package to allow PHP packages requiring a PSR-16 cache to be used in a Laravel project.