Commit fcc475c
committed
Keep version strings like "0.10" intact when loading guides.xml
guides.xml is parsed with Symfony XmlUtils::convertDomElementToArray(), which
runs phpize() on every attribute value, coercing numeric-looking strings to
numbers. A <project version="0.10"> therefore became the float 0.1 ("1.0" -> 1,
"1.10" -> 1.1, "13.0" -> 13), so the project version and release rendered as
"0.1" everywhere -- breaking version switchers and deployments that distinguish
0.1 from 0.10.
The <project> attributes (title, version, release, copyright) are all strings,
so restore them verbatim from the DOM after the array conversion.
Reported on docs.typo3.org for netresearch/nr-vault and nr-llm (0.10 / 0.12).
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>1 parent 6d70127 commit fcc475c
4 files changed
Lines changed: 44 additions & 0 deletions
File tree
- packages/guides-cli/src/Config
- tests/Integration/tests/version-substitution
- expected
- input
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
| |||
Lines changed: 17 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 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments