- πΊπΈUnited States joegraduate Arizona, USA
Looks like the proxy classes were fixed with #3197482: Update Drupal 10 to depend on Symfony 5.4 (as a stepping stone to Symfony 6, for deprecation checking support) β .
This issue I believe is after this update: https://git.drupalcode.org/project/drupal/commit/c8cc155#9013c0bcc39d0f1...
I ran into an issue after upgrading to Drupal 9.1.0, and attempting to run drush cr -y using PHP 7.3.9.
It also happens with drush st and probably all drush commands.
he issue is that two class methods updated in Drupal 9.1.0 are lacking the type hint string that the interface has in the declaration.
They should be updated to match the interface \Symfony\Component\Mime\MimeTypeGuesserInterface::guessMimeType(string $path): ?string
Without this running drush commands you get a PHP fatal error:
PHP Fatal error: Declaration of Drupal\Core\ProxyClass\File\MimeType\ExtensionMimeTypeGuesser::guessMimeType($path): string must be compatible with Symfony\Component\Mime\MimeTypeGuesserInterface::guessMimeType(string $path): ?string in /Users/nathanandersen/dev/mdb/web/core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php on line 15
and
PHP Fatal error: Declaration of Drupal\Core\File\MimeType\MimeTypeGuesser::guessMimeType($path): ?string must be compatible with Symfony\Component\Mime\MimeTypeGuesserInterface::guessMimeType(string $path): ?string in /Users/nathanandersen/dev/mdb/web/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php on line 14
[warning] Drush command terminated abnormally.
For me, it was updating to Drupal 9.1.0 using PHP 7.3.9.
The code was updated recently in 9.1.0: #3055193: [Symfony 5] The "Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser" class is deprecated since Symfony 4.3, use "Symfony\Component\Mime\MimeTypes" instead. β
add "string" declaration.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Looks like the proxy classes were fixed with #3197482: Update Drupal 10 to depend on Symfony 5.4 (as a stepping stone to Symfony 6, for deprecation checking support) β .