Problem/Motivation
Currently the module has 4 deprecations on PHP 8.4, they are simple fixes.
Deprecated: Drupal\xmlsitemap\XmlSitemapStorage::__construct(): Implicitly marking parameter $memory_cache as nullable is deprecated, the explicit nullable type must be used instead in /data/app/modules/contrib/xmlsitemap/src/XmlSitemapStorage.php on line 43
Deprecated: Drupal\xmlsitemap\XmlSitemapStorage::doLoadMultiple(): Implicitly marking parameter $ids as nullable is deprecated, the explicit nullable type must be used instead in /data/app/modules/contrib/xmlsitemap/src/XmlSitemapStorage.php on line 78
Deprecated: Drupal\xmlsitemap\Entity\XmlSitemap::loadByContext(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /data/app/modules/contrib/xmlsitemap/src/Entity/XmlSitemap.php on line 200
Deprecated: Drupal\xmlsitemap\XmlSitemapInterface::loadByContext(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /data/app/modules/contrib/xmlsitemap/src/XmlSitemapInterface.php on line 147
Steps to reproduce
Run the module on PHP 8.4
Issue fork xmlsitemap-3499531
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
acbramley commentedComment #4
ressaThanks for working on this, tagging with PHP 8.4, to easier follow along.
Comment #5
wallexk1 commentedPatch created on-demand for those in need. I do not know where to park the patch file.
Filename: "3499531-fix-implicit-nullables.patch"
Comment #6
martygraphie commentedMR works fine !
I no longer see alerts.
Marc
Comment #8
poker10 commentedThis looks good, thanks. Drupal 10 requires minimum PHP 8.1, so I think that it is safe to add the nullable type declarations.
I reviewed the changes and have not found any other places where the deprecation message can be emitted.
Comment #10
poker10 commentedMerged to 2.x, thanks everyone!