Skip to content

Commit b1d1cc4

Browse files
mabarMilan Felix Šulc
authored andcommitted
ConsoleExtension: allow console version to be numeric
1 parent bee4e81 commit b1d1cc4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/DI/ConsoleExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getConfigSchema(): Schema
4646
return Expect::structure([
4747
'url' => Expect::string(),
4848
'name' => Expect::string(),
49-
'version' => Expect::string(),
49+
'version' => Expect::anyOf(Expect::string(), Expect::int(), Expect::float()),
5050
'catchExceptions' => Expect::bool(),
5151
'autoExit' => Expect::bool(),
5252
'helperSet' => Expect::string(),
@@ -76,7 +76,7 @@ public function loadConfiguration(): void
7676
}
7777

7878
if ($config->version !== null) {
79-
$applicationDef->addSetup('setVersion', [$config->version]);
79+
$applicationDef->addSetup('setVersion', [(string) $config->version]);
8080
}
8181

8282
if ($config->catchExceptions !== null) {

0 commit comments

Comments
 (0)