Commit 16efe96
committed
bug symfony#60691 [DependencyInjection] Fix
This PR was merged into the 7.2 branch.
Discussion
----------
[DependencyInjection] Fix `ServiceLocatorTagPass` indexes handling
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#60651
| License | MIT
symfony#50578 changed the `ServiceLocatorTagPass`’ behavior so that if the map is a list, its indexes always are replaced by the corresponding reference ID, even if they come from the `PriorityTaggedServiceTrait`. That means if your service map ends up as a list because e.g. your `default_index_method` returned contiguous integer, its indexes will be replaced.
This PR reverts this change so that it works the same than v6.
Commits
-------
a73c9d1 [DependencyInjection] Fix `ServiceLocatorTagPass` indexes handlingServiceLocatorTagPass indexes handling (MatTheCat)File tree
4 files changed
+100
-39
lines changed- src/Symfony/Component/DependencyInjection
- Attribute
- Compiler
- Tests/Compiler
4 files changed
+100
-39
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| |||
Lines changed: 36 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
58 | 59 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
65 | 89 | | |
66 | 90 | | |
67 | | - | |
| 91 | + | |
68 | 92 | | |
69 | 93 | | |
70 | 94 | | |
| |||
83 | 107 | | |
84 | 108 | | |
85 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
86 | 114 | | |
87 | | - | |
| 115 | + | |
88 | 116 | | |
89 | 117 | | |
90 | 118 | | |
| |||
109 | 137 | | |
110 | 138 | | |
111 | 139 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 140 | | |
Lines changed: 61 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
89 | 109 | | |
90 | 110 | | |
91 | 111 | | |
| |||
170 | 190 | | |
171 | 191 | | |
172 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
173 | 214 | | |
174 | 215 | | |
175 | 216 | | |
| |||
201 | 242 | | |
202 | 243 | | |
203 | 244 | | |
204 | | - | |
| 245 | + | |
205 | 246 | | |
206 | 247 | | |
207 | 248 | | |
208 | 249 | | |
| 250 | + | |
209 | 251 | | |
210 | 252 | | |
211 | | - | |
212 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
213 | 272 | | |
214 | 273 | | |
215 | 274 | | |
| |||
0 commit comments