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
[FrameworkBundle] Annotation cache does not override default settings #26086
Comments
I've concluded more testing and took a look at 7085569 commit. It appears that the pass config type was changed from Now if I revert that change the cache provider will be injected accordingly. I also noticed that there was a test added in that particular commit. However I believe its looking for a wrong definition and hence doesn't fail. Maybe it should be looking for |
…pass to inject configured cache provider (Laizerox) This PR was merged into the 3.4 branch. Discussion ---------- [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #26086 | License | MIT | Doc PR | - The compilation pass of AddAnnotationsCachedReaderPass relies on already removed definition `annotations.cached_reader` due to an alias to `annotation_reader`. Since the definition is being removed because of alias, configured annotation cache provider is not injected and will default back to ArrayCache. This PR replaces the use of `annotations.cached_reader` to `annotation_reader` to complete the injection of configured cache provider. Commits ------- dfd93da bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
* 3.4: [Bridge/Twig] fix composer.json bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider [WebProfilerBundle] Fix anchor CSS [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation [WebProfilerBundle] Tweak default route name updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7f Retro-fit proxy code to make it deterministic for older proxy manager implementations Yaml parser regression with comments and non-strings Fix undiscoverablility of SymfonyTestsListenerForV7 Fixed broken tests [TwigBridge] Apply some changes to support Bootstrap4-stable
* 4.0: [Bridge/Twig] fix composer.json bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider [WebProfilerBundle] Fix anchor CSS [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation [WebProfilerBundle] Tweak default route name updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7f Retro-fit proxy code to make it deterministic for older proxy manager implementations [Serializer] remove unneeded php doc line Yaml parser regression with comments and non-strings Fixed broken tests [TwigBridge] Apply some changes to support Bootstrap4-stable
* 3.4: [Bridge/Twig] fix composer.json bug symfony#26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider [WebProfilerBundle] Fix anchor CSS [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation [WebProfilerBundle] Tweak default route name updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7f Retro-fit proxy code to make it deterministic for older proxy manager implementations Yaml parser regression with comments and non-strings Fix undiscoverablility of SymfonyTestsListenerForV7 Fixed broken tests [TwigBridge] Apply some changes to support Bootstrap4-stable
* 4.0: [Bridge/Twig] fix composer.json bug symfony#26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider [WebProfilerBundle] Fix anchor CSS [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation [WebProfilerBundle] Tweak default route name updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7f Retro-fit proxy code to make it deterministic for older proxy manager implementations [Serializer] remove unneeded php doc line Yaml parser regression with comments and non-strings Fixed broken tests [TwigBridge] Apply some changes to support Bootstrap4-stable
* 4.0: [Bridge/Twig] fix composer.json bug symfony#26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider [WebProfilerBundle] Fix anchor CSS [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation [WebProfilerBundle] Tweak default route name updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7f Retro-fit proxy code to make it deterministic for older proxy manager implementations [Serializer] remove unneeded php doc line Yaml parser regression with comments and non-strings Fixed broken tests [TwigBridge] Apply some changes to support Bootstrap4-stable
As the title describes when defined in config.yml
The
annotation_reader
does not get injected with proper cache but remains as ArrayCache.The problem appears to happen when
AddAnnotationsCachedReaderPass
is being processed definition ofannotations.cached_reader
is already removed and$container->hasDefinition('annotations.cached_reader')
returns false.Default settings such as
file
forframework.annotations.cache
does not appear to work either.When default cache is being overridden in
annotations.xml
ofFrameworkBundle
manually it appears the cache starts to work.When using bundles such as FOSRestBundle the lack of cache causes
annotation_reader
to parse annotations on each request.Either I'm doing something wrong or this has broken at some stage.
The text was updated successfully, but these errors were encountered: