-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Added support for numeric header names #149
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.
Thank you for opening this PR and getting the ball rolling! I have left some comments.
The change requests for the extra trailing commas in the tests are a bit unnecessary maybe. We do not by default run php-cs-fixer on tests. But I see no reason not to try and stay consistent.
Thank you. If this library (or the PSR specification) was PHP 7.2+. It would have a type hint for I dont think it is a good idea to convert an integer to a string. I think it is the callee (nyholm/psr7-server in this case) that should make sure it si giving a string to the |
Hm.. I see. So if we do EDIT: It is true for all ints https://3v4l.org/b3DRV |
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.
Im happy with this PR.
Sorry for my comment before. I had to read the full linked issue.
Please just add a comment.
Squashed. |
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.
Test passes and I couldn’t think of any more methods to test with it. So LGTM! 🚀
Hey guys Can we merge this in and update the dev-dependencies of https://github.com/Nyholm/psr7-server/pull/36/files? The tests over there require this component to be updated as psr7-server uses it for tests which fail on that PR because of this. |
Yes, This should be merged. Thank you |
I just added another test of |
Hey guys Can we get this released so we can complete Nyholm/psr7-server#36? I cannot fix the errors I get in my API without this, unless I switch to a different PSR7 implementation which I would like to avoid having to toy with at the moment. |
Hello
As discussed at Nyholm/psr7-server#35, here are some changes that seem to solve the problem.
This may be a premature PR, but it was the easiest way for me to demonstrate a cohesive solution with tests that works. @Zegnat did most of this, I just put it together.