Commit 03ef568
authored
[BUGFIX] Ensure valid name for cache classes (#1268)
Due to refactorings in the cache layer of Fluid, which were necessary
to make cache warmup feasible, the cache identifiers have changed
with Fluid 5. This currently leads to parse errors when a template
name starts with a number because the associated cache file and most
importantly the generated PHP class name also starts with that number,
which isn't allowed in PHP.
This patch addresses that issue by prepending "template_" to cache
identifiers. Other special characters are already dealt with in
`TemplateCompiler`, so we only need to ensure that the identifier
starts with an alpha-character.
Resolves: #12661 parent 18048d9 commit 03ef568
File tree
3 files changed
+11
-4
lines changed- src/View
- tests/Unit/View
- Fixtures
3 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
| 435 | + | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | 188 | | |
183 | 189 | | |
| |||
0 commit comments