Error: Call to undefined method Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser::guess()

Created on 4 July 2023, almost 2 years ago
Updated 5 July 2023, almost 2 years ago

Problem/Motivation

Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser::guess() was deprecated in Drupal 9 and removed in Drupal 10. See the Change Record β†’ .

Steps to reproduce

  1. Install the module on a Drupal 10 website.
  2. Send an email with an attachment (only using 'filepath').
  3. Notice the error.

Proposed resolution

Replace Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser::guess() with \Symfony\Component\Mime\MimeTypeGuesserInterface::guessMimeType()

Remaining tasks

  1. Decide whether we are going to keep Drupal 8 support.
πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Nathan Tsai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024