Add core_version_requirement: ^8 || ^9 to hide_submit_d8.info.yml to designate that the module is compatible with Drupal 9.
See https://www.drupal.org/node/3070687.

drupal-check & rector reports below :-

vendor/mglaman/drupal-check/drupal-check -ad web/modules/contrib/hide_submit_d8
 3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------
  Line   src/Form/HideSubmitSettings.php
 ------ -------------------------------------------------------
  35     Unsafe usage of new static().
         💡 Consider making the class or the constructor final.
 ------ -------------------------------------------------------


 [ERROR] Found 1 error



vendor/bin/rector process web/modules/contrib/hide_submit_d8 --dry-run
Rector 0.8.x-dev@8896f0a
Config file: rector.yml

 12/12 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

1 file with changes
===================

1) web/modules/contrib/hide_submit_d8/hide_submit.module

    ---------- begin diff ----------
--- Original
+++ New
@@ -21,7 +21,7 @@
   // Return false if on views_ui page to prevent issues.
   $path = Url::fromRoute("<current>")->toString();

-  $path_alias = \Drupal::service('path.alias_manager')->getAliasByPath($path);
+  $path_alias = \Drupal::service('path_alias.manager')->getAliasByPath($path);

   if (strcmp($path_alias, $path) == 0) {
     // No alias was found.
    ----------- end diff -----------

Applied rules:

 * DrupalRector\Rector\Deprecation\PathAliasManagerServiceNameRector



 [OK] Rector is done! 1 file would have changed (dry-run).
CommentFileSizeAuthor
#3 3131648-3.patch901 bytesrahulrasgon

Comments

rahulrasgon created an issue. See original summary.

rahulrasgon’s picture

Issue summary: View changes
rahulrasgon’s picture

Assigned: rahulrasgon » Unassigned
Status: Needs work » Needs review
StatusFileSize
new901 bytes

Added a patch. Kindly review.

nehajyoti’s picture

Adding this patch in 8.x-1.x branch

  • nehajyoti committed da70d65 on 8.x-1.x authored by rahulrasgon
    Issue #3131648 by rahulrasgon, nehajyoti: [META] Make Hide Submit Button...
nehajyoti’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

kristen pol’s picture

Issue tags: -Drupal 9 readiness

Removing outdated tag.