Problem/Motivation

This module should be updated for Drupal 10, at least we should update jquery.once library with drupal/once library:
https://www.drupal.org/node/3158256

We need to change core_version_requirement to ^9.2 || ^10, becuase javascript once() was added only in 9.2 Drupal core:

Command icon 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

levmyshkin created an issue. See original summary.

levmyshkin’s picture

Hi, I replaced jQuery once with javascript once in 3330330-drupal-10-support branch.

I changed core_version_requirement to ^9.2 || ^10, becuase javascript once() was added only in 9.2 Drupal core:
https://www.drupal.org/node/3158256

Also here is another problem with Event Subscriber, which I will see later:
Fatal error: Declaration of Drupal\allowed_languages\Routing\AllowedLanguagesRouteSubscriber::getSubscribedEvents() must be compatible with Drupal\content_translation\Routing\ContentTranslationRouteSubscriber::getSubscribedEvents(): array in /home/laptop/projects/drupal10/web/modules/custom/allowed_languages/src/Routing/AllowedLanguagesRouteSubscriber.php on line 28

levmyshkin’s picture

Status: Active » Needs work

harshitthakore made their first commit to this issue’s fork.

harshitthakore’s picture

Status: Needs work » Needs review

Fixed compatibility, highlighted in comment #2

levmyshkin’s picture

Assigned: levmyshkin » Unassigned

heddn made their first commit to this issue’s fork.

  • heddn committed dff4aede on 2.x
    Issue #3330330 by levmyshkin, harshitthakore, heddn: Drupal 10 Support
    
heddn’s picture

Status: Needs review » Fixed

Thanks for all your work here. I tested this locally in a vanilla d10 site. The once js stuffs just works. The tests were failing, but they are now passing again. This looks great.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.