Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

putContainerArchive() (and PutContainerArchive) should not have string type hint for inputStream #336

Open
mattzuba opened this issue Oct 16, 2018 · 1 comment

Comments

@mattzuba
Copy link

All of the http client message factories that create requests turn bodies into Psr StreamInterface objects if they aren't one already. The string type hint on the this API call forces the dev to read the entire (potentially large) archive into memory as a string before calling the putContainerArchive() method, only for the message factories to turn it into a stream anyway. In 1.24, a string, file resource or StreamInterface object could be passed instead of a string.

@dontub
Copy link

dontub commented Jun 28, 2019

With the change in moby/moby#39248 applied to the spec file when generating the PHP code, the result is as expected.

@joelwurtz Is there any chance that this change is backported to docker-php-api? It looks like you currently have no time to maintain docker-php-api... maybe it would make sense to have one (or even more) additional maintainer. WDYT?

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

No branches or pull requests

2 participants