From fde9a564a7b0d34b38309aa3d4c4c45e76ad92c1 Mon Sep 17 00:00:00 2001 From: oscarotero Date: Sat, 11 Nov 2017 19:28:41 +0100 Subject: [PATCH] Switch to http-server-middleware --- .travis.yml | 1 - CHANGELOG.md | 10 ++++++++++ README.md | 2 +- composer.json | 10 +++++----- src/Uuid.php | 14 +++----------- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d2478b..d180b65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php sudo: false php: - - 5.6 - 7.0 - 7.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dad1d6..50a288e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## UNRELEASED + +### Removed + +* Removed support for PHP 5.x. + +### Changed + +* Replaced `http-interop/http-middleware` with `http-interop/http-server-middleware`. + ## [0.5.0] - 2017-09-21 ### Changed diff --git a/README.md b/README.md index e771379..05dc99d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The UUID generated is compatible with [RFC 4122](http://tools.ietf.org/html/rfc4 ## Requirements -* PHP >= 5.6 +* PHP >= 7.0 * A [PSR-7](https://packagist.org/providers/psr/http-message-implementation) http mesage implementation ([Diactoros](https://github.com/zendframework/zend-diactoros), [Guzzle](https://github.com/guzzle/psr7), [Slim](https://github.com/slimphp/Slim), etc...) * A [PSR-15 middleware dispatcher](https://github.com/middlewares/awesome-psr15-middlewares#dispatcher) diff --git a/composer.json b/composer.json index d3948e0..ea29498 100644 --- a/composer.json +++ b/composer.json @@ -15,16 +15,16 @@ "issues": "https://github.com/middlewares/uuid/issues" }, "require": { - "php": "^5.6 || ^7.0", - "http-interop/http-middleware": "^0.5", - "ramsey/uuid": "^3.5" + "php": "^7.0", + "ramsey/uuid": "^3.5", + "http-interop/http-server-middleware": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^5.5 || ^6.0", + "phpunit/phpunit": "^6.0", "zendframework/zend-diactoros": "^1.3", "friendsofphp/php-cs-fixer": "^2.0", "squizlabs/php_codesniffer": "^3.0", - "middlewares/utils": "~0.12" + "middlewares/utils": "~0.13" }, "autoload": { "psr-4": { diff --git a/src/Uuid.php b/src/Uuid.php index afa895e..abd542d 100644 --- a/src/Uuid.php +++ b/src/Uuid.php @@ -1,4 +1,5 @@ header = $header; @@ -28,13 +25,8 @@ public function header($header) /** * Process a request and return a response. - * - * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler - * - * @return ResponseInterface */ - public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) + public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $uuid = (string) UuidFactory::uuid4();