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:
Issue fork allowed_languages-3330330
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
levmyshkinHi, 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
Comment #3
levmyshkinComment #5
harshitthakoreFixed compatibility, highlighted in comment #2
Comment #7
levmyshkinComment #10
heddnThanks 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.