src/Constraint/MimeTypeConstraint.php
public function validate(UploadedFile $file)
    {
        foreach ($this->allowedMimeTypes as $mimeType) {
            if ($mimeType === $file->getClientMimeType()
                || (strpos($mimeType, '/*') !== false
                    && explode('/', $mimeType)[0] == explode('/', $file->getMimeType())[0])
            ) {
                return true;
            }
        }
        return false;
    }
public function validate(UploadedFile $file)
    {
        foreach ($this->allowedMimeTypes as $mimeType) {
            if ($mimeType === $file->getClientMimeType()
                || (strpos($mimeType, '/*') !== false
                    && explode('/', $mimeType)[0] == explode('/', $file->getMimeType())[0])
            ) {
                return true;
            }
        }
        return false;
    }
{@inheritdoc]