Commit 83c373d
committed
feature #21638 [VarDumper] Allow seamless use of Data clones (nicolas-grekas)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[VarDumper] Allow seamless use of Data clones
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
By implementing `ArrayAccess`, `Countable`, `IteratorAggregate`, `__get`, `__isset` and `__toString`, VarDumper's `Data` objects become seamless and behave almost identically from their original clones values, especially from the PoV of Twig.
In data collectors, this allows replacing the many nested calls to `cloneVar` by a single one.
This makes the code simpler, and should make a significant difference in term of performance.
Todo:
- [x] push a Blackfire profile comparison
- [x] double check that the profiler works as expected.
Commits
-------
ab716c64de [VarDumper] Allow seamless use of Data clonesFile tree
2 files changed
+24
-61
lines changed- Extension/DataCollector
2 files changed
+24
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
268 | 248 | | |
269 | 249 | | |
270 | 250 | | |
271 | 251 | | |
272 | | - | |
| 252 | + | |
273 | 253 | | |
274 | 254 | | |
275 | 255 | | |
| |||
281 | 261 | | |
282 | 262 | | |
283 | 263 | | |
284 | | - | |
| 264 | + | |
285 | 265 | | |
286 | | - | |
| 266 | + | |
287 | 267 | | |
288 | 268 | | |
289 | | - | |
290 | | - | |
291 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
292 | 273 | | |
293 | 274 | | |
294 | 275 | | |
| |||
320 | 301 | | |
321 | 302 | | |
322 | 303 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
| 304 | + | |
| 305 | + | |
342 | 306 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
348 | 310 | | |
349 | 311 | | |
350 | | - | |
| 312 | + | |
351 | 313 | | |
352 | 314 | | |
353 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments