Skip to content

Commit

Permalink
allow empty definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier committed Dec 5, 2024
1 parent e9a9626 commit 125f9e5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ public function __construct(private readonly YamlLoader $yamlLoader, private rea
*/
public function validate($value, Constraint $constraint): void
{
if(!($definition = $value->getDefinition())) {
return;
}
try {
$config = $this->yamlLoader->parse($value->getDefinition());
$config = $this->yamlLoader->parse($definition);
$this->validator->validate($config);
} catch (\Throwable $e) {
$this->context
Expand Down

0 comments on commit 125f9e5

Please sign in to comment.