It looks like the module has no deprecated code usages, so we just need to mark it as compatible with D9.

So, add core_version_requirement: ^8 || ^9 to all info.yml files, and also add the composer.json definition per https://www.drupal.org/node/3070687.

CommentFileSizeAuthor
#2 updated-info-file.patch299 bytessahana _n

Comments

Sahana _N created an issue. See original summary.

sahana _n’s picture

Status: Active » Needs review
StatusFileSize
new299 bytes

Please review the patch.

meghasharma’s picture

Status: Needs review » Needs work

I have run the drupal_check and rector on revisions module. It showing errors
please fix the errors
Use rector, drupal_check, upgrade status and upgrade_rector on module!

my_site_name_dir % vendor/bin/drupal-check -ad web/modules/contrib/revisions
Warning: Class 'PHPUnit\Framework\MockObject\Matcher\InvokedRecorder' not found in /Users/Documents/sample/my_site_name_dir/web/core/tests/bootstrap.php on line 197
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ --------------------------------------------------------------------------------------------
Line src/Controller/RevisionsController.php
------ --------------------------------------------------------------------------------------------
51 Unsafe usage of new static().
💡 Consider making the class or the constructor final.
66 PHPDoc tag @param references unknown parameter: $node
116 Call to an undefined method Drupal\Core\Entity\EntityInterface::getTranslationLanguages().
119 Call to an undefined method Drupal\Core\Entity\EntityInterface::getType().
125 Call to an undefined method Drupal\Core\Entity\EntityInterface::getRevisionId().
142 Call to an undefined method Drupal\Core\Entity\EntityInterface::getRevisionId().
206 Call to an undefined method Drupal\Core\Entity\EntityInterface::getRevisionId().
236 Variable $header might not be defined.
------ --------------------------------------------------------------------------------------------

[ERROR] Found 8 errors

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

9/9 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[ERROR] Could not process "web/modules/contrib/revisions/src/Controller/RevisionsController.php" file, due to:
"Analyze error: "ParseError (syntax error, unexpected 'error' (T_STRING)) thrown while autoloading class
Drupal\revisions\Controller\RevisionsController.". Include your files in "parameters > autoload_paths".
See https://github.com/rectorphp/rector#extra-autoloading".

shubhangi1995’s picture

Assigned: Unassigned » shubhangi1995
gaurav.kapoor’s picture

Status: Needs work » Closed (duplicate)