Hi,
I was previously using flysystem 1.1.10, barryvdh/elfinder-flysystem-driver v0.3.0 and spatie/flysystem-dropbox 1.2.3, and all was well.
Upgraded to bookworm, PHP8.2, flysystem 3.15.1, elfinder-flysystem-driver v0.4.3 and spatie/flysystem-dropbox 3.0.0, and every operation leads to a PHP Fatal error, because the driver gets confused when checking fileExists() for a directory and getting a true value, considering the directory is a file.
That and the fact that PHP8 now triggers a fatal error for wrong return types when the driver tries to get the mime type of a directory.
I think that the check for fileExists() and directoryExists() should return true only if the element is of the desired type, not only if it exists.
PHP Fatal error: Uncaught TypeError: League\Flysystem\Filesystem::mimeType(): Return value must be of type string, null returned in /var/www/sw3/000_common/common/vendor/league/flysystem/src/Filesystem.php:150
Stack trace:
#0 /var/www/sw3/000_common/common/vendor/barryvdh/elfinder-flysystem-driver/src/Driver.php(254): League\Flysystem\Filesystem->mimeType()
Hi, I was previously using flysystem 1.1.10, barryvdh/elfinder-flysystem-driver v0.3.0 and spatie/flysystem-dropbox 1.2.3, and all was well. Upgraded to bookworm, PHP8.2, flysystem 3.15.1, elfinder-flysystem-driver v0.4.3 and spatie/flysystem-dropbox 3.0.0, and every operation leads to a PHP Fatal error, because the driver gets confused when checking fileExists() for a directory and getting a true value, considering the directory is a file. That and the fact that PHP8 now triggers a fatal error for wrong return types when the driver tries to get the mime type of a directory. I think that the check for fileExists() and directoryExists() should return true only if the element is of the desired type, not only if it exists.