Skip to content

Commit

Permalink
Improve error message when Mime component is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup committed May 19, 2020
1 parent df554cd commit cf33702
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -173,7 +173,7 @@ public function validate($value, Constraint $constraint)

if ($constraint->mimeTypes) {
if (!class_exists(MimeTypes::class)) {
throw new LogicException('Validating mime types requires the "Mime" component. Install "symfony/mime" to use it.');
throw new LogicException('You cannot validate the mime-type of files as the Mime component is not installed. Try running "composer require symfony/mime".');
}

$mimeTypes = (array) $constraint->mimeTypes;
Expand Down

0 comments on commit cf33702

Please sign in to comment.