+
Skip to content

Switch to adapter approach for PSR-16 instead of directly extending it #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

francislavoie
Copy link
Contributor

@francislavoie francislavoie commented Jun 25, 2020

I didn't like the warnings and other goofiness we had to deal with by directly extending the PSR-16 interface.

With this approach, we can directly depend on the Vectorface\Cache\Cache interface instead of Psr\SimpleCache\CacheInterface and if we ever actually need interop with PSR-16, we can just do new SimpleCacheAdapter($cache) to wrap it in something that actually implements Psr\SimpleCache\CacheInterface and call it a day.

I'll probably tag a v0.2 version along with the planned increment/decrement additions which will be in a PR to follow. I'll probably not make a separate interface for that seeing as we're moving away from directly extending PSR-16; I can just add it to our existing Cache interface I suppose.

@jdpanderson jdpanderson merged commit ecfeffc into master Sep 11, 2020
@francislavoie francislavoie deleted the psr-adapter branch September 11, 2020 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载