Problem/Motivation
core/modules/media/src/Plugin/media/Source/Image.php is using Drupal\Core\File\FileSystem class instead of Drupal\Core\File\FileSystemInterface for type hinting in its constructor.
This causes problem when someone wants to use custom FileSystem class instead of default one.
It works fine if we use FileSystemInterface instead of FileSystem.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 2973509-d85.patch | 2.47 KB | dave reid |
| #5 | 2973509-5.interdiff.txt | 3.23 KB | claudiu.cristea |
| #5 | 2973509-5.patch | 5.24 KB | claudiu.cristea |
| #2 | 2973509-1.patch | 2.01 KB | tahirmus |
Comments
Comment #2
tahirmus commentedReplaced type hinting from
FileSystemtoFileSystemInterfaceComment #3
chr.fritschThis looks good to me, but I am not 100% sure if this is BC breaking. But I don't think so.
Comment #4
alexpottThis looks good but in order to swap out the FileSystem we need to make sure this is the case everywhere - so we need to fix
\Drupal\file\Plugin\rest\resource\FileUploadResourcetoo otherwise the aims of this issue can't be achieved. That and the one already fixed here are the only two incorrect typehints onFileSysteminstead ofFileSystemInterfaceI can find in core.Comment #5
claudiu.cristeaAnd another one in a test but only in docs.
Comment #7
claudiu.cristeaComment #8
claudiu.cristeaComment #9
chr.fritschNice, back to RTBC
Comment #10
catchCommitted 44986fe and pushed to 8.6.x. Thanks!
Comment #13
dave reidAny reason this shouldn't be backported to 8.5.x? This is a bug for anyone using the Flysystem module and core media.
Comment #14
alexpott@Dave Reid - yep there is a reason. 8.5.x is officially closed to bug fixes and only gets security support. Also closed issues are only supposed to be re-opened by maintainers.
Comment #15
dave reidMy apologies for asking and for re-opening the ticket. I'm still a bit confused about the timeline because at the time when this was fixed in 8.6.x, 8.6.0 hadn't been released yet, so 8.5.x was the currently supported branch. I've had two different clients run into this one in the past two months. Seems not much can be done now?
Comment #16
dave reidHere is a patch rolled against 8.5.x if anyone needs it.