-
-
Notifications
You must be signed in to change notification settings - Fork 157
fixStreamGetContentsArgumentError #250
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
Conversation
shaperman
commented
Aug 15, 2025
| Q | A |
|---|---|
| Is bugfix? | ✔️ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
| Fixed issues |
…st be of type resource, bool given
…st be of type resource, bool given
fix: support for PHP 5
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
|
That solves the issue but, I think, we have more places like that. I don't particularly like how it was solved in Yii2 in the first place. For Yii3, we did it like the following: https://github.com/yiisoft/files/blob/master/src/FileHelper.php#L71 |
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
We should then adapt the best solution, and identify where to apply it to do so. |
|
Current implementation is missing closing of the steam in catch block as well. |
|
@terabytesoftw would you please check why tests fail in master? |
1) yiiunit\extensions\httpclient\StreamTransportTest::testSendError
Undefined variable: stream
/home/runner/work/yii2-httpclient/yii2-httpclient/src/StreamTransport.php:71
/home/runner/work/yii2-httpclient/yii2-httpclient/src/Client.php:233
/home/runner/work/yii2-httpclient/yii2-httpclient/src/Request.php:451
/home/runner/work/yii2-httpclient/yii2-httpclient/tests/TransportTestCase.php:141
phpvfscomposer:///home/runner/work/yii2-httpclient/yii2-httpclient/vendor/phpunit/phpunit/phpunit:51
/home/runner/work/yii2-httpclient/yii2-httpclient/vendor/bin/phpunit:118
2) yiiunit\extensions\httpclient\StreamTransportTest::testInvalidUrl
Undefined variable: stream
/home/runner/work/yii2-httpclient/yii2-httpclient/src/StreamTransport.php:71
/home/runner/work/yii2-httpclient/yii2-httpclient/src/Client.php:233
/home/runner/work/yii2-httpclient/yii2-httpclient/src/Request.php:451
/home/runner/work/yii2-httpclient/yii2-httpclient/tests/TransportTestCase.php:254
phpvfscomposer:///home/runner/work/yii2-httpclient/yii2-httpclient/vendor/phpunit/phpunit/phpunit:51
/home/runner/work/yii2-httpclient/yii2-httpclient/vendor/bin/phpunit:118 |
|
Thank you! |