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).
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3131648-3.patch | 901 bytes | rahulrasgon |
Comments
Comment #2
rahulrasgon commentedComment #3
rahulrasgon commentedAdded a patch. Kindly review.
Comment #4
nehajyoti commentedAdding this patch in 8.x-1.x branch
Comment #6
nehajyoti commentedComment #8
kristen polRemoving outdated tag.