MimeTypeGuesser::guess() is deprecated

Created on 23 November 2023, 12 months ago

Problem/Motivation

Using the file_mimetype plugin in Drupal 10+ results in:

Error: Call to undefined method Drupal\Core\ProxyClass\File\MimeType\MimeTypeGuesser::guess() 
  in Drupal\migrate_plus\Plugin\migrate\process\FileMimeType->transform() 

The suggestion to use the new guessMimeType() was made here: https://www.drupal.org/project/migrate_plus/issues/3218356#comment-14178684

Along with the change record here: https://www.drupal.org/node/3126004

Proposed resolution

Update plugin to use guessMimeType instead of guess.

🐛 Bug report
Status

Closed: cannot reproduce

Version

6.0

Component

Plugins

Created by

🇳🇿New Zealand code_brown

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

Comments & Activities

Production build 0.71.5 2024