File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
packages/guides/src/DependencyInjection
tests/Integration/tests/meta/version-from-guides-xml/input Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 38
38
use function assert ;
39
39
use function dirname ;
40
40
use function is_array ;
41
+ use function is_int ;
42
+ use function is_string ;
41
43
use function pathinfo ;
44
+ use function var_export ;
42
45
43
46
final class GuidesExtension extends Extension implements CompilerPassInterface, ConfigurationInterface, PrependExtensionInterface
44
47
{
@@ -55,7 +58,20 @@ public function getConfigTreeBuilder(): TreeBuilder
55
58
->arrayNode ('project ' )
56
59
->children ()
57
60
->scalarNode ('title ' )->end ()
58
- ->scalarNode ('version ' )->end ()
61
+ ->scalarNode ('version ' )
62
+ ->beforeNormalization ()
63
+ ->always (
64
+ // We need to revert the phpize call in XmlUtils. Version is always a string!
65
+ static function ($ value ) {
66
+ if (!is_int ($ value ) && !is_string ($ value )) {
67
+ return var_export ($ value , true );
68
+ }
69
+
70
+ return $ value ;
71
+ },
72
+ )
73
+ ->end ()
74
+ ->end ()
59
75
->scalarNode ('release ' )->end ()
60
76
->scalarNode ('copyright ' )->end ()
61
77
->end ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments