From cf33702e7c093e542343b5ca6dea889d10a592ff Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Tue, 19 May 2020 12:17:48 +0200 Subject: [PATCH] Improve error message when Mime component is not installed --- src/Symfony/Component/Validator/Constraints/FileValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/Symfony/Component/Validator/Constraints/FileValidator.php index b148a52b7e6ac..f17582c9831e4 100644 --- a/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -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;