Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1fb2d89

Browse files
[Maintenance][Configuration] Deprecate unused options configuration nodes
1 parent 466793c commit 1fb2d89

19 files changed

Lines changed: 209 additions & 69 deletions

File tree

UPGRADE-1.13.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,8 @@ To ease the update process, we have grouped the changes into the following categ
832832
...
833833
```
834834

835+
1. All instances of `options` node have been deprecated in all resource and translation configurations.
836+
835837
### State Machine
836838

837839
1. We have configured all existing Sylius graphs to be usable with the Symfony Workflow out of the box.

src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
7070
->arrayNode('address')
7171
->addDefaultsIfNotSet()
7272
->children()
73-
->variableNode('options')->end()
73+
->variableNode('options')
74+
->setDeprecated('sylius/addressing-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
75+
->end()
7476
->arrayNode('classes')
7577
->addDefaultsIfNotSet()
7678
->children()
@@ -87,7 +89,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
8789
->arrayNode('address_log_entry')
8890
->addDefaultsIfNotSet()
8991
->children()
90-
->variableNode('options')->end()
92+
->variableNode('options')
93+
->setDeprecated('sylius/addressing-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
94+
->end()
9195
->arrayNode('classes')
9296
->addDefaultsIfNotSet()
9397
->children()
@@ -102,7 +106,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
102106
->arrayNode('country')
103107
->addDefaultsIfNotSet()
104108
->children()
105-
->variableNode('options')->end()
109+
->variableNode('options')
110+
->setDeprecated('sylius/addressing-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
111+
->end()
106112
->arrayNode('classes')
107113
->addDefaultsIfNotSet()
108114
->children()
@@ -119,7 +125,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
119125
->arrayNode('province')
120126
->addDefaultsIfNotSet()
121127
->children()
122-
->variableNode('options')->end()
128+
->variableNode('options')
129+
->setDeprecated('sylius/addressing-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
130+
->end()
123131
->arrayNode('classes')
124132
->addDefaultsIfNotSet()
125133
->children()
@@ -136,7 +144,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
136144
->arrayNode('zone')
137145
->addDefaultsIfNotSet()
138146
->children()
139-
->variableNode('options')->end()
147+
->variableNode('options')
148+
->setDeprecated('sylius/addressing-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
149+
->end()
140150
->arrayNode('classes')
141151
->addDefaultsIfNotSet()
142152
->children()
@@ -153,7 +163,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
153163
->arrayNode('zone_member')
154164
->addDefaultsIfNotSet()
155165
->children()
156-
->variableNode('options')->end()
166+
->variableNode('options')
167+
->setDeprecated('sylius/addressing-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
168+
->end()
157169
->arrayNode('classes')
158170
->addDefaultsIfNotSet()
159171
->children()

src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
5757
->arrayNode('attribute')
5858
->addDefaultsIfNotSet()
5959
->children()
60-
->variableNode('options')->end()
60+
->variableNode('options')
61+
->setDeprecated('sylius/attribute-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
62+
->end()
6163
->arrayNode('classes')
6264
->addDefaultsIfNotSet()
6365
->children()
@@ -72,7 +74,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
7274
->arrayNode('translation')
7375
->addDefaultsIfNotSet()
7476
->children()
75-
->variableNode('options')->end()
77+
->variableNode('options')
78+
->setDeprecated('sylius/attribute-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
79+
->end()
7680
->arrayNode('classes')
7781
->addDefaultsIfNotSet()
7882
->children()
@@ -92,7 +96,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
9296
->isRequired()
9397
->addDefaultsIfNotSet()
9498
->children()
95-
->variableNode('options')->end()
99+
->variableNode('options')
100+
->setDeprecated('sylius/attribute-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
101+
->end()
96102
->arrayNode('classes')
97103
->addDefaultsIfNotSet()
98104
->children()

src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
5353
->arrayNode('channel')
5454
->addDefaultsIfNotSet()
5555
->children()
56-
->variableNode('options')->end()
56+
->variableNode('options')
57+
->setDeprecated('sylius/channel-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
58+
->end()
5759
->arrayNode('classes')
5860
->addDefaultsIfNotSet()
5961
->children()

src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
156156
->arrayNode('product_image')
157157
->addDefaultsIfNotSet()
158158
->children()
159-
->variableNode('options')->end()
159+
->variableNode('options')
160+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
161+
->end()
160162
->arrayNode('classes')
161163
->addDefaultsIfNotSet()
162164
->children()
@@ -172,7 +174,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
172174
->arrayNode('avatar_image')
173175
->addDefaultsIfNotSet()
174176
->children()
175-
->variableNode('options')->end()
177+
->variableNode('options')
178+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
179+
->end()
176180
->arrayNode('classes')
177181
->addDefaultsIfNotSet()
178182
->children()
@@ -188,7 +192,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
188192
->arrayNode('taxon_image')
189193
->addDefaultsIfNotSet()
190194
->children()
191-
->variableNode('options')->end()
195+
->variableNode('options')
196+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
197+
->end()
192198
->arrayNode('classes')
193199
->addDefaultsIfNotSet()
194200
->children()
@@ -204,7 +210,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
204210
->arrayNode('product_taxon')
205211
->addDefaultsIfNotSet()
206212
->children()
207-
->variableNode('options')->end()
213+
->variableNode('options')
214+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
215+
->end()
208216
->arrayNode('classes')
209217
->addDefaultsIfNotSet()
210218
->children()
@@ -220,7 +228,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
220228
->arrayNode('channel_pricing')
221229
->addDefaultsIfNotSet()
222230
->children()
223-
->variableNode('options')->end()
231+
->variableNode('options')
232+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
233+
->end()
224234
->arrayNode('classes')
225235
->addDefaultsIfNotSet()
226236
->children()
@@ -237,7 +247,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
237247
->arrayNode('channel_pricing_log_entry')
238248
->addDefaultsIfNotSet()
239249
->children()
240-
->variableNode('options')->end()
250+
->variableNode('options')
251+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
252+
->end()
241253
->arrayNode('classes')
242254
->addDefaultsIfNotSet()
243255
->children()
@@ -254,7 +266,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
254266
->arrayNode('shop_billing_data')
255267
->addDefaultsIfNotSet()
256268
->children()
257-
->variableNode('options')->end()
269+
->variableNode('options')
270+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
271+
->end()
258272
->arrayNode('classes')
259273
->addDefaultsIfNotSet()
260274
->children()
@@ -271,7 +285,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
271285
->arrayNode('channel_price_history_config')
272286
->addDefaultsIfNotSet()
273287
->children()
274-
->variableNode('options')->end()
288+
->variableNode('options')
289+
->setDeprecated('sylius/core-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
290+
->end()
275291
->arrayNode('classes')
276292
->addDefaultsIfNotSet()
277293
->children()

src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
5555
->arrayNode('currency')
5656
->addDefaultsIfNotSet()
5757
->children()
58-
->variableNode('options')->end()
58+
->variableNode('options')
59+
->setDeprecated('sylius/currency-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
60+
->end()
5961
->arrayNode('classes')
6062
->addDefaultsIfNotSet()
6163
->children()
@@ -72,7 +74,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
7274
->arrayNode('exchange_rate')
7375
->addDefaultsIfNotSet()
7476
->children()
75-
->variableNode('options')->end()
77+
->variableNode('options')
78+
->setDeprecated('sylius/currency-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
79+
->end()
7680
->arrayNode('classes')
7781
->addDefaultsIfNotSet()
7882
->children()

src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
5656
->arrayNode('customer')
5757
->addDefaultsIfNotSet()
5858
->children()
59-
->variableNode('options')->end()
59+
->variableNode('options')
60+
->setDeprecated('sylius/customer-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
61+
->end()
6062
->arrayNode('classes')
6163
->addDefaultsIfNotSet()
6264
->children()
@@ -73,7 +75,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
7375
->arrayNode('customer_group')
7476
->addDefaultsIfNotSet()
7577
->children()
76-
->variableNode('options')->end()
78+
->variableNode('options')
79+
->setDeprecated('sylius/customer-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
80+
->end()
7781
->arrayNode('classes')
7882
->addDefaultsIfNotSet()
7983
->children()

src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
5757
->arrayNode('inventory_unit')
5858
->addDefaultsIfNotSet()
5959
->children()
60-
->variableNode('options')->end()
60+
->variableNode('options')
61+
->setDeprecated('sylius/inventory-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
62+
->end()
6163
->arrayNode('classes')
6264
->addDefaultsIfNotSet()
6365
->children()

src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
5353
->arrayNode('locale')
5454
->addDefaultsIfNotSet()
5555
->children()
56-
->variableNode('options')->end()
56+
->variableNode('options')
57+
->setDeprecated('sylius/locale-bundle', '1.13', 'The "%node%" node at "%path%" is deprecated and will be removed in 2.0.')
58+
->end()
5759
->arrayNode('classes')
5860
->addDefaultsIfNotSet()
5961
->children()

0 commit comments

Comments
 (0)