File tree Expand file tree Collapse file tree 4 files changed +26
-5
lines changed
packages/guides/src/DependencyInjection
configuration/config-project
meta/version-from-guides-xml/input Expand file tree Collapse file tree 4 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public function getConfigTreeBuilder(): TreeBuilder
59
59
->arrayNode ('project ' )
60
60
->children ()
61
61
->scalarNode ('title ' )->end ()
62
- ->scalarNode ('version ' )
62
+ ->node ('version ' , ' scalar ' )
63
63
->beforeNormalization ()
64
64
->always (
65
65
// We need to revert the phpize call in XmlUtils. Version is always a string!
@@ -68,12 +68,33 @@ static function ($value) {
68
68
return var_export ($ value , true );
69
69
}
70
70
71
+ if (is_string ($ value )) {
72
+ return trim ($ value , "' " );
73
+ }
74
+
75
+ return $ value ;
76
+ },
77
+ )
78
+ ->end ()
79
+ ->end ()
80
+ ->node ('release ' , 'scalar ' )
81
+ ->beforeNormalization ()
82
+ ->always (
83
+ // We need to revert the phpize call in XmlUtils. Version is always a string!
84
+ static function ($ value ) {
85
+ if (!is_int ($ value ) && !is_string ($ value )) {
86
+ return var_export ($ value , true );
87
+ }
88
+
89
+ if (is_string ($ value )) {
90
+ return trim ($ value , "' " );
91
+ }
92
+
71
93
return $ value ;
72
94
},
73
95
)
74
96
->end ()
75
97
->end ()
76
- ->scalarNode ('release ' )->end ()
77
98
->scalarNode ('copyright ' )->end ()
78
99
->end ()
79
100
->end ()
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ <h1>Document Title</h1>
10
10
< dd > Title</ dd >
11
11
< dt > version:</ dt >
12
12
13
- < dd > 12.4</ dd >
13
+ < dd > 12.4.0 </ dd >
14
14
< dt > release:</ dt >
15
15
16
16
< dd > 12.4.9-dev</ dd >
Original file line number Diff line number Diff line change 5
5
>
6
6
<project
7
7
title =" Title"
8
- version =" 12.4"
8
+ version =" 12.4.0 "
9
9
release =" 12.4.9-dev"
10
10
copyright =" since 1998 phpDocumentor Team and Contributors"
11
11
/>
Original file line number Diff line number Diff line change 6
6
>
7
7
<project
8
8
title =" Render guides"
9
- version =" 3.0"
9
+ version =" ' 3.0' "
10
10
release =" 3.0.0"
11
11
/>
12
12
</guides >
You can’t perform that action at this time.
0 commit comments