Closed tuupola closed 8 years ago
Build fails on PHP 5.4 because Slim requires PHP >=5.5.0.
@tuupola thank you for the PR. Can you try adding https://github.com/akeneo/PhpSpecSkipExampleExtension and skip the tests on PHP 5.4?
That might not be enough since also composer install
fails. I see what I can do with the Travis build matrix.
@php-http/owners how about dropping PHP 5.4 support of this package too?
Dropping 5.4 is a no-brainer in my opinion. My general approach is that you should keep old PHP versions if there is no reson for bumping then. I believe @tuupola has an excellent reson here.
We had a discussion on twitter about supporting 5.4 because legacy project would not be able to update to HTTPlug without dropping support for 5.4. (Because of php-http/discovery).
As this library is only a dependency during development I would not use it as an argument to bump the minimum version requirements. Instead I would remove the dev requirement and install the package on Travis CI only for PHP >= 5.5 jobs and skip the example otherwise as @sagikazarmark suggested.
@xabbuh the problem is that this way development is much harder. I would do the other way around: remove the library in CI on PHP 5.4. That way you can't develop it if you have 5.4, but the lib remains compatible with it.
Sure, Im fine with that.
@sagikazarmark Sounds good too.
I already have it the way @xabbuh explained. However comment by @sagikazarmark makes sense. I will do it over and commit soonish.
Seems there is problem with streams with hhvm. Will install hhvm locally to figure it out.
I would also like to add something to message factory tests. Namely I would like to test that factories set the message headers and body correctly. Should this be a separate PR?
Great job. Thank you!
@Nyholm there were some TODOs which indeed would have been nice to have here.
Sorry, I must have missed that. I saw that you approved it so I made a final review myself.
What were the TODOs?
See the TODO section: puli.json, possibly rename to Slim3
Sorry for not bringing those up to discussion before merging.
Yes, some entries should be added to Puli.json. The other two are fine IMHO
I am not familiar with Puli. How should I add the entries to puli.json? I quickly read through puli docs but did not become any smarter.
What's in this PR?
This PR adds message, stream and URI factories for Slim Framework
Why?
Slim is reasonably popular PSR-7 based framework.
Example Usage
Checklist
To Do
Slim3StreamFactory
andSlim3StreamFactory
instead?