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

Fix/header and method signature #13

Merged
merged 4 commits into from
May 9, 2024

Conversation

vitormattos
Copy link
Contributor

The header function of PHP have only an argument to define the header
name and value. This argument need to be a string.

More info: https://www.php.net/header

Signed-off-by: Vitor Mattos <vitor@php.rio>
Removed to test go more fast. Is very strange to have a sleep here and
removing the tests worked fine.

Signed-off-by: Vitor Mattos <vitor@php.rio>
The method getBody can't return null. The return of this method need to
be a instance of StreamInterface. To fix this I create a instance of a
class that extends StreamInterface.

Reference: https://github.com/php-fig/http-message/blob/1.0/src/MessageInterface.php#L169-L171

Signed-off-by: Vitor Mattos <vitor@php.rio>
@vitormattos vitormattos force-pushed the fix/header-and-method-signature branch from da48cfd to 96f2c1f Compare May 8, 2024 16:05
@byjg byjg self-requested a review May 9, 2024 02:52
@byjg byjg merged commit 6ae5627 into byjg:master May 9, 2024
@byjg
Copy link
Owner

byjg commented May 9, 2024

Thank you @vitormattos . I merged the PR with one change.

The sleep command in the multirequest.php is necessary because I wanted to run 3 requests in parallel. I did a small change in the unit test, so it become more visible.

Other than that, welcome for your PR.

@vitormattos vitormattos mentioned this pull request May 9, 2024
1 task
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

Successfully merging this pull request may close these issues.

2 participants