Repository navigation
Version 3.0.0 contains all changes of v2.6.0. The requirements are the same: PHP 8.1 or later, Flysystem 3, Guzzle 7.15.2+ or 8.0.1+.
Changes that can break existing code
delete()follows the Flysystem contract:- A path that does not exist is a success. Before, the adapter without display paths threw
UnableToDeleteFile. - An error from Google Drive throws
UnableToDeleteFile. Before, the adapter with display paths reported success.
- A path that does not exist is a success. Before, the adapter without display paths threw
move()throwsUnableToMoveFilewhen Google Drive does not return the moved file. Before, the method returned without an error.- Public methods have native parameter and return types. A subclass that overrides one of these methods must declare a compatible signature:
__construct(),getService(),clearCache(),refreshToken(),getMetadata(),getUrl(),hasDir(),getFileObject(),uncacheFolder(),emptyTrash(),enableTeamDriveSupport(),setTeamDriveId(),dirname(),normalizeDirname(),guessMimeType(),escapeQueryValue()and the protectednormaliseObject(). StreamableUpload:setFileSize(),getProgress(),getResumeUri(),setChunkSize()andgetRequest()have return types.- The global constant
DEBUG_MEand the debug output are removed.
Fixes
getUrl()returns an empty string when the file does not exist. Before, it caused a fatal error.- A file without a modification time gets
lastModified=null. Before, it caused aTypeError. visibility()keeps the original error as the cause ofUnableToRetrieveMetadata.
Development
- GitHub Actions run the unit tests on PHP 8.1 to 8.5 with the lowest and the newest dependencies,
composer audit, and PHPStan (level 5). The Travis CI, Scrutinizer and StyleCI configurations are removed. - New
Unittest suite that needs no Google credentials. - The
Integrationsuite runs against a real Google Drive account. Each test class works in its own folder and deletes it after the last test. - New integration tests: upload of a 150 MB file (resumable upload),
readStream()of a Google Docs file, shortcuts, and the complete Flysystem suite with the optionuseSinglePathTransaction. To skip the large upload:phpunit --exclude-group slow.
Parts of this release are based on #142 by tarikmanoar.
Full Changelog: v2.6.0...v3.0.0