Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298558

Move file uri/scheme functions from file.inc and FileSystem to StreamWrapperManager

$
0
0

Problem/Motivation

See #2229865: [meta] Modernize File/StreamWrapper API, we need to move those remaining functions out of file.inc. StreamWrapperManager might be a good place for them, as it is already injected into FileSystem and closely related to that stuff.

See #126 there for example:

Hm, on closer investigation, I don't think any of these additional methods belong into this new service.

* file_uri_target() is the counter-part to file_uri_scheme(), which is already on file_system
* file_stream_wrapper_uri_normalize() is also very related to these, they're all about (stream wrapper) URI's, not file URLs.
* file_valid_uri() is again about stream wrapper URI's and as a small wrapper around two functions/methods that were already moved to file_system.
* file_build_uri() also is about creating stream wrapper URIs and is tightly connected to these other functions.

FileSystem is getting quite big with that other issue, so maybe these methods could be on the stream wrapper manager, but then we'd also need to move some existing methods from FileSystem to that to avoid a cross-dependency.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298558


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>