Problem/Motivation
This issue was raised during conversation on MR https://git.drupalcode.org/project/drupal/-/merge_requests/9818#note_127...
Issue: https://www.drupal.org/project/drupal/issues/3480051
Currently following stream wrappers returns value from stream_close() method.
core/lib/Drupal/Core/StreamWrapper/LocalStream.php:230: public function stream_close() {
core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php:98: public function stream_close() {
Based on documentation on php.net https://www.php.net/manual/en/class.streamwrapper.php stream_close() doesn't return anything.
I believe we should conform to the php's stream wrapper class and make appropriate changes to core's implementation.
Steps to reproduce
Find the pattern and usage of the method.
grep -Rn "stream_close()" core --include="*.php"
Proposed resolution
Update method so it doesn't return anything
Remaining tasks
Update the code so that method doesn't return anything.
Validate if it's return values are used anywhere in core.
Confirm if there are any contrib modules implementing this and relying on this one.
User interface changes
N/A
Introduced terminology
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Comments
Comment #2
mohit_aghera commented