simple_sitemap version compatibility

Created on 10 November 2023, about 1 year ago
Updated 29 May 2024, 6 months ago

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

  1. Install domain, simple_sitemap, domain_simple_sitemap on a Drupal 9.5.11 or Drupal 10.1 site.
  2. Install upgrade_status.
  3. Go to the upgrade status report and "scan" domain_simple_sitemap.
  4. (I confirmed you'll see the warning on Drupal 9 or Drupal 10, but I'll describe what I see in Drupal 9.)
  5. 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."
  6. 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

📌 Task
Status

Needs review

Version

2.0

Component

Documentation

Created by

🇺🇸United States alison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @alison
  • @alison opened merge request.
  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States alison

    I took a very quick swing at updating composer.json and README (MR 15) -- also, the fork was created off of the 1.x branch, ugh, so there's an extra branch in there (I tried to delete it but couldn't, maybe someone else can -- the branch to delete is called 3400936-simplesitemap-version-compatibility).

    IMPORTANT: This change shouldn't be merged until after Make compatible with simple_sitemap 4.0 & domain_entity Fixed is done -- I'm still setting it as "needs review" for now, to get input and whatever, but after review, it'll need to be on hold until the simple_sitemap 4.x compatibility fixes are done 🙃

    QUESTION: Should we also set a conflict key in composer.json, or just the version constraint in the require section?

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    tim-diels changed the visibility of the branch 3400936-simplesitemap-version-compatibility to hidden.

Production build 0.71.5 2024