web/core/modules/file/src/Plugin/rest/resource/FileUploadResource.php is using Drupal\Core\File\FileSystem class instead of Drupal\Core\File\FileSystemInterface for type hinting in the constructor.
I think that this is a problem when someone wants to use custom FileSystem class instead of default one.
It's fine if we use FileSystemInterface instead of FileSystem.

CommentFileSizeAuthor
#2 2973545-1.patch2.5 KBsaesa

Comments

saesa created an issue. See original summary.

saesa’s picture

StatusFileSize
new2.5 KB

Replaced type hinting from FileSystem to FileSystemInterface.

saesa’s picture

Status: Active » Needs review
borisson_’s picture

I'm not sure why the patch is failing on 7.1 but not on 7. The patch looks good though.

saesa’s picture

I have tried version 7.0 in my local and it works, then I tried version 7.1 in my local and gave this error: PHPunit Test failed to complete; Error: PHPUnit testing framework version 6 or greater is required when running on PHP 7.0 or greater.

I run the command composer run-script drupal-phpunit-upgrade in order to fix this.

saesa’s picture

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Assigned: saesa » Unassigned
Status: Needs review » Closed (duplicate)
Issue tags: +Bug Smash Initiative
Related issues: +#2973509: Image media source uses FileSystem class instead of FileSystemInterface for type hinting

Looks like this was fixed in Drupal 8.6.x in #2973509: Image media source uses FileSystem class instead of FileSystemInterface for type hinting. That issue was opened on 17 May 2018 just a few hours before this one. That a good reminder to always looks for duplicate issues.