-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Add support for doctrine/annotations:1.13 || 2.0 #40338
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
Conversation
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.
Can't we do without the config option? I don't feel like this should be configurable. It's impossible to explain in a way that makes sense...
Without a config option the user cannot specify their own psr6 cache service. |
I removed the option, If the user provides a custom service, I'll check if it is PSR6 compatible or not. The only "weird" thing now is, if the user is using I could add an extra check for this, but then I also need to check if user that has specified a custom class that implements both doctrine cache and PSR6.. Should I add this extra logic for this edge case? |
I added a check for all edge cases =) |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Outdated
Show resolved
Hide resolved
On the 5.x branch, I think we can bump to 1.13 as soon as it's released. Routing already requires 1.12 and I'm about to bump the requirement for the serializer as well. |
That will not make a difference. Doctrine/annotations is just a dev requirement. I need to add a “conflict” |
Exactly, see #40266. |
Sure, but that would make things a bit simpler. |
Wohoo. Im just waiting for appveyor. The other builds are super green. |
Thank you. I have applied the changes. |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
Show resolved
Hide resolved
What?! 6/6 is green now. =) |
2913edf
to
91e844b
Compare
Thank you Tobias. |
Thank you for merging and for the reviews. |
…ctrine/annotations:^1.13 (Nyholm) This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [FrameworkBundle] AnnotationsCacheWarmer should support doctrine/annotations:^1.13 | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #40353 | License | MIT | Doc PR | The `AnnotationsCacheWarmer` is creating a cached a `new CachedReader` in the `doWarmUp()`. But this will fail if doctrine/cache is not installed. In #40338 I added the `kernel.cache_warmer` tag on `annotations.cache_warmer` service even though the doctrine/cache is not installed. This PR will make sure `AnnotationsCacheWarmer` is using the `PsrCacheReader` when available. This bug was not found in the tests because doctrine/cache is always installed. ---------- Big golden star to @jrushlow because you test dev-master. Commits ------- fb1cc72 [FrameworkBundle] AnnotationsCacheWarmer should support doctrine/annotations:^1.13
The documentation hasn't been updated for this. I've opened symfony/symfony-docs#15505 |
This PR will deprecate passing any other values that "none", "php_array" and "file" to
framework.annotation.cache
. It will also supportdoctrine/annotations:^1.13 || ^2.0
. It will use the PSR-6 cache if possible.