Problem/Motivation
I ran into the following issue in attempting to run drush cr -y:
Fatal error: Uncaught TypeError: Argument 1 passed to Drupal\search_api_attachments\ExtractFileValidator::__construct() must be an instance of Drupal\Core\File\MimeType\MimeTypeGuesser, instance of Drupal\Core\ProxyClass\File\MimeType\MimeTypeGuesser given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 257 and defined in /var/www/html/web/modules/contrib/search_api_attachments/src/ExtractFileValidator.php:30
Stack trace:
#0 /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php(257): Drupal\search_api_attachments\ExtractFileValidator->__construct(Object(Drupal\Core\ProxyClass\File\MimeType\MimeTypeGuesser))
#1 /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php(171): Drupal\Component\DependencyInjection\Container->createService(Array, 'search_api_atta...')
#2 /var/www/html/web/modules/contrib/devel/webprofiler/src/DependencyInjection/TraceableContainer.php(50): Drupal\Component\DependencyInjection\Container->get('search_api_ in /var/www/html/web/modules/contrib/search_api_attachments/src/ExtractFileValidator.php on line 30
[warning] Drush command terminated abnormally.
Steps to reproduce
I'm using "drupal/core": "9.1.8 and the "drupal/search_api_attachments": "9.0.x-dev#642a6b34"
Proposed resolution
Replace the reference to the class "Drupal\Core\File\MimeType\MimeTypeGuesser"
by using the interface "Symfony\Component\Mime\MimeTypeGuesserInterface"
Issue fork search_api_attachments-3213815
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
izus commentedthanks for this
Comment #5
izus commentedthis is now merged :)
Comment #6
izus commented