Skip to content

Commit a928329

Browse files
artyuumfabpot
authored andcommitted
Add "composer require..." in all exception messages when needed
1 parent ea55e45 commit a928329

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

EventListener/ExpressionLanguage.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function registerFunctions()
3333

3434
$this->register('is_valid', fn ($object = 'null', $groups = 'null') => sprintf('0 === count($validator->validate(%s, null, %s))', $object, $groups), function (array $variables, $object = null, $groups = null) {
3535
if (!$variables['validator'] instanceof ValidatorInterface) {
36-
throw new RuntimeException('"is_valid" cannot be used as the Validator component is not installed.');
36+
throw new RuntimeException('"is_valid" cannot be used as the Validator component is not installed. Try running "composer require symfony/validator".');
3737
}
3838

3939
$errors = $variables['validator']->validate($object, null, $groups);

0 commit comments

Comments
 (0)