-
Notifications
You must be signed in to change notification settings - Fork 5
Fix: PHP 7.4 cli logs in stderr output #10
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks exactly too what I planned to change in my PR. (And therefor good for me)
I would just change the public static method like mentioned in the comments.
For that, I had to rewrite the test too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me its perfect now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a great job!
It's great news that this is fixed!
It seems very good, I only have some suggestions that are not of great importance.
Congratulations
I'm writing this PR to present a small patch to handle a new behavior of the PHP 7.4 CLI: it is attaching log messages of the built-in PHP server (
php -S
) to thestderr
pipe.Moreover, I opened an issue to discuss this problem with the guys from
internations/http-mock
(InterNations#53). At a first glance I thought it wasn't a problem of http mock itself but since this behavior was introduced only in PHP 7.4, they found feasible the idea of adding a patch to get the library working with the new version of PHP.Since there isn't a builtin CLI option to change this behavior, I'm presenting the same solution here.
Let me know what you think of this approach to tackle this issue.
If you have a better solution in mind, I'll be glad to hear and discuss more about it! 😃