Problem/Motivation
I'm working on upgrading a site to Drupal 10, and I have
patch #53 here
✨
Make compatible with simple_sitemap 4.0 & domain_entity
Fixed
to help me along, BUT, now when I re-check Upgrade Status report, it's warning me that domain_simple_sitemap is using a method that was deprecated in simple_sitemap 4.x and removed from simple_sitemap 5.x.
Screenshot of the warning is attached →
-- here's a text version:
CONTRIBUTED PROJECTS
--------------------------------------------------------------------------------
Domain Access Simple Sitemap 8.x-2.0-beta1
Scanned on Fri, 11/10/2023 - 17:38.
1 warning found.
web/modules/contrib/domain_simple_sitemap/src/Plugin/simple_sitemap/UrlGenerator
/DomainEntityUrlGenerator.php:
┌──────────┬──────┬────────────────────────────────────────────────────────────┐
│ STATUS │ LINE │ MESSAGE │
├──────────┼──────┼────────────────────────────────────────────────────────────┤
│ Check │ 27 │ Call to deprecated method setVariants() of class │
│ manually │ │ Drupal\simple_sitemap\Manager\EntityManager. Deprecated in │
│ │ │ simple_sitemap:4.1.7 and is removed from │
│ │ │ simple_sitemap:5.0.0. Use setSitemaps() instead. │
│ │ │ │
└──────────┴──────┴────────────────────────────────────────────────────────────┘
Steps to reproduce
- Install domain, simple_sitemap, domain_simple_sitemap on a Drupal 9.5.11 or Drupal 10.1 site.
- Install upgrade_status.
- Go to the upgrade status report and "scan" domain_simple_sitemap.
- (I confirmed you'll see the warning on Drupal 9 or Drupal 10, but I'll describe what I see in Drupal 9.)
- It won't go into any of the top sections of the report, but if you scroll down to the "Compatible with next major Drupal core version" table, find domain_simple_sitemap -- it'll say "1 problem" -- click "1 problem."
- You'll see the deprecation warning I described above.
Proposed resolution
For now, I recommend adding a note to the module project page, to explain which version(s) of "simple_sitemap" domain_simple_sitemap is compatible with. For example, in theory, domain_simple_sitemap 2.x will be compatible with simple_sitemap 4.x ("in theory" because it isn't yet, but it will be after issue #3251227) -- not 5.x.
It would be great to also indicate the version compatibility in the domain_simple_sitemap "composer.json", but I know that's not nothing to do -- and meanwhile, having a note on the project page would be great!
P.S. I know "domain" should also be in composer.json, but I don't know the version compatibility details for that module...
Remaining tasks
User interface changes
API changes
Data model changes