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 3838use function assert ;
3939use function dirname ;
4040use function is_array ;
41+ use function is_int ;
42+ use function is_string ;
4143use function pathinfo ;
44+ use function var_export ;
4245
4346final class GuidesExtension extends Extension implements CompilerPassInterface, ConfigurationInterface, PrependExtensionInterface
4447{
@@ -55,7 +58,20 @@ public function getConfigTreeBuilder(): TreeBuilder
5558 ->arrayNode ('project ' )
5659 ->children ()
5760 ->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 ()
5975 ->scalarNode ('release ' )->end ()
6076 ->scalarNode ('copyright ' )->end ()
6177 ->end ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments