Commit 03816ec
committed
Fix profiler service deprecation by using non-deprecated internal id
Accessing the "profiler" service directly from the container triggers a
deprecation since symfony/framework-bundle 5.4: "Accessing the "profiler"
service directly from the container is deprecated, use dependency
injection instead."
The public "profiler" id is a deprecated alias that calls
trigger_deprecation() before delegating to the real, non-deprecated
private definition ".container.private.profiler". Prefer the internal id
and fall back to "profiler" for older/edge configs where the alias does
not exist. This avoids the deprecation on every container path (raw or
test container) across Symfony 5.4 to 8.0.
Closes #2121 parent 8bae088 commit 03816ec
3 files changed
Lines changed: 34 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
362 | 371 | | |
363 | | - | |
| 372 | + | |
364 | 373 | | |
365 | 374 | | |
366 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
160 | | - | |
161 | | - | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
| |||
0 commit comments