Commit 6b70577
committed
[BUGFIX] Read project version from the DOM so "0.10" is not coerced to 0.1
A <project version="0.10"> in guides.xml was rendered as version 0.1
(title, objects.inv, every |version| substitution). XmlFileLoader parses
guides.xml with XmlUtils::convertDomElementToArray(), which runs phpize() on
every attribute value, coercing version-like strings into numbers: "0.10"
becomes the float 0.1, "1.0" becomes 1, "13.0" becomes 13.
Read the <project> attributes (all strings) straight from the DOM, and detach
the element before the conversion so phpize never sees them. The version is now
read correctly at the source instead of being coerced and patched up afterwards.
This makes the previous "escaped version" workaround obsolete -- writing
version="'3.0'" with single quotes to dodge phpize, with a beforeNormalization
that stripped them again -- so it is removed; write the version directly, e.g.
version="0.10".
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 6b70577
3 files changed
Lines changed: 30 additions & 40 deletions
File tree
- packages
- guides-cli/src/Config
- guides/src/DependencyInjection
- tests/Integration/tests/meta/version-from-guides-xml/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 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
39 | 62 | | |
40 | 63 | | |
41 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
42 | 69 | | |
43 | 70 | | |
44 | 71 | | |
| |||
Lines changed: 2 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | | - | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
| |||
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 64 | + | |
| 65 | + | |
103 | 66 | | |
104 | 67 | | |
105 | 68 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
0 commit comments