flysystem-stream-wrapper
flysystem-stream-wrapper copied to clipboard
Incompatible with PHP 8.2
Hi,
I work with Drupal, and in my current project I'm updating the PHP version to PHP 8.2.9
After the updated, I'm receiving the next warning
Deprecated: Creation of dynamic property Drupal\flysystem\FlysystemBridge::$context is deprecated
I am checking and flysystem class extends from https://github.com/twistor/flysystem-stream-wrapper/blob/master/src/FlysystemStreamWrapper.php
And in the latter it does not have that property declared. I think it's a good solution to declare it in this class, since many extend from it. Currently I have added a patch in my project about twistor/flysystem-stream-wrapper and I have fixed the warning. But I don't know how to add that patch here in the github project to create a Pull request.
The only thing I have added is:
/** * Context value. */ public $context = null;
I know it might be another idea to add it directly to the flysystem module, but I'm going here to see if you have any idea what's best.
Greetings,
I've thrown together #28, that I think should address this.