- Issue created by @ptmkenny
- 🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)
working for me, thanks
PHP 8.4 deprecates implicitly marking parameters as nullable. A fresh install of metatag results in deprecation warnings like this:
Deprecated: Drupal\metatag\MetatagToken::replace(): Implicitly marking parameter $bubbleable_metadata as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/metatag/src/MetatagToken.php on line 60
Deprecated: Drupal\metatag\MetatagManager::form(): Implicitly marking parameter $included_groups as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/metatag/src/MetatagManager.php on line 327
Deprecated: Drupal\metatag\MetatagManager::form(): Implicitly marking parameter $included_tags as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/metatag/src/MetatagManager.php on line 327
Deprecated: Drupal\metatag\MetatagManager::getDefaultMetatags(): Implicitly marking parameter $entity as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/metatag/src/MetatagManager.php on line 458
Deprecated: Drupal\metatag\MetatagManager::generateRawElements(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/metatag/src/MetatagManager.php on line 582
This is fixed by the latest Drupal coding standards, but the phpcs issue for this module is stalled ( 📌 Resolve phpcs issues in 2.0.x / 2.1.x Active ), so I'm creating a fix for only the nullable deprecation warning here.
Active
2.1
Code
working for me, thanks