Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$file->getContent() return a StreamInterface instead of a String with GoogleCloudStorage adapter #652

Open
laurentdabbb opened this issue Jan 17, 2022 · 3 comments
Assignees

Comments

@laurentdabbb
Copy link

laurentdabbb commented Jan 17, 2022

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.

@laurentdabbb
Copy link
Author

Hi,

Please consider this issue.
I can provide some clarification if you have any questions.

Thx.

@Nek-
Copy link
Contributor

Nek- commented May 9, 2022

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.

@KevinArtus
Copy link
Contributor

Hi @laurentdabbb.
Is this issue is still relevant ?

As Nek mentioned, a pr is welcome to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants