Problem/Motivation
Full details of the error:
ArgumentCountError: Too few arguments to function Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter::__construct(), 9 passed in /var/www/html/web/modules/contrib/media_pdf_thumbnail/src/Plugin/Field/FieldFormatter/MediaPdfThumbnailImageFieldFormatter.php on line 102 and exactly 10 expected in /var/www/html/web/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php on line 75
The reason for this is that Drupal 10 now has an extra parameter (the file url generator service) that is not being passed by the current code.
Proposed resolution
Instead of trying to follow core, better rely on core's constructor to do its thing and instead move all module-specific plugin construction logic to the create() function.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #3
jcnventuraComment #4
sgostanyan commentedReviewed and merged in 5.4 release.
Thank you for contributing