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

Support latest PSR-15 #12

Merged
merged 5 commits into from Nov 29, 2017
Merged

Support latest PSR-15 #12

merged 5 commits into from Nov 29, 2017

Conversation

tuupola
Copy link
Contributor

@tuupola tuupola commented Nov 27, 2017

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.

src/Handler.php Outdated
@@ -40,7 +40,7 @@ public function __construct(array $middleware, callable $default)
*
* @return ResponseInterface
*/
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole thing.

@@ -76,7 +76,7 @@ public function dispatch(ServerRequestInterface $request, callable $default)
/**
* @inheritdoc
*/
Copy link
Contributor

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",
Copy link
Contributor

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",
Copy link
Contributor

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",
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@SmoshySmosh
Copy link

Can we get this merged and released? I'm waiting on it.

@shadowhand shadowhand merged commit 72a7f84 into equip:master Nov 29, 2017
@shadowhand
Copy link
Contributor

Released in v1.0.0.

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.

None yet

3 participants