Problem/Motivation
We are working on a drupal 9 to 10 upgrade. Still preparing so our site using Drupal 9 actually.
Installed XML sitemap version: XML Sitemap 8.x-1.5 which is the latest stable and theoretically compatible with Drupal 10 but
upgrade status module notifies me the following errors (not warnings):
tests/src/Functional/XmlSitemapFunctionalTest.php
line: 36
Call to deprecated method drupalGetHeader() of class Drupal\Tests\BrowserTestBase. Deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getResponseHeader() instead.
tests/src/Functional/XmlSitemapFunctionalTest.php
line. 37
Call to deprecated method drupalGetHeader() of class Drupal\Tests\BrowserTestBase. Deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getResponseHeader() instead.
tests/src/Functional/XmlSitemapFunctionalTest.php
line:67
Call to deprecated function taxonomy_term_load_multiple_by_name(). Deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['name' => $name, 'vid' => $vid]) instead, to get a list of taxonomy term entities having the same name and keyed by their term ID.
xmlsitemap.module
line: 2351
Call to deprecated method getImplementations() of class Drupal\Core\Extension\ModuleHandlerInterface. Deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Instead you should use ModuleHandlerInterface::invokeAllWith() for hook invocations or you should use ModuleHandlerInterface::hasImplementations() to determine if hooks implementations exist.
Was already fixed in #3323148: Error: Call to undefined method Drupal\Core\Extension\ModuleHandler::getImplementations() in xmlsitemap_check_status()
Errors #1-3 are related to test so probably doesn't affects daily usage of module but the #4 is related to the xmlsitemap.module so I think It may require attention
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3390909-6.patch | 1.95 KB | pradhumanjain2311 |
| #3 | Drupal10_compatibility-3390909.patch | 1.94 KB | sarwan_verma |
Issue fork xmlsitemap-3390909
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 #2
bobi-mel commentedComment #3
sarwan_verma commentedHi @kepesv,
I have fixed this issue Drupal 10 compatibility - Call to deprecated method getImplementations() of class Drupal\Core\Extension\ModuleHandlerInterface and also attached patch.
please review and verify.
Comment #4
sarwan_verma commentedComment #6
pradhumanjain2311 commentedTry to fix failed test case.
Comment #9
ankondrat4 commentedHello.
Refactor and created MR.
Please review.
Comment #11
dwwConfirmed. Ran into this on a client project where I'm trying to upgrade a site from 8.9.x to modern Drupal. An intermediate step is getting from D9 to D10, and that requires the 8.x-1.x branch. That branch doesn't fully work with D10, even though the .info.yml file says so.
I rebased the MR on the latest 8.x-1.x, and pushed a commit to get the tests passing on both branches (at least locally).
Note that #3365229: Add separate 'Save' and 'Save and add fields' to Add Content, Comment, Media and Block Type Forms somewhat annoyingly (and IMHO, out of scope) changed the button label on the content type form from 'Save content type' to just 'Save'. That's why we need the
version_compare()inXmlSitemapMultilingualNodeTest.php.Comment #12
poker10 commentedThanks for your patience. I have reviewed the changes from the MR and it looks good. Updating the title, credits and going to merge this.
Comment #14
poker10 commentedThis is now merged into 8.x-1.x. Thanks everyone!