Comments

ashutosh.mishra created an issue. See original summary.

ashutosh.mishra’s picture

=======================================================
web/modules/contrib/file_update/file_update.info.yml
===========================
Add core_version_requirement: ^8 || ^9 to file_update.info.yml to designate that the module is compatible with Drupal 9. See https://drupal.org/node/3070687.

======================================================
web/modules/contrib/file_update/composer.json
==============================
The drupal/core requirement is not Drupal 9 compatible. Either remove it or update it to be compatible with Drupal 9. See https://drupal.org/node/2514612#s-drupal-9-compatibility.

ashutosh.mishra’s picture

Status: Needs work » Needs review
StatusFileSize
new666 bytes
yonas.legesse’s picture

Status: Needs review » Needs work

I have applied the Patch and checked with upgrade status. The issue mentioned has been solved but there is a deprecated method which needs to be fixed as well.

drupal-check -d file_update
11/11 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------- 
  Line   src/FileUpdateService.php                                              
 ------ ----------------------------------------------------------------------- 
  586    Call to deprecated method validScheme() of class                       
         Drupal\Core\File\FileSystem:                                           
         in drupal:8.0.0 and is removed from drupal:9.0.0. Use                  
         Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidSchem  
         e()                                                                    
         instead.                                                               
 ------ ----------------------------------------------------------------------- 

 [ERROR] Found 1 error
yonas.legesse’s picture

Status: Needs work » Needs review
StatusFileSize
new1.07 KB
new429 bytes

Applied the patch in #3 and added new alteration to avoid deprecation error.

11/11 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%


 [OK] No errors 
jfeltkamp’s picture

Status: Needs review » Fixed

Thank you @yonas.legesse, but I could not apply patch, because obviously StreamWrapperManagerInterface is an interface.
But I also can't call the method staticly.

At the end code looks like this:

  public function isValidUri($uri) {
    /** @var StreamWrapperManagerInterface $stream_wrapper_manager */
    $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
    return $stream_wrapper_manager->isValidScheme($uri);
  }

Status: Fixed » Closed (fixed)

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