-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
final class Example extends MappedObject {
/** @var array{foo: string, bar: string} */
#[AllOf([
new ArrayShape([
'foo' => new StringValue(),
'bar' => new MixedValue()
]),
new ArrayShape([
'bar' => new StringValue(),
], allowExtraProps: true),
])]
public array $merged;
/** @var array{foo: string, bar: string} */
#[AllOf([
new ArrayShape(FullObject::class),
new ArrayShape(PartialObject::class, allowExtraProps: true),
])]
public array $merged2;
}
$processor->process([
'merged' => [
'foo' => 'string',
'bar' => 'string',
],
'merged2' => [
'foo' => 'string',
'bar' => 'string',
],
], Example::class);
Metadata
Metadata
Assignees
Labels
No labels