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
[Locale] Removed enable/disable functionality #7346
[Locale] Removed enable/disable functionality #7346
Conversation
NoResponseMate
commented
Jan 25, 2017
•
edited
edited
Q | A |
---|---|
Bug fix? | more of a precaution |
New feature? | no |
BC breaks? | yes |
Related tickets | explained in, closes #7309 |
License | MIT |
locale_de: | ||
code: de | ||
enabled: false |
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.
No need to have de
locale defined separately anymore.
067a1bf
to
8154464
Compare
8154464
to
2a7a103
Compare
@@ -59,23 +52,13 @@ public function buildForm(FormBuilderInterface $builder, array $options) | |||
|
|||
$locale = $event->getData(); | |||
if ($locale instanceof LocaleInterface && null !== $locale->getCode()) { | |||
$options['disabled'] = true; |
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.
I guess it shouldn't be removed.
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.
Went a bit overboard on this one. 👌
2a7a103
to
1f45982
Compare
Thanks Janek! 👍 |
This PR was merged into the 1.3 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.3 | Bug fix? | yes | New feature? | no | BC breaks? | not sure (it backward compatible on default fixtures configuration) | Deprecations? | not sure (deprecation messages was added, but not appear on default fixtures configuration) | Related tickets | fixes #10307, partially #7346 | License | MIT So, in BC in mind, with this PR it now will work like this: - **If you have default (empty) configuration, as was before**: ```yaml sylius_fixtures: # ... fixtures: locale: ~ ``` Then, base locale **will be added** to configuration. - *But if you provided a list of locales*: ```yaml sylius_fixtures: suites: my_custom_suite_to_add_to_existing_database: listeners: orm_purger: false fixtures: locale: options: locales: - "de_DE" ``` Then, base locale **will NOT be added** to configuration. Deprecation message was added to avoid usage base locale at all in future. To suppress that message on default configuration, `"%locale%"` was passed directly to the `locales` option at `src/Sylius/Bundle/CoreBundle/Resources/config/app/fixtures.yml`. # TODO - [ ] Define Sylius version where base locale will be removed OR remove deprecation message if base locale should be kept by default (when fixture defined like `locale: ~`) - I'm not 100% sure about this so want to discuss this first. Commits ------- 93f098e Fixed: LocaleFixtureTest as it not valid since #7346 15c0cb7 Avoided: Adding base locale usage to list of fixtures (fixes #10307)
…eability [Locale] Removed enable/disable functionality