-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Fix cache pool configuration with one adapter and one provider #43164
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] Fix cache pool configuration with one adapter and one provider #43164
Conversation
2261d82
to
9673243
Compare
Failures looks related but it's working on my local and I don't see how the changes could have broken them, I'm going to need some help 😕 |
perhaps more easy to tell config builder about extra methods? maintaining consistency in keys while doing so. |
Should we split |
9673243
to
4a77f44
Compare
CI is green, so the failures were not related I guess :-) @nicolas-grekas Splitting the entries couldn't be considered as a bug fix isn'it? I studied the split a bit and it would be more complicated than the current patch. Is my proposed change too risky for 4.4? I'd really like to fix this issue to get rid of the last yaml config file in my apps 😅 |
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
4a77f44
to
c4a9dff
Compare
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
c4a9dff
to
863dd5e
Compare
Thank you @fancyweb. |
My current YAML config is:
I'm trying to migrate it to PHP with the new config builder system. The problem is that
->adapter('cache.adapter.redis')
does not exist in the generated config class sinceadapter
is just a shortcut in the first place. So I have to use->adapters(['cache.adapter.redis'])
but the configuration doesn't allow it.The difference with this patch is that we allow the case where
adapters
is a map that contains only one item andprovider
is set. The result is exactly the same and it becomes compatible with the config class.I added an extra check for DX to avoid an
\ErrorException
ifadapters
is not an array.