Skip to content

Commit 149a308

Browse files
committed
Merge tag '1.2' into dev
Release 1.2.0 - Add support for 'use as'
2 parents 9561f0f + 2c6d374 commit 149a308

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Application/Shared/Constant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
class Constant
88
{
9-
public const VERSION = '1.1.0';
9+
public const VERSION = '1.2.1';
1010
}

src/Domain/Definition/Schema/UseKeywordDefinitionSchema.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ public function getConfigTreeBuilder()
3030
})
3131
->end()
3232
->arrayPrototype()
33+
->beforeNormalization()
34+
->ifTrue(static function($v) {
35+
return !is_array($v);
36+
})
37+
->then(static function($v){
38+
return [SchemaKey::CLASS_NAME => $v, SchemaKey::AS => null];
39+
})->end()
3340
->children()
3441
->scalarNode(SchemaKey::CLASS_NAME)->end()
3542
->scalarNode(SchemaKey::AS)->defaultNull()->end()

0 commit comments

Comments
 (0)