Skip to content

[Validator] Deprecate CacheInterface and use Doctrine\Common\Cache instead #9887

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

Closed
webmozart opened this issue Dec 29, 2013 · 1 comment
Closed

Comments

@webmozart
Copy link
Contributor

Currently, the validator supports caching of the validator metadata using an internal CacheInterface and the currently only implementation ApcCache. I propose to deprecate this interface and class and use Doctrine\Common\Cache\Cache implementations instead, which has many more implementations available.

fabpot added a commit that referenced this issue Dec 30, 2013
This PR was merged into the 2.5-dev branch.

Discussion
----------

[Validator] Added Doctrine cache

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #9887
| License       | MIT
| Doc PR        |

I propose to keep the `CacheInterface` and deprecate only the `ApcCache`.
It will leave the classes depending on a `CacheInterface` unchanged and will allow to adapt new cache providers in the future.

Commits
-------

3c4de45 [Validator] Added Doctrine cache
@fabpot fabpot closed this as completed Dec 30, 2013
@Tobion
Copy link
Contributor

Tobion commented Dec 30, 2013

@bschussek When deprecating CacheInterface, how do you suggest to handle ValidatorBuilderInterface::setMetadataCache(CacheInterface $cache). Replace it with the doctrine cache interface? This would be a bc break and somewhat make doctrine/cache a required dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants