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

Created on 17 January 2024, 12 months ago

Problem/Motivation

MimeTypeGuesser::guess() method has been removed in D10

Steps to reproduce

  1. Install enable documentation_generator module on site running Drupal core 10
  2. Go to /admin/config/documentation-generator/generate
  3. Click link to view generated document
  4. The following php error is displayed:

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\Core\ProxyClass\File\MimeType\MimeTypeGuesser::guess() in documentation_generator_file_download() (line 26 of modules/contrib/documentation_generator/documentation_generator.module).

Proposed resolution

Replace calls to removed method with MimeTypeGuesser::guessMimeType()

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom ashlewis

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

Comments & Activities

Production build 0.71.5 2024