From 5f16d7234ad545d75f771910c2cbf6e5ba6d52fd Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 22 Jan 2018 22:40:28 +0000 Subject: [PATCH] Updated to final PSR-15 --- composer.json | 14 +- composer.lock | 288 +++++++++++++-------------------------- src/Route.php | 4 +- src/RouteResult.php | 4 +- test/RouteResultTest.php | 2 +- test/RouteTest.php | 2 +- 6 files changed, 104 insertions(+), 210 deletions(-) diff --git a/composer.json b/composer.json index 28ac394..e6502df 100644 --- a/composer.json +++ b/composer.json @@ -22,18 +22,18 @@ "require": { "php": "^7.1", "fig/http-message-util": "^1.1.2", - "http-interop/http-server-middleware": "^1.0.1", - "psr/http-message": "^1.0.1" + "psr/http-message": "^1.0.1", + "psr/http-server-middleware": "^1.0" }, "require-dev": { - "malukenho/docheader": "^0.1.5", - "phpunit/phpunit": "^6.4.4", + "malukenho/docheader": "^0.1.6", + "phpunit/phpunit": "^6.5.5", "zendframework/zend-coding-standard": "~1.0.0" }, "suggest": { - "zendframework/zend-expressive-aurarouter": "^1.0 to use the Aura.Router routing adapter", - "zendframework/zend-expressive-fastroute": "^1.2 to use the FastRoute routing adapter", - "zendframework/zend-expressive-zendrouter": "^1.2 to use the zend-router routing adapter" + "zendframework/zend-expressive-aurarouter": "^3.0 to use the Aura.Router routing adapter", + "zendframework/zend-expressive-fastroute": "^3.0 to use the FastRoute routing adapter", + "zendframework/zend-expressive-zendrouter": "^3.0 to use the zend-router routing adapter" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index fb349eb..fcb4630 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "f11c26f18601a8e8dae7ebee9faf8f4a", + "content-hash": "4500c4880acf647c57425dfe6d5cea03", "packages": [ { "name": "fig/http-message-util", @@ -57,22 +57,21 @@ "time": "2017-02-09T16:10:21+00:00" }, { - "name": "http-interop/http-server-handler", - "version": "1.0.0", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/http-interop/http-server-handler.git", - "reference": "931a6495fb1b6005c9b4abc4dd11fb12a2a8103b" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/http-interop/http-server-handler/zipball/931a6495fb1b6005c9b4abc4dd11fb12a2a8103b", - "reference": "931a6495fb1b6005c9b4abc4dd11fb12a2a8103b", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": ">=7.0", - "psr/http-message": "^1.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -82,7 +81,7 @@ }, "autoload": { "psr-4": { - "Interop\\Http\\Server\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -95,41 +94,36 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP server-side request handler", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "handler", "http", + "http-message", "psr", - "psr-15", "psr-7", "request", - "response", - "server" + "response" ], - "time": "2017-11-09T18:35:22+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { - "name": "http-interop/http-server-middleware", - "version": "1.0.1", + "name": "psr/http-server-handler", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/http-interop/http-server-middleware.git", - "reference": "e605a7f47a002e857a3b9bb992010e2f859e4560" + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "439d92054dc06097f2406ec074a2627839955a02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/http-interop/http-server-middleware/zipball/e605a7f47a002e857a3b9bb992010e2f859e4560", - "reference": "e605a7f47a002e857a3b9bb992010e2f859e4560", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/439d92054dc06097f2406ec074a2627839955a02", + "reference": "439d92054dc06097f2406ec074a2627839955a02", "shasum": "" }, "require": { - "http-interop/http-server-handler": "^1.0", "php": ">=7.0", "psr/http-message": "^1.0" }, - "replace": { - "http-interop/http-middleware": ">=0.5" - }, "type": "library", "extra": { "branch-alias": { @@ -138,7 +132,7 @@ }, "autoload": { "psr-4": { - "Interop\\Http\\Server\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -151,34 +145,38 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP server-side middleware", + "description": "Common interface for HTTP server-side request handler", "keywords": [ + "handler", "http", - "middleware", + "http-interop", "psr", "psr-15", "psr-7", "request", - "response" + "response", + "server" ], - "time": "2017-11-09T21:42:30+00:00" + "time": "2018-01-22T17:04:15+00:00" }, { - "name": "psr/http-message", - "version": "1.0.1", + "name": "psr/http-server-middleware", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/ea17eb1fb2c8df6db919cc578451a8013c6a0ae5", + "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.0", + "psr/http-message": "^1.0", + "psr/http-server-handler": "^1.0" }, "type": "library", "extra": { @@ -188,7 +186,7 @@ }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -201,17 +199,18 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", + "description": "Common interface for HTTP server-side middleware", "keywords": [ "http", - "http-message", + "http-interop", + "middleware", "psr", + "psr-15", "psr-7", "request", "response" ], - "time": "2016-08-06T14:39:51+00:00" + "time": "2018-01-22T17:08:31+00:00" } ], "packages-dev": [ @@ -271,22 +270,22 @@ }, { "name": "malukenho/docheader", - "version": "0.1.6", + "version": "0.1.7", "source": { "type": "git", "url": "https://github.com/malukenho/docheader.git", - "reference": "b3857387fe5e6b0928b67875ea09ebb5745d5b8b" + "reference": "3eb59f0621125c0dc40775f1bcc3206c37993703" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/malukenho/docheader/zipball/b3857387fe5e6b0928b67875ea09ebb5745d5b8b", - "reference": "b3857387fe5e6b0928b67875ea09ebb5745d5b8b", + "url": "https://api.github.com/repos/malukenho/docheader/zipball/3eb59f0621125c0dc40775f1bcc3206c37993703", + "reference": "3eb59f0621125c0dc40775f1bcc3206c37993703", "shasum": "" }, "require": { "php": "~5.5|^7.0", - "symfony/console": "~2.0|^3.0", - "symfony/finder": "~2.0|^3.0" + "symfony/console": "~2.0 || ^3.0 || ^4.0", + "symfony/finder": "~2.0 || ^3.0 || ^4.0" }, "require-dev": { "phpunit/phpunit": "^4.7", @@ -318,7 +317,7 @@ "code standard", "license" ], - "time": "2017-05-03T05:22:55+00:00" + "time": "2017-12-18T09:16:11+00:00" }, { "name": "myclabs/deep-copy", @@ -684,16 +683,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "5.2.4", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "033ec97498cf530cc1be4199264cad568b19be26" + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/033ec97498cf530cc1be4199264cad568b19be26", - "reference": "033ec97498cf530cc1be4199264cad568b19be26", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", "shasum": "" }, "require": { @@ -709,7 +708,6 @@ "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.5", "phpunit/phpunit": "^6.0" }, "suggest": { @@ -718,7 +716,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -733,7 +731,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -744,7 +742,7 @@ "testing", "xunit" ], - "time": "2017-11-27T09:00:30+00:00" + "time": "2017-12-06T09:29:45+00:00" }, { "name": "phpunit/php-file-iterator", @@ -934,16 +932,16 @@ }, { "name": "phpunit/phpunit", - "version": "6.5.2", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "24b708f2fd725bcef1c8153b366043381aa324f2" + "reference": "83d27937a310f2984fd575686138597147bdc7df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/24b708f2fd725bcef1c8153b366043381aa324f2", - "reference": "24b708f2fd725bcef1c8153b366043381aa324f2", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/83d27937a310f2984fd575686138597147bdc7df", + "reference": "83d27937a310f2984fd575686138597147bdc7df", "shasum": "" }, "require": { @@ -957,11 +955,11 @@ "phar-io/version": "^1.0", "php": "^7.0", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.2.3", + "phpunit/php-code-coverage": "^5.3", "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.4", + "phpunit/phpunit-mock-objects": "^5.0.5", "sebastian/comparator": "^2.1", "sebastian/diff": "^2.0", "sebastian/environment": "^3.1", @@ -1014,27 +1012,27 @@ "testing", "xunit" ], - "time": "2017-12-02T05:36:24+00:00" + "time": "2017-12-17T06:31:19+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "5.0.4", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "16b50f4167e5e85e81ca8a3dd105d0a5fd32009a" + "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/16b50f4167e5e85e81ca8a3dd105d0a5fd32009a", - "reference": "16b50f4167e5e85e81ca8a3dd105d0a5fd32009a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", + "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", "php": "^7.0", "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.0" + "sebastian/exporter": "^3.1" }, "conflict": { "phpunit/phpunit": "<6.0" @@ -1073,54 +1071,7 @@ "mock", "xunit" ], - "time": "2017-12-02T05:31:19+00:00" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-01-06T05:45:45+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1169,16 +1120,16 @@ }, { "name": "sebastian/comparator", - "version": "2.1.0", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158" + "reference": "11c07feade1d65453e06df3b3b90171d6d982087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/11c07feade1d65453e06df3b3b90171d6d982087", + "reference": "11c07feade1d65453e06df3b3b90171d6d982087", "shasum": "" }, "require": { @@ -1229,7 +1180,7 @@ "compare", "equality" ], - "time": "2017-11-03T07:16:52+00:00" + "time": "2018-01-12T06:34:42+00:00" }, { "name": "sebastian/diff", @@ -1761,21 +1712,20 @@ }, { "name": "symfony/console", - "version": "v3.4.1", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2cdef78de8f54f68ff16a857e710e7302b47d4c7" + "reference": "fe0e69d7162cba0885791cf7eea5f0d7bc0f897e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2cdef78de8f54f68ff16a857e710e7302b47d4c7", - "reference": "2cdef78de8f54f68ff16a857e710e7302b47d4c7", + "url": "https://api.github.com/repos/symfony/console/zipball/fe0e69d7162cba0885791cf7eea5f0d7bc0f897e", + "reference": "fe0e69d7162cba0885791cf7eea5f0d7bc0f897e", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0|~4.0", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -1784,11 +1734,11 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3|~4.0", + "symfony/config": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.3|~4.0" + "symfony/process": "~3.4|~4.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1799,7 +1749,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1826,85 +1776,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-12-02T18:20:11+00:00" - }, - { - "name": "symfony/debug", - "version": "v4.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "26a15dab86c3820473716be4f846eac774ad4ad9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/26a15dab86c3820473716be4f846eac774ad4ad9", - "reference": "26a15dab86c3820473716be4f846eac774ad4ad9", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-11-21T09:27:49+00:00" + "time": "2018-01-03T07:38:00+00:00" }, { "name": "symfony/finder", - "version": "v3.4.1", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a" + "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/dac8d7db537bac7ad8143eb11360a8c2231f251a", - "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a", + "url": "https://api.github.com/repos/symfony/finder/zipball/8b08180f2b7ccb41062366b9ad91fbc4f1af8601", + "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1931,7 +1825,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-11-05T16:10:10+00:00" + "time": "2018-01-03T07:38:00+00:00" }, { "name": "symfony/polyfill-mbstring", diff --git a/src/Route.php b/src/Route.php index 431755a..99ea6fe 100644 --- a/src/Route.php +++ b/src/Route.php @@ -1,7 +1,7 @@