Commit e3b664d
committed
bug symfony#61605 [Cache] Fix internal representation of non-static values (nicolas-grekas)
This PR was merged into the 6.4 branch.
Discussion
----------
[Cache] Fix internal representation of non-static values
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
I'm working on a PR to allow exporting named closures, and the way we use closures in PhpArrayAdapter and PhpFilesAdapter gets into my way.
Instead of relying on `instanceof \Closure` checks, this PR adds an internal marker interface. This makes the logic specific to the component, enabling having closures as regular cached values.
The new logic is tested since adapters are.
Commits
-------
a5823af [Cache] Fix internal representation of non-static valuesFile tree
3 files changed
+36
-14
lines changed- src/Symfony/Component/Cache
- Adapter
- Traits
3 files changed
+36
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | | - | |
101 | | - | |
102 | | - | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
107 | | - | |
108 | | - | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
311 | 310 | | |
312 | 311 | | |
313 | 312 | | |
| |||
368 | 367 | | |
369 | 368 | | |
370 | 369 | | |
371 | | - | |
| 370 | + | |
372 | 371 | | |
373 | | - | |
| 372 | + | |
374 | 373 | | |
375 | 374 | | |
376 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | | - | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| |||
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | | - | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
239 | | - | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments