Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
ReadOnlyStream
and LocalReadOnlyStream
share almost the same code. Also PhpStreamWrapperInterface
misses a lot of documentation that is present now in the 2 abstract classes.
Proposed resolution
- Create a
ReadOnlyStreamTrait
trait to deal with the code duplication. - Fix corresponding documentation in
PhpStreamWrapperInterface
.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2700509-3.patch | 22.33 KB | claudiu.cristea |
Comments
Comment #2
claudiu.cristeaComment #3
claudiu.cristeaPatch.
Comment #4
fietserwinThis is a duplicate of #2236163: Remove class ReadOnlyStream (or turn into a trait?).
Since the code that would be moved to the trait assumes there is a local file handle, it will only work for local read-only streams. So I see no use in placing it in a trait. let's just remove the ReadOnlyStream class to remove the duplication.
Comment #5
claudiu.cristeaI was thinking of that but you cannot because is a BC