Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

PSR-15 support (http-interop/http-server-middleware) #39

Closed
wants to merge 12 commits into from
Closed

PSR-15 support (http-interop/http-server-middleware) #39

wants to merge 12 commits into from

Conversation

michalbundyra
Copy link
Member

@michalbundyra michalbundyra commented Nov 20, 2017

  • dropped PHP 5.6 and 7.0
  • updated Travis CI config

Requires:

Added new tool: migrate:interop-middleware which will look for old http-interop/http-middleware style middlewares and delegators and update them to http-interop/http-server-middleware:

  • updates namespaces and names of interfaces:
    • Interop\Http\ServerMiddleware\MiddlewareInterface -> Interop\Http\Server\MiddlewareInterface
    • Interop\Http\ServerMiddleware\DelegateInterface -> Interop\Http\Server\RequestHandlerInterface
  • changes name method in delegators/handlers: process -> handle,
  • changes process calls on delegator to handle (in middlewares),
  • adds return type on methods process (in middleware) and handle (in request handler): \Psr\Http\Message\ResponseInterface.

Fixed migrate:original-messages tests - asserting expected files contents with output from converter

- dropped PHP 5.6 and 7.0
- updated Travis CI config
The tool updates interop middlewares and delegators to be
compatible with http-interop/http-server-middleware
It updates namespaces and name of interfaces (keeps aliases),
change method name from "delegate" to "handle" on handlers
and adds return type on methods "process" and "handle".
Compare output from the converter with expected files contents
- zend-stratiglity ^3.0.0-dev
- zend-expressive-router ^3.0.0-dev
- phpunit <6.5 because 6.5+ it's not working with php-mock
weierophinney added a commit that referenced this pull request Dec 11, 2017
weierophinney added a commit that referenced this pull request Dec 11, 2017
@weierophinney
Copy link
Member

Thanks, @webimpress!

@weierophinney
Copy link
Member

Rebased and pushed against release-1.0.0 branch.

@michalbundyra michalbundyra deleted the feature/psr-15 branch December 11, 2017 23:08
weierophinney added a commit that referenced this pull request Dec 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants