nao-pon / flysystem-google-drive

Flysystem adapter for Google Drive
MIT License
352 stars 128 forks source link

Added formal delcaration for dynamic property: "root" #123

Open Bilge opened 1 year ago

Bilge commented 1 year ago

The root property has always existed in GoogleDriveAdapter, but it was declared dynamically at run-time, instead of formally at compile time. This causes errors in newer versions of PHP, such as the following.

PHP Deprecated: Creation of dynamic property Hypweb\Flysystem\GoogleDrive\GoogleDriveAdapter::$root is deprecated in nao-pon\flysystem-google-drive\src\GoogleDriveAdapter.php on line 164

It is highly unlikely we would want this property to be public if it had been designed correctly from the beginning, but for backwards compatibility, this is the only correct visibility modifier.

Bilge commented 7 months ago

@nao-pon Please merge and tag this.

sugeng-sulistiyawan commented 1 month ago

Merged: https://github.com/sugeng-sulistiyawan/flysystem-google-drive