Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Config][FrameworkBundle] Add CacheWarmer for ConfigBuilder#40804
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| $this->dumpExtension($extension,$generator); | ||
| }catch (\Throwable$e) { | ||
| if ($this->logger) { | ||
| $this->logger->warning('Failed to generate ConfigBuilder for extension {extensionClass).', ['exception' =>$e,'extensionClass' =>\get_class($extension)]); |
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.
If a (bundle) extension is using some syntax not supported by the generator builder, we dont want an exception when warming the cache. The user may not even be using the ConfigBuilder for that extension.
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.
s/{extensionClass)/{extensionClass}
src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Command/BuildDebugContainerTrait.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…ebugContainerTrait::getContainerBuilder() (Nyholm)This PR was squashed before being merged into the 5.3-dev branch.Discussion----------[FrameworkBundle] Add argument KernelInterface to BuildDebugContainerTrait::getContainerBuilder()| Q | A| ------------- | ---| Branch? | 5.x| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets || License | MIT| Doc PR |This comes from a suggestion by `@yceruto`#40804 (comment)This change will make the trait usable outside the `Command` namespace. I did not find a better namespace to move the trait to though.. This patch will help#40804The trait is internal so the change is okey.Commits-------0e9652a [FrameworkBundle] Add argument KernelInterface to BuildDebugContainerTrait::getContainerBuilder()
src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ConfigBuilderCacheWarmer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedApr 14, 2021
Thank you@Nyholm. |
Nyholm commentedApr 14, 2021
Awesome. :) |
| if ($extensioninstanceof ConfigurationInterface) { | ||
| $configuration =$extension; | ||
| }elseif ($extensioninstanceof ConfigurationExtensionInterface) { | ||
| $configuration =$extension->getConfiguration([],$this->getContainerBuilder($this->kernel)); |
stephanvierkantApr 18, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
$extension->getConfiguration() can returnnull, while$generator->build() doesn't acceptnull. Seedoctrine/DoctrineFixturesBundle#349.
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.
Thanks for testing prereleases! This will be fixed by#40859
Make sure ConfigBuilder exists before you write your first line of config.
This is similar to#40803