-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Deprecated CacheInterface in favor of PSR-6 #33459
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
[Validator] Deprecated CacheInterface in favor of PSR-6 #33459
Conversation
0398a4b
to
f40dd36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be great to not use Psr6Cache if possible: we usually try to make the code as close as possible to the target (v5 here)
8a59e7d
to
6d09ea3
Compare
7e0a2b3
to
4657cff
Compare
All right, I've inlined |
src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Mapping/Cache/CacheInterface.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Mapping/Cache/DoctrineCache.php
Outdated
Show resolved
Hide resolved
fbadf44
to
8a200c0
Compare
src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php
Outdated
Show resolved
Hide resolved
8a200c0
to
bfe8ccc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What started as a refactoring task might now be a performance improvement. smiley
Removing code and improving perf. There need to be a reason why we annoy users with deprecations, this is a good one :)
bfe8ccc
to
b335ffb
Compare
b335ffb
to
0b08040
Compare
Thank you @derrabus. |
…6 (derrabus) This PR was merged into the 4.4 branch. Discussion ---------- [Validator] Deprecated CacheInterface in favor of PSR-6 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #33414 | License | MIT | Doc PR | TODO With PSR-6, the validator component does not need its own `CacheInterface`, so let's remove it. Note that I still use the now deprecated `Psr6Cache` class to keep the logic inside `LazyLoadingMetadataFactory` simple. My plan would be to inline all logic from `Psr6Cache` into `LazyLoadingMetadataFactory` for 5.0. Commits ------- 0b08040 [Validator] Deprecated CacheInterface in favor of PSR-6.
…rrabus) This PR was merged into the 5.0-dev branch. Discussion ---------- [Validator] Removed CacheInterface in favor of PSR-6 | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #33414 | License | MIT | Doc PR | symfony/symfony-docs#12276 This PR removes the deprecation layer of #33459. Commits ------- 34b141c [Validator] Removed CacheInterface in favor of PSR-6.
…errabus) This PR was merged into the 4.4 branch. Discussion ---------- [Validator] Update "suggest" section in composer.json | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A After #33459, the composer suggestions for the validator component are a bit misleading. Sorry for having missed that in my PR. Commits ------- 5bf8cca [Validator] Update "suggest" section in composer.json.
This PR was merged into the 4.4 branch. Discussion ---------- Document the validator's switch to PSR-6 This PR documents symfony/symfony#33459 and fixes #12275. Commits ------- 2f010b7 Document the validator's switch to PSR-6.
With PSR-6, the validator component does not need its own
CacheInterface
, so let's remove it.Note that I still use the now deprecatedPsr6Cache
class to keep the logic insideLazyLoadingMetadataFactory
simple. My plan would be to inline all logic fromPsr6Cache
intoLazyLoadingMetadataFactory
for 5.0.