Update the module for D9 compatibility.

1) Add core_version_requirement: ^8 || ^9 to info.yml file for compatible with D9.
2) check for deprecation and replace deprecated code.
3) Update/remove any other hurdle to make this D9 ready.

Comments

jay_pandya created an issue. See original summary.

jay_pandya’s picture

Status: Active » Needs review
StatusFileSize
new454 bytes

Here, is the patch.

ankitsingh0188’s picture

Assigned: Unassigned » ankitsingh0188
Status: Needs review » Needs work
StatusFileSize
new725.43 KB

Patch applied successfully. But still, some errors are there to make this module compatible with Drupal version 9.

I am working on the errors.

ankitsingh0188’s picture

Assigned: ankitsingh0188 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.8 KB
new2.35 KB
new54.5 KB

Updated the patch and make the module compatible with drupal version 9

atul4drupal’s picture

Issue summary: View changes
Issue tags: +For compatibility with D9

Issue summary updated to broaden the scope.

spiffl’s picture

StatusFileSize
new2.8 KB

Patch 3150208-4.patch fails on import with

Error: Cannot call abstract method Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() in /home/vagrant/src/docroot/modules/migrate_file/src/Plugin/migrate/process/FileImport.php on line 192 #0 /home/vagrant/src/docroot/modules/migrate_file/src/Plugin/migrate/process/ImageImport.php(102): Drupal\migrate_file\Plugin\migrate\process\FileImport->transform()

changing the getScheme() call to use the streamWrapperManager fixes it:

     // Build the destination file uri (in case only a directory was provided).
     $destination = $this->getDestinationFilePath($source, $destination);
-    if (!StreamWrapperManagerInterface::getScheme($destination)) {
+    if (!$this->streamWrapperManager->getScheme($destination)) {
       if (empty($destination)) {
         $destination = \Drupal::config('system.file')->get('default_scheme') . '://' . preg_replace('/^\//' ,'', $destination);
       }
byrond’s picture

Status: Needs review » Reviewed & tested by the community

I used this patch on a migration in a D9 site, and it worked successfully without any errors.

ggh’s picture

When can we expect a stable release for this module ported for Drupal 9,Can we have some timelines

yonailo’s picture

bob.hinrichs’s picture

Timeline on a d9 compatible version available for composer install?

pookmish’s picture

I too would like to see if we can get a timeline on this.

albeorte’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new4.12 KB

The #4 patch works fine but has unnecessaries qualifiers that I have removed and pass the coding standard.

drclaw’s picture

Status: Needs review » Fixed

Thanks everyone for the efforts! Apologies for being MIA for so long on this issue. I've applied the patch from #3148126: Automated Drupal 9 compatibility fixes which as far as I could tell is identical to the one in this issue. If there is something that was missed feel free to open a new issue, otherwise I'm marking this one as fixed.

Cheers!! 🙌

Status: Fixed » Closed (fixed)

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