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
Support latest PSR-15 #12
Conversation
src/Handler.php
Outdated
@@ -40,7 +40,7 @@ public function __construct(array $middleware, callable $default) | |||
* | |||
* @return ResponseInterface | |||
*/ |
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.
Docblock can be removed now that return type is specified.
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.
The whole docblock or just the @return
part?
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.
The whole thing.
src/MiddlewareCollection.php
Outdated
@@ -76,7 +76,7 @@ public function dispatch(ServerRequestInterface $request, callable $default) | |||
/** | |||
* @inheritdoc | |||
*/ |
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.
Same here.
composer.json
Outdated
@@ -11,7 +11,7 @@ | |||
], | |||
"require": { | |||
"php": ">=5.6", | |||
"http-interop/http-middleware": "^0.5" | |||
"http-interop/http-server-middleware": "^1.0" | |||
}, | |||
"require-dev": { | |||
"phpunit/phpunit": "^4.8|^5.0", |
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.
PHP 4.x can no longer be used with PHP 7. This should be changed to ^5.7|^6.0
.
composer.json
Outdated
@@ -11,7 +11,7 @@ | |||
], | |||
"require": { | |||
"php": ">=5.6", |
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.
This needs to be >=7.0
Supporting PHPUnit 6.x requires more fiddling than just changing all instances of PHPUnit_Framework_TestCase to TestCase and probably needs a separate PR.
composer.json
Outdated
@@ -14,7 +14,7 @@ | |||
"http-interop/http-server-middleware": "^1.0" | |||
}, | |||
"require-dev": { | |||
"phpunit/phpunit": "^5.7|^6.0", | |||
"phpunit/phpunit": "^5.7", |
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.
Why not allow 6.x
?
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.
I mentioned it in the commit message, but the tests are broken with PHPUnit 6.x. This is usually fixed by simply changing all instances of PHPUnit_Framework_TestCase
to TestCase
. However in this case fixing the problem seems to require more fiddling and is probably better suited for separate PR.
Can we get this merged and released? I'm waiting on it. |
Released in v1.0.0. |
This PR adds support for
http-interop/http-server-middleware: ^1.0
. Also removes Travis tests for PHP 5.6 and HHVM which are not supported by the PSR anymore.