Skip to content

Commit c8a8ae2

Browse files
committed
adjustment
1 parent 87cc6df commit c8a8ae2

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public static function from(
174174
// @phpstan-ignore argument.type
175175
is_array($value) || (is_string($value) && json_validate($value)) => self::fromJson($value, $schemaVersion),
176176
default => throw new SchemaException(
177-
'Unsupported value type. Only closures, enums, and classes are supported.',
177+
'Unsupported value type. Only closures, enums, arrays and classes are supported.',
178178
),
179179
};
180180
}

src/Types/Concerns/HasProperties.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,12 @@ public function hasRequiredProperties(): bool
253253
*/
254254
public function requireAll(): static
255255
{
256-
foreach ($this->properties as $name => $property) {
257-
$this->requiredProperties[] = $name;
256+
foreach ($this->properties as $property) {
257+
$title = $this->resolvePropertyTitle($property);
258+
259+
if ($title !== null) {
260+
$this->requiredProperties[] = $title;
261+
}
258262
}
259263

260264
return $this;

0 commit comments

Comments
 (0)