Gaufrette
Gaufrette copied to clipboard
$file->getContent() return a StreamInterface instead of a String with GoogleCloudStorage adapter
Hi,
I use Gaufrette with GoogleCloudStorage adapter in production and local filesystem in development and I observe differences on the returned type of getContent() method of File object.
getContent calls Filesystem->read() which calls adaptater read() method.
Returned type of File->getContent() should be a string. But, with GoogleCloudStorage adapter, the read() method return a StreamInterface ($response->getBody()) when Google_Http_Request does not exist (view here).
I suppose this line should be fixed with $response->getBody()->getContents()
Thx in advance.
Hi,
Please consider this issue. I can provide some clarification if you have any questions.
Thx.
Hello.
Thanks for trying to report an issue.
I never used the GoogleCloudStorage adapter. May the issue you encounter be related to a new version of guzzle or the google library?
In any case, PR are welcome to provide any fix. Please also consider using your own adapter instead of the one provided in this library that may be a little outdated.
Hi @laurentdabbb. Is this issue is still relevant ?
As Nek mentioned, a pr is welcome to fix it.