Commit 41f0cbb
authored
bug #10308 Fix base locale (igormukhingmailcom)
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)3 files changed
Lines changed: 46 additions & 5 deletions
File tree
- src/Sylius/Bundle/CoreBundle
- Fixture
- Resources/config/app
- Tests/Fixture
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
40 | 64 | | |
41 | 65 | | |
42 | 66 | | |
| |||
0 commit comments