-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix explicitly set use_intl_templates #5979
Fix explicitly set use_intl_templates #5979
Conversation
Can you add a function test to cover this bug? |
This one covers that case. |
Restarting Travis to see if it works... |
I think there is an ongoing scheduled maintenance: https://twitter.com/traviscistatus |
@@ -212,7 +212,9 @@ public function prepend(ContainerBuilder $container) | |||
$configs = $container->getExtensionConfig($this->getAlias()); | |||
$config = $this->processConfiguration(new Configuration(), $configs); | |||
|
|||
$useIntlTemplates = $config['use_intl_templates'] || isset($bundles['SonataIntlBundle']); | |||
$defaultUseIntlTemplates = $config['use_intl_templates'] || isset($bundles['SonataIntlBundle']); |
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.
This is correct? I must use the intl templates if i installed the SonataIntlBundle?
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.
Before #5835, when you had installed SonataIntlBundle
, the intl templates were automatically loaded from SonataIntlBundle
. This simulated that behaviour.
The problem was that if you set use_intl_templates
to false
(explicitly) with the SonataIntlBundle
installed, it did't matter, it was like it was set to true
. Now this is fixed by the next line. So to sum up:
SonataIntlBundle
installed and nothing configured: it uses intl templatesSonataIntlBundle
not installed butuse_intl_templates
set totrue
: it loades intl templates- No matter if
SonataIntlBundle
is installed if you setuse_intl_templates
tofalse
: it won't load intl templates
You should update the docs too. |
Could you please rebase your PR and fix merge conflicts? |
Subject
Ref: #5977
Basically, when
use_intl_templates
was explicitly set tofalse
but withSonataIntlBundle
enabled, it kept loading the intl templates.I am targeting this branch, because this is BC.
Closes #5977
Changelog
To test:
composer config repositories.franmomu vcs https://github.com/franmomu/SonataAdminBundle composer require sonata-project/admin-bundle "dev-fix_override_use_intl_templates as 3.62.1"
PS: I'll try later to add the missing services to #5975