From 2712a9973c383f50f2392fd47c3e5126ac9fadff Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sun, 19 Feb 2017 12:29:32 +0000 Subject: [PATCH 01/19] Require stratigility in dev, and suggestion --- composer.json | 10 +- composer.lock | 1010 +++++++++++++++++++++++++++++-------------------- 2 files changed, 610 insertions(+), 410 deletions(-) diff --git a/composer.json b/composer.json index a9cd1dc92..23a0910a5 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,11 @@ "zendframework/zend-view": "^2.6.7" }, "require-dev": { - "phpunit/phpunit": "^6.0.7 || ^5.7.14", - "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-json": "^2.6.1 || ^3.0", - "zendframework/zend-psr7bridge": "^0.2" + "zendframework/zend-psr7bridge": "^0.2", + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "^4.5", + "zendframework/zend-stratigility": "^2.0.1" }, "suggest": { "zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable", @@ -40,7 +41,8 @@ "zendframework/zend-mvc-plugin-prg": "To provide Post/Redirect/Get functionality within controllers", "zendframework/zend-paginator": "^2.7 To provide pagination functionality via PaginatorPluginManager", "zendframework/zend-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow", - "zendframework/zend-servicemanager-di": "zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application" + "zendframework/zend-servicemanager-di": "zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application", + "zendframework/zend-stratigility": "zend-stratigility is required to use middleware pipes in the MiddlewareListener" }, "config": { "sort-packages": true diff --git a/composer.lock b/composer.lock index 9b20166a0..11055660d 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": "49416697f8880101228e63a393d38809", + "content-hash": "6f1698b186e4211d7322c03cb4cf8d4f", "packages": [ { "name": "container-interop/container-interop", @@ -395,16 +395,16 @@ }, { "name": "zendframework/zend-router", - "version": "3.0.2", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-router.git", - "reference": "03763610632a9022aff22a0e8f340852e68392a1" + "reference": "5a4666ced887d2a9e920e8aaa604b3cc39648b1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-router/zipball/03763610632a9022aff22a0e8f340852e68392a1", - "reference": "03763610632a9022aff22a0e8f340852e68392a1", + "url": "https://api.github.com/repos/zendframework/zend-router/zipball/5a4666ced887d2a9e920e8aaa604b3cc39648b1a", + "reference": "5a4666ced887d2a9e920e8aaa604b3cc39648b1a", "shasum": "" }, "require": { @@ -414,9 +414,6 @@ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", "zendframework/zend-stdlib": "^2.7.5 || ^3.0" }, - "conflict": { - "zendframework/zend-mvc": "<3.0.0" - }, "require-dev": { "phpunit/phpunit": "^4.5", "sebastian/version": "^1.0.4", @@ -452,7 +449,7 @@ "routing", "zf2" ], - "time": "2016-05-31T20:47:48+00:00" + "time": "2016-04-18T17:04:31+00:00" }, { "name": "zendframework/zend-servicemanager", @@ -824,66 +821,77 @@ "time": "2015-06-14T21:17:01+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.6.1", + "name": "fabpot/php-cs-fixer", + "version": "v1.7.1", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "8785276c44a36ca5235a3b6133e3ffbe989ee431" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/8785276c44a36ca5235a3b6133e3ffbe989ee431", + "reference": "8785276c44a36ca5235a3b6133e3ffbe989ee431", "shasum": "" }, "require": { - "php": ">=5.4.0" + "ext-tokenizer": "*", + "php": ">=5.3.6", + "sebastian/diff": "~1.1", + "symfony/console": "~2.3", + "symfony/event-dispatcher": "~2.1", + "symfony/filesystem": "~2.1", + "symfony/finder": "~2.1", + "symfony/process": "~2.3", + "symfony/stopwatch": "~2.5" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "satooshi/php-coveralls": "0.7.*@dev" }, - "type": "library", + "bin": [ + "php-cs-fixer" + ], + "type": "application", "autoload": { "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Symfony\\CS\\": "Symfony/CS/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "authors": [ + { + "name": "Dariusz RumiƄski", + "email": "dariusz.ruminski@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } ], - "time": "2017-04-12T18:52:22+00:00" + "description": "A script to automatically fix Symfony Coding Standard", + "abandoned": "friendsofphp/php-cs-fixer", + "time": "2015-05-04T16:56:09+00:00" }, { - "name": "phar-io/manifest", - "version": "1.0.1", + "name": "http-interop/http-middleware", + "version": "0.4.1", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "url": "https://github.com/http-interop/http-middleware.git", + "reference": "9a801fe60e70d5d608b61d56b2dcde29516c81b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/http-interop/http-middleware/zipball/9a801fe60e70d5d608b61d56b2dcde29516c81b9", + "reference": "9a801fe60e70d5d608b61d56b2dcde29516c81b9", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" + "php": ">=5.3.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -892,80 +900,32 @@ } }, "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "psr-4": { + "Interop\\Http\\ServerMiddleware\\": "src/" } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" - }, - { - "name": "phar-io/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "factory", + "http", + "middleware", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2017-01-14T15:23:42+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1178,41 +1138,39 @@ }, { "name": "phpunit/php-code-coverage", - "version": "5.2.1", + "version": "2.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b", - "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.11 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^3.0", - "sebastian/version": "^2.0", - "theseer/tokenizer": "^1.1" + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" }, "require-dev": { - "ext-xdebug": "^2.5", - "phpunit/phpunit": "^6.0" + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" }, "suggest": { - "ext-xdebug": "^2.5.3" + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -1238,7 +1196,7 @@ "testing", "xunit" ], - "time": "2017-04-21T08:03:57+00:00" + "time": "2015-10-06T15:47:00+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1428,53 +1386,41 @@ }, { "name": "phpunit/phpunit", - "version": "6.1.2", + "version": "4.8.35", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f" + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f", - "reference": "fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "^1.3", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.2", - "phpunit/php-file-iterator": "^1.4", - "phpunit/php-text-template": "^1.2", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^4.0", - "sebastian/comparator": "^2.0", - "sebastian/diff": "^1.2", - "sebastian/environment": "^3.0.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^1.1 || ^2.0", - "sebastian/object-enumerator": "^3.0.2", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, - "require-dev": { - "ext-pdo": "*" + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" }, "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "~1.1" }, "bin": [ "phpunit" @@ -1482,7 +1428,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { @@ -1508,33 +1454,30 @@ "testing", "xunit" ], - "time": "2017-04-25T21:30:13+00:00" + "time": "2017-02-06T05:18:07+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "4.0.1", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "eabce450df194817a7d7e27e19013569a903a2bf" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/eabce450df194817a7d7e27e19013569a903a2bf", - "reference": "eabce450df194817a7d7e27e19013569a903a2bf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": "^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^3.0" - }, - "conflict": { - "phpunit/phpunit": "<6.0" + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" @@ -1542,7 +1485,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { @@ -1567,7 +1510,7 @@ "mock", "xunit" ], - "time": "2017-03-03T06:30:20+00:00" + "time": "2015-10-02T06:51:40+00:00" }, { "name": "psr/http-message", @@ -1620,24 +1563,21 @@ "time": "2016-08-06T14:39:51+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "name": "psr/log", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -1646,50 +1586,55 @@ } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "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" }, { "name": "sebastian/comparator", - "version": "2.0.0", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "20f84f468cb67efee293246e6a09619b891f55f0" + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0", - "reference": "20f84f468cb67efee293246e6a09619b891f55f0", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^1.2", - "sebastian/exporter": "^3.0" + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1726,7 +1671,7 @@ "compare", "equality" ], - "time": "2017-03-03T06:26:08+00:00" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", @@ -1782,28 +1727,28 @@ }, { "name": "sebastian/environment", - "version": "3.0.2", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "11e7710b7724d42c62249b0e9d3030240398949d" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/11e7710b7724d42c62249b0e9d3030240398949d", - "reference": "11e7710b7724d42c62249b0e9d3030240398949d", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1828,34 +1773,34 @@ "environment", "hhvm" ], - "time": "2017-04-21T14:40:32+00:00" + "time": "2016-08-18T05:49:44+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1895,27 +1840,27 @@ "export", "exporter" ], - "time": "2017-04-03T13:19:02+00:00" + "time": "2016-06-17T09:04:28+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.2" }, "suggest": { "ext-uopz": "*" @@ -1923,7 +1868,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1946,34 +1891,32 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2015-10-12T03:26:01+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.2", + "name": "sebastian/recursion-context", + "version": "1.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8", - "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.0", - "sebastian/recursion-context": "^3.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -1986,315 +1929,545 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-03-12T15:17:29+00:00" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" }, { - "name": "sebastian/object-reflector", - "version": "1.1.1", + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "symfony/console", + "version": "v2.8.19", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "url": "https://github.com/symfony/console.git", + "reference": "86407ff20855a5eaa2a7219bd815e9c40a88633e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/symfony/console/zipball/86407ff20855a5eaa2a7219bd815e9c40a88633e", + "reference": "86407ff20855a5eaa2a7219bd815e9c40a88633e", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2017-04-03T20:37:06+00:00" }, { - "name": "sebastian/recursion-context", - "version": "3.0.0", + "name": "symfony/debug", + "version": "v3.0.9", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "url": "https://github.com/symfony/debug.git", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-07-30T07:22:48+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "88b65f0ac25355090e524aba4ceb066025df8bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/88b65f0ac25355090e524aba4ceb066025df8bd2", + "reference": "88b65f0ac25355090e524aba4ceb066025df8bd2", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2017-04-03T20:37:06+00:00" }, { - "name": "sebastian/resource-operations", - "version": "1.0.0", + "name": "symfony/filesystem", + "version": "v2.8.19", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "url": "https://github.com/symfony/filesystem.git", + "reference": "31ab6827a696244094e6e20d77e7d404f8eb4252" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/31ab6827a696244094e6e20d77e7d404f8eb4252", + "reference": "31ab6827a696244094e6e20d77e7d404f8eb4252", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2017-03-26T15:40:40+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "symfony/finder", + "version": "v2.8.19", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/symfony/finder.git", + "reference": "7131327eb95d86d72039fd1216226c28f36fd02a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/symfony/finder/zipball/7131327eb95d86d72039fd1216226c28f36fd02a", + "reference": "7131327eb95d86d72039fd1216226c28f36fd02a", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2017-03-20T08:46:40+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "2.8.1", + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", - "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", "shasum": "" }, "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.3.3" }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "suggest": { + "ext-mbstring": "For best performance" }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "1.3-dev" } }, "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Greg Sherwood", - "role": "lead" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", "keywords": [ - "phpcs", - "standards" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" ], - "time": "2017-03-01T22:17:45+00:00" + "time": "2016-11-14T01:06:16+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.0", + "name": "symfony/process", + "version": "v2.8.19", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "url": "https://github.com/symfony/process.git", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" + "php": ">=5.3.9" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2017-03-04T12:20:59+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v2.8.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/9e4369666d02ee9b8830da878b7f6a769eb96f4b", + "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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 Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2017-02-18T17:06:33+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.2.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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 Yaml Component", + "homepage": "https://symfony.com", + "time": "2017-03-20T09:45:15+00:00" }, { "name": "webmozart/assert", @@ -2346,35 +2519,6 @@ ], "time": "2016-11-23T20:04:58+00:00" }, - { - "name": "zendframework/zend-coding-standard", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-coding-standard.git", - "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", - "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", - "shasum": "" - }, - "require": { - "squizlabs/php_codesniffer": "^2.7" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Zend Framework coding standard", - "keywords": [ - "Coding Standard", - "zf" - ], - "time": "2016-11-09T21:30:43+00:00" - }, { "name": "zendframework/zend-diactoros", "version": "1.4.0", @@ -2525,6 +2669,60 @@ "psr-7" ], "time": "2016-05-10T21:44:39+00:00" + }, + { + "name": "zendframework/zend-stratigility", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stratigility.git", + "reference": "229e7d94010d09d9e68096ff6f1d35f354d8dac9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stratigility/zipball/229e7d94010d09d9e68096ff6f1d35f354d8dac9", + "reference": "229e7d94010d09d9e68096ff6f1d35f354d8dac9", + "shasum": "" + }, + "require": { + "http-interop/http-middleware": "^0.4.1", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0", + "zendframework/zend-escaper": "^2.3" + }, + "require-dev": { + "malukenho/docheader": "^0.1.5", + "phpunit/phpunit": "^5.7", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.0-dev", + "dev-develop": "2.1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stratigility\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Middleware for PHP", + "homepage": "https://github.com/zendframework/zend-stratigility", + "keywords": [ + "http", + "middleware", + "psr-7" + ], + "time": "2017-01-25T19:16:16+00:00" } ], "aliases": [], From cab17a28db9c0c1f2e4027b9d0122750c22825e2 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sun, 19 Feb 2017 12:31:35 +0000 Subject: [PATCH 02/19] Added tests for handling an array of middleware to be piped --- .../ReachedFinalHandlerException.php | 14 +++ test/MiddlewareListenerTest.php | 87 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 src/Exception/ReachedFinalHandlerException.php diff --git a/src/Exception/ReachedFinalHandlerException.php b/src/Exception/ReachedFinalHandlerException.php new file mode 100644 index 000000000..db22a9b76 --- /dev/null +++ b/src/Exception/ReachedFinalHandlerException.php @@ -0,0 +1,14 @@ +assertSame($this->routeMatch->reveal(), $routeAttribute); } + public function testSuccessfullyDispatchesPipeOfMiddleware() + { + $response = new Response(); + $routeMatch = $this->prophesize(RouteMatch::class); + $routeMatch->getParam('middleware', false)->willReturn([ + 'firstMiddleware', + 'secondMiddleware', + ]); + + $eventManager = new EventManager(); + + $serviceManager = $this->prophesize(ContainerInterface::class); + $serviceManager->has('firstMiddleware')->willReturn(true); + $serviceManager->get('firstMiddleware')->willReturn(function ($request, $response, $next) { + $this->assertInstanceOf(ServerRequestInterface::class, $request); + $this->assertInstanceOf(ResponseInterface::class, $response); + $this->assertTrue(is_callable($next)); + return $next($request->withAttribute('firstMiddlewareAttribute', 'firstMiddlewareValue'), $response); + }); + $serviceManager->has('secondMiddleware')->willReturn(true); + $serviceManager->get('secondMiddleware')->willReturn(function ($request, $response) { + $this->assertInstanceOf(ServerRequestInterface::class, $request); + $this->assertInstanceOf(ResponseInterface::class, $response); + $response->getBody()->write($request->getAttribute('firstMiddlewareAttribute')); + return $response; + }); + + $application = $this->prophesize(Application::class); + $application->getEventManager()->willReturn($eventManager); + $application->getServiceManager()->will(function () use ($serviceManager) { + return $serviceManager->reveal(); + }); + $application->getResponse()->willReturn($response); + + $event = new MvcEvent(); + $event->setRequest(new Request()); + $event->setResponse($response); + $event->setApplication($application->reveal()); + $event->setRouteMatch($routeMatch->reveal()); + + $event->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function ($e) { + $this->fail(sprintf('dispatch.error triggered when it should not be: %s', var_export($e->getError(), 1))); + }); + + $listener = new MiddlewareListener(); + $return = $listener->onDispatch($event); + $this->assertInstanceOf(Response::class, $return); + + $this->assertInstanceOf('Zend\Http\Response', $return); + $this->assertSame(200, $return->getStatusCode()); + $this->assertEquals('firstMiddlewareValue', $return->getBody()); + } + public function testTriggersErrorForUncallableMiddleware() { $event = $this->createMvcEvent('path'); @@ -186,4 +240,37 @@ public function testCanLoadFromAbstractFactory() $this->assertSame(200, $return->getStatusCode()); $this->assertEquals(TestAsset\Middleware::class, $return->getBody()); } + + public function testMiddlewareWithNothingPipedReachesFinalHandlerException() + { + $response = new Response(); + $routeMatch = $this->prophesize(RouteMatch::class); + $routeMatch->getParam('middleware', false)->willReturn([]); + + $eventManager = new EventManager(); + + $serviceManager = $this->prophesize(ContainerInterface::class); + $application = $this->prophesize(Application::class); + $application->getEventManager()->willReturn($eventManager); + $application->getServiceManager()->will(function () use ($serviceManager) { + return $serviceManager->reveal(); + }); + $application->getResponse()->willReturn($response); + + $event = new MvcEvent(); + $event->setRequest(new Request()); + $event->setResponse($response); + $event->setApplication($application->reveal()); + $event->setRouteMatch($routeMatch->reveal()); + + $event->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function ($e) { + $this->assertEquals(Application::ERROR_EXCEPTION, $e->getError()); + $this->assertInstanceOf(ReachedFinalHandlerException::class, $e->getParam('exception')); + return 'FAILED'; + }); + + $listener = new MiddlewareListener(); + $return = $listener->onDispatch($event); + $this->assertEquals('FAILED', $return); + } } From 24201cb52c6e1b6311c4f87412620bdca884fd1c Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sun, 19 Feb 2017 12:31:46 +0000 Subject: [PATCH 03/19] Added implementation of Stratigility middleware pipe --- src/MiddlewareListener.php | 56 ++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index 688fa3dea..d9be65d54 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -10,11 +10,14 @@ namespace Zend\Mvc; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; +use Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface; use Zend\EventManager\AbstractListenerAggregate; use Zend\EventManager\EventManagerInterface; +use Zend\Mvc\Exception\ReachedFinalHandlerException; use Zend\Psr7Bridge\Psr7ServerRequest as Psr7Request; use Zend\Psr7Bridge\Psr7Response; use Zend\Router\RouteMatch; +use Zend\Stratigility\MiddlewarePipe; class MiddlewareListener extends AbstractListenerAggregate { @@ -47,20 +50,33 @@ public function onDispatch(MvcEvent $event) $application = $event->getApplication(); $response = $application->getResponse(); $serviceManager = $application->getServiceManager(); - $middlewareName = is_string($middleware) ? $middleware : get_class($middleware); - if (is_string($middleware) && $serviceManager->has($middleware)) { - $middleware = $serviceManager->get($middleware); - } - if (! is_callable($middleware)) { - $return = $this->marshalMiddlewareNotCallable( - $application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, - $middlewareName, - $event, - $application - ); - $event->setResult($return); - return $return; + $psr7ResponsePrototype = Psr7Response::fromZend($response); + $pipe = new MiddlewarePipe(); + $pipe->setResponsePrototype($psr7ResponsePrototype); + + $middlewaresToBePiped = !is_array($middleware) ? [$middleware] : $middleware; + + $middlewareName = 'noMiddlewarePiped'; + $middlewareToBePiped = null; + foreach ($middlewaresToBePiped as $middlewareToBePiped) { + $middlewareName = is_string($middlewareToBePiped) ? $middlewareToBePiped : get_class($middlewareToBePiped); + + if (is_string($middlewareToBePiped) && $serviceManager->has($middlewareToBePiped)) { + $middlewareToBePiped = $serviceManager->get($middlewareToBePiped); + } + if (! is_callable($middlewareToBePiped)) { + $return = $this->marshalMiddlewareNotCallable( + $application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, + $middlewareName, + $event, + $application + ); + $event->setResult($return); + return $return; + } + + $pipe->pipe($middlewareToBePiped); } $caughtException = null; @@ -69,7 +85,15 @@ public function onDispatch(MvcEvent $event) foreach ($routeMatch->getParams() as $key => $value) { $psr7Request = $psr7Request->withAttribute($key, $value); } - $return = $middleware($psr7Request, Psr7Response::fromZend($response)); + $return = $pipe( + $psr7Request, + $psr7ResponsePrototype, + function (PsrServerRequestInterface $request, PsrResponseInterface $response) { + throw new ReachedFinalHandlerException( + 'Reached the final handler for middleware pipe - check the pipe configuration' + ); + } + ); } catch (\Throwable $ex) { $caughtException = $ex; } catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced @@ -80,7 +104,9 @@ public function onDispatch(MvcEvent $event) $event->setName(MvcEvent::EVENT_DISPATCH_ERROR); $event->setError($application::ERROR_EXCEPTION); $event->setController($middlewareName); - $event->setControllerClass(get_class($middleware)); + if (null !== $middlewareToBePiped) { + $event->setControllerClass(get_class($middlewareToBePiped)); + } $event->setParam('exception', $caughtException); $events = $application->getEventManager(); From ab63639b69a77715bbfd587a7cf3666a61318899 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sun, 19 Feb 2017 12:39:46 +0000 Subject: [PATCH 04/19] Updated RotueMatch#getParams calls to be expected in tests --- test/MiddlewareListenerTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index cd2e54410..953b2002e 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -118,6 +118,7 @@ public function testSuccessfullyDispatchesPipeOfMiddleware() { $response = new Response(); $routeMatch = $this->prophesize(RouteMatch::class); + $routeMatch->getParams()->willReturn([]); $routeMatch->getParam('middleware', false)->willReturn([ 'firstMiddleware', 'secondMiddleware', @@ -245,6 +246,7 @@ public function testMiddlewareWithNothingPipedReachesFinalHandlerException() { $response = new Response(); $routeMatch = $this->prophesize(RouteMatch::class); + $routeMatch->getParams()->willReturn([]); $routeMatch->getParam('middleware', false)->willReturn([]); $eventManager = new EventManager(); From 81c5f2e1db468b43c5cb75d900a8bbad36ca495e Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sat, 25 Feb 2017 13:15:13 +0000 Subject: [PATCH 05/19] Extract logic to create middleware pipe into private method --- .../MiddlewareNotCallableException.php | 38 +++++++++ src/MiddlewareListener.php | 77 ++++++++++++------- .../MiddlewareNotCallableExceptionTest.php | 32 ++++++++ 3 files changed, 119 insertions(+), 28 deletions(-) create mode 100644 src/Exception/MiddlewareNotCallableException.php create mode 100644 test/Exception/MiddlewareNotCallableExceptionTest.php diff --git a/src/Exception/MiddlewareNotCallableException.php b/src/Exception/MiddlewareNotCallableException.php new file mode 100644 index 000000000..95f6b9cd8 --- /dev/null +++ b/src/Exception/MiddlewareNotCallableException.php @@ -0,0 +1,38 @@ +middlewareName = $middlewareName; + return $instance; + } + + /** + * @return string + */ + public function toMiddlewareName() + { + return $this->middlewareName ?? ''; + } +} diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index d9be65d54..e95c4adbb 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -9,10 +9,13 @@ namespace Zend\Mvc; +use Interop\Container\ContainerInterface; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface; use Zend\EventManager\AbstractListenerAggregate; use Zend\EventManager\EventManagerInterface; +use Zend\Mvc\Exception\MiddlewareNotCallableException; use Zend\Mvc\Exception\ReachedFinalHandlerException; use Zend\Psr7Bridge\Psr7ServerRequest as Psr7Request; use Zend\Psr7Bridge\Psr7Response; @@ -52,31 +55,22 @@ public function onDispatch(MvcEvent $event) $serviceManager = $application->getServiceManager(); $psr7ResponsePrototype = Psr7Response::fromZend($response); - $pipe = new MiddlewarePipe(); - $pipe->setResponsePrototype($psr7ResponsePrototype); - - $middlewaresToBePiped = !is_array($middleware) ? [$middleware] : $middleware; - - $middlewareName = 'noMiddlewarePiped'; - $middlewareToBePiped = null; - foreach ($middlewaresToBePiped as $middlewareToBePiped) { - $middlewareName = is_string($middlewareToBePiped) ? $middlewareToBePiped : get_class($middlewareToBePiped); - - if (is_string($middlewareToBePiped) && $serviceManager->has($middlewareToBePiped)) { - $middlewareToBePiped = $serviceManager->get($middlewareToBePiped); - } - if (! is_callable($middlewareToBePiped)) { - $return = $this->marshalMiddlewareNotCallable( - $application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, - $middlewareName, - $event, - $application - ); - $event->setResult($return); - return $return; - } - $pipe->pipe($middlewareToBePiped); + try { + $pipe = $this->createPipeFromSpec( + $serviceManager, + $psr7ResponsePrototype, + is_array($middleware) ? $middleware : [$middleware] + ); + } catch (MiddlewareNotCallableException $middlewareNotCallableException) { + $return = $this->marshalMiddlewareNotCallable( + $application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, + $middlewareNotCallableException->toMiddlewareName(), + $event, + $application + ); + $event->setResult($return); + return $return; } $caughtException = null; @@ -103,10 +97,6 @@ function (PsrServerRequestInterface $request, PsrResponseInterface $response) { if ($caughtException !== null) { $event->setName(MvcEvent::EVENT_DISPATCH_ERROR); $event->setError($application::ERROR_EXCEPTION); - $event->setController($middlewareName); - if (null !== $middlewareToBePiped) { - $event->setControllerClass(get_class($middlewareToBePiped)); - } $event->setParam('exception', $caughtException); $events = $application->getEventManager(); @@ -126,6 +116,37 @@ function (PsrServerRequestInterface $request, PsrResponseInterface $response) { return $response; } + /** + * Create a middleware pipe from the array spec given. + * + * @param ContainerInterface $serviceLocator + * @param ResponseInterface $responsePrototype + * @param array $middlewaresToBePiped + * @return MiddlewarePipe + * @throws \Zend\Mvc\Exception\MiddlewareNotCallableException + */ + private function createPipeFromSpec( + ContainerInterface $serviceLocator, + ResponseInterface $responsePrototype, + array $middlewaresToBePiped + ) { + $pipe = new MiddlewarePipe(); + $pipe->setResponsePrototype($responsePrototype); + foreach ($middlewaresToBePiped as $middlewareToBePiped) { + $middlewareName = is_string($middlewareToBePiped) ? $middlewareToBePiped : get_class($middlewareToBePiped); + + if (is_string($middlewareToBePiped) && $serviceLocator->has($middlewareToBePiped)) { + $middlewareToBePiped = $serviceLocator->get($middlewareToBePiped); + } + if (! is_callable($middlewareToBePiped)) { + throw MiddlewareNotCallableException::fromMiddlewareName($middlewareName); + } + + $pipe->pipe($middlewareToBePiped); + } + return $pipe; + } + /** * Marshal a middleware not callable exception event * diff --git a/test/Exception/MiddlewareNotCallableExceptionTest.php b/test/Exception/MiddlewareNotCallableExceptionTest.php new file mode 100644 index 000000000..ca5c92399 --- /dev/null +++ b/test/Exception/MiddlewareNotCallableExceptionTest.php @@ -0,0 +1,32 @@ +getMessage()); + self::assertSame($middlewareName, $exception->toMiddlewareName()); + } + + public function testToMiddlewareNameWhenNotSet() + { + $exception = new MiddlewareNotCallableException(); + self::assertSame('', $exception->toMiddlewareName()); + } +} From 6f9c2719de3537c83f927ffc96a7dd592ea8e3e3 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sat, 25 Feb 2017 13:23:31 +0000 Subject: [PATCH 06/19] Do not allow a null middleware --- src/MiddlewareListener.php | 5 +++++ test/MiddlewareListenerTest.php | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index e95c4adbb..b1b63f22d 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -123,6 +123,7 @@ function (PsrServerRequestInterface $request, PsrResponseInterface $response) { * @param ResponseInterface $responsePrototype * @param array $middlewaresToBePiped * @return MiddlewarePipe + * @throws \InvalidArgumentException * @throws \Zend\Mvc\Exception\MiddlewareNotCallableException */ private function createPipeFromSpec( @@ -133,6 +134,10 @@ private function createPipeFromSpec( $pipe = new MiddlewarePipe(); $pipe->setResponsePrototype($responsePrototype); foreach ($middlewaresToBePiped as $middlewareToBePiped) { + if (null === $middlewareToBePiped) { + throw new \InvalidArgumentException('Middleware name cannot be null'); + } + $middlewareName = is_string($middlewareToBePiped) ? $middlewareToBePiped : get_class($middlewareToBePiped); if (is_string($middlewareToBePiped) && $serviceLocator->has($middlewareToBePiped)) { diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index 953b2002e..ff3b14b1e 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -275,4 +275,39 @@ public function testMiddlewareWithNothingPipedReachesFinalHandlerException() $return = $listener->onDispatch($event); $this->assertEquals('FAILED', $return); } + + public function testNullMiddlewareThrowsInvalidArgument() + { + $response = new Response(); + $routeMatch = $this->prophesize(RouteMatch::class); + $routeMatch->getParams()->willReturn([]); + $routeMatch->getParam('middleware', false)->willReturn([null]); + + $eventManager = new EventManager(); + + $serviceManager = $this->prophesize(ContainerInterface::class); + $application = $this->prophesize(Application::class); + $application->getEventManager()->willReturn($eventManager); + $application->getServiceManager()->will(function () use ($serviceManager) { + return $serviceManager->reveal(); + }); + $application->getResponse()->willReturn($response); + + $event = new MvcEvent(); + $event->setRequest(new Request()); + $event->setResponse($response); + $event->setApplication($application->reveal()); + $event->setRouteMatch($routeMatch->reveal()); + + $event->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function ($e) { + $this->assertEquals(Application::ERROR_EXCEPTION, $e->getError()); + $this->assertInstanceOf(ReachedFinalHandlerException::class, $e->getParam('exception')); + return 'FAILED'; + }); + + $listener = new MiddlewareListener(); + + $this->setExpectedException(\InvalidArgumentException::class); + $listener->onDispatch($event); + } } From 7e89d6a5b871b7478ed4b03c042c9d07832251ce Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sat, 25 Feb 2017 13:33:39 +0000 Subject: [PATCH 07/19] Remove null coalesce operator because still need to support PHP 5.6 --- src/Exception/MiddlewareNotCallableException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception/MiddlewareNotCallableException.php b/src/Exception/MiddlewareNotCallableException.php index 95f6b9cd8..43c7b3e70 100644 --- a/src/Exception/MiddlewareNotCallableException.php +++ b/src/Exception/MiddlewareNotCallableException.php @@ -33,6 +33,6 @@ public static function fromMiddlewareName($middlewareName) */ public function toMiddlewareName() { - return $this->middlewareName ?? ''; + return null !== $this->middlewareName ? $this->middlewareName : ''; } } From cebe04107883e9a48b5215961cfe2ffde8bcf2ee Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 16:51:52 +0100 Subject: [PATCH 08/19] Added support for HttpInterop style middlewares --- src/MiddlewareListener.php | 3 ++- test/MiddlewareListenerTest.php | 47 ++++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index b1b63f22d..2e62bdea5 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -10,6 +10,7 @@ namespace Zend\Mvc; use Interop\Container\ContainerInterface; +use Interop\Http\ServerMiddleware\MiddlewareInterface; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface; @@ -143,7 +144,7 @@ private function createPipeFromSpec( if (is_string($middlewareToBePiped) && $serviceLocator->has($middlewareToBePiped)) { $middlewareToBePiped = $serviceLocator->get($middlewareToBePiped); } - if (! is_callable($middlewareToBePiped)) { + if (! $middlewareToBePiped instanceof MiddlewareInterface && ! is_callable($middlewareToBePiped)) { throw MiddlewareNotCallableException::fromMiddlewareName($middlewareName); } diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index ff3b14b1e..3d894575d 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -10,9 +10,12 @@ namespace ZendTest\Mvc; use Interop\Container\ContainerInterface; +use Interop\Http\ServerMiddleware\DelegateInterface; +use Interop\Http\ServerMiddleware\MiddlewareInterface; use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; +use Zend\Diactoros\Response\HtmlResponse; use Zend\EventManager\EventManager; use Zend\Http\Request; use Zend\Http\Response; @@ -89,6 +92,38 @@ public function testSuccessfullyDispatchesMiddleware() $this->assertEquals('Test!', $return->getBody()); } + public function testSuccessfullyDispatchesHttpInteropMiddleware() + { + $expectedOutput = uniqid('expectedOutput', true); + + $event = $this->createMvcEvent('path', new class($expectedOutput) implements MiddlewareInterface { + private $expectedOutput; + + public function __construct($expectedOutput) + { + $this->expectedOutput = $expectedOutput; + } + + public function process(ServerRequestInterface $request, DelegateInterface $delegate) + { + return new HtmlResponse($this->expectedOutput); + } + }); + $application = $event->getApplication(); + + $application->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function ($e) { + $this->fail(sprintf('dispatch.error triggered when it should not be: %s', var_export($e->getError(), 1))); + }); + + $listener = new MiddlewareListener(); + $return = $listener->onDispatch($event); + $this->assertInstanceOf(Response::class, $return); + + $this->assertInstanceOf(Response::class, $return); + $this->assertSame(200, $return->getStatusCode()); + $this->assertEquals($expectedOutput, $return->getBody()); + } + public function testMatchedRouteParamsAreInjectedToRequestAsAttributes() { $matchedRouteParam = uniqid('matched param', true); @@ -114,7 +149,7 @@ function (ServerRequestInterface $request, ResponseInterface $response) use (&$r $this->assertSame($this->routeMatch->reveal(), $routeAttribute); } - public function testSuccessfullyDispatchesPipeOfMiddleware() + public function testSuccessfullyDispatchesPipeOfCallableAndHttpInteropStyleMiddlewares() { $response = new Response(); $routeMatch = $this->prophesize(RouteMatch::class); @@ -135,11 +170,11 @@ public function testSuccessfullyDispatchesPipeOfMiddleware() return $next($request->withAttribute('firstMiddlewareAttribute', 'firstMiddlewareValue'), $response); }); $serviceManager->has('secondMiddleware')->willReturn(true); - $serviceManager->get('secondMiddleware')->willReturn(function ($request, $response) { - $this->assertInstanceOf(ServerRequestInterface::class, $request); - $this->assertInstanceOf(ResponseInterface::class, $response); - $response->getBody()->write($request->getAttribute('firstMiddlewareAttribute')); - return $response; + $serviceManager->get('secondMiddleware')->willReturn(new class implements MiddlewareInterface { + public function process(ServerRequestInterface $request, DelegateInterface $delegate) + { + return new HtmlResponse($request->getAttribute('firstMiddlewareAttribute')); + } }); $application = $this->prophesize(Application::class); From d0debca66102e527285e9992976927d62a17363c Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 16:59:16 +0100 Subject: [PATCH 09/19] Refactored ReachedFinalHandlerException to use named constructor --- .../ReachedFinalHandlerException.php | 7 +++++ src/MiddlewareListener.php | 4 +-- .../MiddlewareNotCallableExceptionTest.php | 2 +- .../ReachedFinalHandlerExceptionTest.php | 27 +++++++++++++++++++ 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 test/Exception/ReachedFinalHandlerExceptionTest.php diff --git a/src/Exception/ReachedFinalHandlerException.php b/src/Exception/ReachedFinalHandlerException.php index db22a9b76..f85a7be55 100644 --- a/src/Exception/ReachedFinalHandlerException.php +++ b/src/Exception/ReachedFinalHandlerException.php @@ -11,4 +11,11 @@ class ReachedFinalHandlerException extends RuntimeException { + /** + * @return self + */ + public static function create() + { + return new self('Reached the final handler for middleware pipe - check the pipe configuration'); + } } diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index 2e62bdea5..dea994641 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -84,9 +84,7 @@ public function onDispatch(MvcEvent $event) $psr7Request, $psr7ResponsePrototype, function (PsrServerRequestInterface $request, PsrResponseInterface $response) { - throw new ReachedFinalHandlerException( - 'Reached the final handler for middleware pipe - check the pipe configuration' - ); + throw ReachedFinalHandlerException::create(); } ); } catch (\Throwable $ex) { diff --git a/test/Exception/MiddlewareNotCallableExceptionTest.php b/test/Exception/MiddlewareNotCallableExceptionTest.php index ca5c92399..ba0ed21f7 100644 --- a/test/Exception/MiddlewareNotCallableExceptionTest.php +++ b/test/Exception/MiddlewareNotCallableExceptionTest.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2017 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/test/Exception/ReachedFinalHandlerExceptionTest.php b/test/Exception/ReachedFinalHandlerExceptionTest.php new file mode 100644 index 000000000..703666a68 --- /dev/null +++ b/test/Exception/ReachedFinalHandlerExceptionTest.php @@ -0,0 +1,27 @@ +assertInstanceOf(ReachedFinalHandlerException::class, $exception); + $this->assertSame( + 'Reached the final handler for middleware pipe - check the pipe configuration', + $exception->getMessage() + ); + } +} From 6073ca2005a03c5a3d59f097dc32a1aa8e341839 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 17:00:53 +0100 Subject: [PATCH 10/19] Fixed typo in phpdoc for MvcEvent --- test/MiddlewareListenerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index 3d894575d..896621933 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -38,7 +38,7 @@ class MiddlewareListenerTest extends TestCase * * @param string $middlewareMatched Middleware service matched by routing * @param mixed $middleware Value to return for middleware service - * @return MvcEven + * @return MvcEvent */ public function createMvcEvent($middlewareMatched, $middleware = null) { From b05cd8b9c7acec6f090277ab8ae6504a5736c801 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 17:01:31 +0100 Subject: [PATCH 11/19] Switch MiddlewareNotCallableExceptionTest assertions to be invoked on instance for consistency --- test/Exception/MiddlewareNotCallableExceptionTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Exception/MiddlewareNotCallableExceptionTest.php b/test/Exception/MiddlewareNotCallableExceptionTest.php index ba0ed21f7..aad2b52f6 100644 --- a/test/Exception/MiddlewareNotCallableExceptionTest.php +++ b/test/Exception/MiddlewareNotCallableExceptionTest.php @@ -19,14 +19,14 @@ public function testFromMiddlewareName() $middlewareName = uniqid('middlewareName', true); $exception = MiddlewareNotCallableException::fromMiddlewareName($middlewareName); - self::assertInstanceOf(MiddlewareNotCallableException::class, $exception); - self::assertSame('Cannot dispatch middleware ' . $middlewareName, $exception->getMessage()); - self::assertSame($middlewareName, $exception->toMiddlewareName()); + $this->assertInstanceOf(MiddlewareNotCallableException::class, $exception); + $this->assertSame('Cannot dispatch middleware ' . $middlewareName, $exception->getMessage()); + $this->assertSame($middlewareName, $exception->toMiddlewareName()); } public function testToMiddlewareNameWhenNotSet() { $exception = new MiddlewareNotCallableException(); - self::assertSame('', $exception->toMiddlewareName()); + $this->assertSame('', $exception->toMiddlewareName()); } } From 7d89900234e3ff75003d10cb6a5badb7d8464c73 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 17:04:17 +0100 Subject: [PATCH 12/19] Fixed incorrectly rebased composer dependencies --- composer.json | 4 +- composer.lock | 1002 ++++++++++++++++++++++--------------------------- 2 files changed, 457 insertions(+), 549 deletions(-) diff --git a/composer.json b/composer.json index 23a0910a5..25b341167 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,10 @@ "zendframework/zend-view": "^2.6.7" }, "require-dev": { + "phpunit/phpunit": "^6.0.7 || ^5.7.14", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-json": "^2.6.1 || ^3.0", "zendframework/zend-psr7bridge": "^0.2", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.5", "zendframework/zend-stratigility": "^2.0.1" }, "suggest": { diff --git a/composer.lock b/composer.lock index 11055660d..1b0ce6676 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": "6f1698b186e4211d7322c03cb4cf8d4f", + "content-hash": "6124550dc3f257f3f003397fffef3ddd", "packages": [ { "name": "container-interop/container-interop", @@ -395,16 +395,16 @@ }, { "name": "zendframework/zend-router", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-router.git", - "reference": "5a4666ced887d2a9e920e8aaa604b3cc39648b1a" + "reference": "03763610632a9022aff22a0e8f340852e68392a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-router/zipball/5a4666ced887d2a9e920e8aaa604b3cc39648b1a", - "reference": "5a4666ced887d2a9e920e8aaa604b3cc39648b1a", + "url": "https://api.github.com/repos/zendframework/zend-router/zipball/03763610632a9022aff22a0e8f340852e68392a1", + "reference": "03763610632a9022aff22a0e8f340852e68392a1", "shasum": "" }, "require": { @@ -414,6 +414,9 @@ "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", "zendframework/zend-stdlib": "^2.7.5 || ^3.0" }, + "conflict": { + "zendframework/zend-mvc": "<3.0.0" + }, "require-dev": { "phpunit/phpunit": "^4.5", "sebastian/version": "^1.0.4", @@ -449,7 +452,7 @@ "routing", "zf2" ], - "time": "2016-04-18T17:04:31+00:00" + "time": "2016-05-31T20:47:48+00:00" }, { "name": "zendframework/zend-servicemanager", @@ -820,61 +823,6 @@ ], "time": "2015-06-14T21:17:01+00:00" }, - { - "name": "fabpot/php-cs-fixer", - "version": "v1.7.1", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "8785276c44a36ca5235a3b6133e3ffbe989ee431" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/8785276c44a36ca5235a3b6133e3ffbe989ee431", - "reference": "8785276c44a36ca5235a3b6133e3ffbe989ee431", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.6", - "sebastian/diff": "~1.1", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.3", - "symfony/stopwatch": "~2.5" - }, - "require-dev": { - "satooshi/php-coveralls": "0.7.*@dev" - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "autoload": { - "psr-4": { - "Symfony\\CS\\": "Symfony/CS/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Dariusz RumiƄski", - "email": "dariusz.ruminski@gmail.com" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "A script to automatically fix Symfony Coding Standard", - "abandoned": "friendsofphp/php-cs-fixer", - "time": "2015-05-04T16:56:09+00:00" - }, { "name": "http-interop/http-middleware", "version": "0.4.1", @@ -927,6 +875,150 @@ ], "time": "2017-01-14T15:23:42+00:00" }, + { + "name": "myclabs/deep-copy", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-04-12T18:52:22+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0", @@ -1138,39 +1230,41 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b", + "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.11 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "ext-xdebug": "^2.5", + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "5.2.x-dev" } }, "autoload": { @@ -1196,7 +1290,7 @@ "testing", "xunit" ], - "time": "2015-10-06T15:47:00+00:00" + "time": "2017-04-21T08:03:57+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1386,41 +1480,53 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.35", + "version": "6.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" + "reference": "fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", - "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f", + "reference": "fbf2e46d5c563ee78c9b559bcbeb1c97cad6af0f", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.3", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.2", + "phpunit/php-file-iterator": "^1.4", + "phpunit/php-text-template": "^1.2", "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "phpunit/phpunit-mock-objects": "^4.0", + "sebastian/comparator": "^2.0", + "sebastian/diff": "^1.2", + "sebastian/environment": "^3.0.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^1.1 || ^2.0", + "sebastian/object-enumerator": "^3.0.2", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -1428,7 +1534,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "6.1.x-dev" } }, "autoload": { @@ -1454,30 +1560,33 @@ "testing", "xunit" ], - "time": "2017-02-06T05:18:07+00:00" + "time": "2017-04-25T21:30:13+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "eabce450df194817a7d7e27e19013569a903a2bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/eabce450df194817a7d7e27e19013569a903a2bf", + "reference": "eabce450df194817a7d7e27e19013569a903a2bf", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^3.0" + }, + "conflict": { + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-soap": "*" @@ -1485,7 +1594,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -1510,7 +1619,7 @@ "mock", "xunit" ], - "time": "2015-10-02T06:51:40+00:00" + "time": "2017-03-03T06:30:20+00:00" }, { "name": "psr/http-message", @@ -1563,21 +1672,24 @@ "time": "2016-08-06T14:39:51+00:00" }, { - "name": "psr/log", - "version": "1.0.2", + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1586,55 +1698,50 @@ } }, "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "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" + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "20f84f468cb67efee293246e6a09619b891f55f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0", + "reference": "20f84f468cb67efee293246e6a09619b891f55f0", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.0", + "sebastian/diff": "^1.2", + "sebastian/exporter": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1671,7 +1778,7 @@ "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2017-03-03T06:26:08+00:00" }, { "name": "sebastian/diff", @@ -1727,28 +1834,28 @@ }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "11e7710b7724d42c62249b0e9d3030240398949d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/11e7710b7724d42c62249b0e9d3030240398949d", + "reference": "11e7710b7724d42c62249b0e9d3030240398949d", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1773,34 +1880,34 @@ "environment", "hhvm" ], - "time": "2016-08-18T05:49:44+00:00" + "time": "2017-04-21T14:40:32+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1840,27 +1947,27 @@ "export", "exporter" ], - "time": "2016-06-17T09:04:28+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1868,7 +1975,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1891,32 +1998,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.5", + "name": "sebastian/object-enumerator", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8", + "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "sebastian/object-reflector": "^1.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1929,545 +2038,315 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-03-12T15:17:29+00:00" }, { - "name": "symfony/console", - "version": "v2.8.19", + "name": "sebastian/object-reflector", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "86407ff20855a5eaa2a7219bd815e9c40a88633e" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/86407ff20855a5eaa2a7219bd815e9c40a88633e", - "reference": "86407ff20855a5eaa2a7219bd815e9c40a88633e", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/debug": "^2.7.2|~3.0.0", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.1-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2017-04-03T20:37:06+00:00" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" }, { - "name": "symfony/debug", - "version": "v3.0.9", + "name": "sebastian/recursion-context", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.5.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "php": "^7.0" }, "require-dev": { - "symfony/class-loader": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2016-07-30T07:22:48+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "88b65f0ac25355090e524aba4ceb066025df8bd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/88b65f0ac25355090e524aba4ceb066025df8bd2", - "reference": "88b65f0ac25355090e524aba4ceb066025df8bd2", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2017-04-03T20:37:06+00:00" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" }, { - "name": "symfony/filesystem", - "version": "v2.8.19", + "name": "sebastian/resource-operations", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "31ab6827a696244094e6e20d77e7d404f8eb4252" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/31ab6827a696244094e6e20d77e7d404f8eb4252", - "reference": "31ab6827a696244094e6e20d77e7d404f8eb4252", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2017-03-26T15:40:40+00:00" + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" }, { - "name": "symfony/finder", - "version": "v2.8.19", + "name": "sebastian/version", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "7131327eb95d86d72039fd1216226c28f36fd02a" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7131327eb95d86d72039fd1216226c28f36fd02a", - "reference": "7131327eb95d86d72039fd1216226c28f36fd02a", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com", - "time": "2017-03-20T08:46:40+00:00" + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", + "name": "squizlabs/php_codesniffer", + "version": "2.8.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", + "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] + "require-dev": { + "phpunit/phpunit": "~4.0" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" ], - "time": "2016-11-14T01:06:16+00:00" - }, - { - "name": "symfony/process", - "version": "v2.8.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "2.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v2.8.19", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/9e4369666d02ee9b8830da878b7f6a769eb96f4b", - "reference": "9e4369666d02ee9b8830da878b7f6a769eb96f4b", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" + "name": "Greg Sherwood", + "role": "lead" } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "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": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2017-02-18T17:06:33+00:00" + "time": "2017-03-01T22:17:45+00:00" }, { - "name": "symfony/yaml", - "version": "v3.2.7", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621", - "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-03-20T09:45:15+00:00" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", @@ -2519,6 +2398,35 @@ ], "time": "2016-11-23T20:04:58+00:00" }, + { + "name": "zendframework/zend-coding-standard", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-coding-standard.git", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework coding standard", + "keywords": [ + "Coding Standard", + "zf" + ], + "time": "2016-11-09T21:30:43+00:00" + }, { "name": "zendframework/zend-diactoros", "version": "1.4.0", From 4c393f1285a99ea986a7198c093d6900336e2c2b Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 17:14:15 +0100 Subject: [PATCH 13/19] Use namespaced PHPUnit import --- test/Exception/MiddlewareNotCallableExceptionTest.php | 2 +- test/Exception/ReachedFinalHandlerExceptionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Exception/MiddlewareNotCallableExceptionTest.php b/test/Exception/MiddlewareNotCallableExceptionTest.php index aad2b52f6..22997d377 100644 --- a/test/Exception/MiddlewareNotCallableExceptionTest.php +++ b/test/Exception/MiddlewareNotCallableExceptionTest.php @@ -9,7 +9,7 @@ namespace ZendTest\Mvc; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; use Zend\Mvc\Exception\MiddlewareNotCallableException; final class MiddlewareNotCallableExceptionTest extends TestCase diff --git a/test/Exception/ReachedFinalHandlerExceptionTest.php b/test/Exception/ReachedFinalHandlerExceptionTest.php index 703666a68..e82863432 100644 --- a/test/Exception/ReachedFinalHandlerExceptionTest.php +++ b/test/Exception/ReachedFinalHandlerExceptionTest.php @@ -9,7 +9,7 @@ namespace ZendTest\Mvc; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; use Zend\Mvc\Exception\ReachedFinalHandlerException; final class ReachedFinalHandlerExceptionTest extends TestCase From 03ffda0a03a601e5a696db69d313465ab1bf142b Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Fri, 28 Apr 2017 17:21:18 +0100 Subject: [PATCH 14/19] Use expectException instead of deprecated setExpectedException --- test/MiddlewareListenerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index 896621933..9778fdb5d 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -342,7 +342,7 @@ public function testNullMiddlewareThrowsInvalidArgument() $listener = new MiddlewareListener(); - $this->setExpectedException(\InvalidArgumentException::class); + $this->expectException(\InvalidArgumentException::class); $listener->onDispatch($event); } } From 4116803384b8408308b6a93df61df56aa92fc8ee Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 29 Apr 2017 07:48:35 +0700 Subject: [PATCH 15/19] Fixes @return DefaultRenderingStrategy typo at HttpDefaultRenderingStrategyFactory --- src/Service/HttpDefaultRenderingStrategyFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/HttpDefaultRenderingStrategyFactory.php b/src/Service/HttpDefaultRenderingStrategyFactory.php index 329cd0407..45c71c8ce 100644 --- a/src/Service/HttpDefaultRenderingStrategyFactory.php +++ b/src/Service/HttpDefaultRenderingStrategyFactory.php @@ -41,7 +41,7 @@ public function __invoke(ContainerInterface $container, $name, array $options = * For use with zend-servicemanager v2; proxies to __invoke(). * * @param ServiceLocatorInterface $container - * @return DefaultRendererStrategy + * @return DefaultRenderingStrategy */ public function createService(ServiceLocatorInterface $container) { @@ -53,7 +53,7 @@ public function createService(ServiceLocatorInterface $container) * * Uses layout template from configuration; if none available, defaults to "layout/layout". * - * @param DefaultRendererStrategy $strategy + * @param DefaultRenderingStrategy $strategy * @param array $config */ private function injectLayoutTemplate(DefaultRenderingStrategy $strategy, array $config) From 4dbdb4b311a271255b27812a4df6dad4be381801 Mon Sep 17 00:00:00 2001 From: James Titcumb Date: Sun, 30 Apr 2017 09:52:33 +0100 Subject: [PATCH 16/19] Use mocks instead of anon classes for middlewares --- test/MiddlewareListenerTest.php | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index 9778fdb5d..35b4ed87f 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -96,19 +96,10 @@ public function testSuccessfullyDispatchesHttpInteropMiddleware() { $expectedOutput = uniqid('expectedOutput', true); - $event = $this->createMvcEvent('path', new class($expectedOutput) implements MiddlewareInterface { - private $expectedOutput; + $middleware = $this->createMock(MiddlewareInterface::class); + $middleware->expects($this->once())->method('process')->willReturn(new HtmlResponse($expectedOutput)); - public function __construct($expectedOutput) - { - $this->expectedOutput = $expectedOutput; - } - - public function process(ServerRequestInterface $request, DelegateInterface $delegate) - { - return new HtmlResponse($this->expectedOutput); - } - }); + $event = $this->createMvcEvent('path', $middleware); $application = $event->getApplication(); $application->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function ($e) { @@ -169,13 +160,16 @@ public function testSuccessfullyDispatchesPipeOfCallableAndHttpInteropStyleMiddl $this->assertTrue(is_callable($next)); return $next($request->withAttribute('firstMiddlewareAttribute', 'firstMiddlewareValue'), $response); }); - $serviceManager->has('secondMiddleware')->willReturn(true); - $serviceManager->get('secondMiddleware')->willReturn(new class implements MiddlewareInterface { - public function process(ServerRequestInterface $request, DelegateInterface $delegate) - { + + $secondMiddleware = $this->createMock(MiddlewareInterface::class); + $secondMiddleware->expects($this->once()) + ->method('process') + ->willReturnCallback(function (ServerRequestInterface $request) { return new HtmlResponse($request->getAttribute('firstMiddlewareAttribute')); - } - }); + }); + + $serviceManager->has('secondMiddleware')->willReturn(true); + $serviceManager->get('secondMiddleware')->willReturn($secondMiddleware); $application = $this->prophesize(Application::class); $application->getEventManager()->willReturn($eventManager); From 7e5c5609c057da0a0e95e8ecd9a4d27bba9aa22f Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 1 May 2017 10:37:25 -0500 Subject: [PATCH 17/19] Added CHANGELOG for #237 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41ed2ab70..7f2f0d610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,10 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#237](https://github.com/zendframework/zend-mvc/pull/237) fixes the return + annotations for `HttpDefaultRenderingStrategyFactory::createService` and + `injectLayoutTemplate()` to be `HttpDefaultRenderingStrategy` and not + `HttpDefaultRendererStrategy`. ## 3.0.4 - 2016-12-20 From 6d09019d5bc87a22bdf0ca68f0de0c0c705477b1 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 1 May 2017 11:17:28 -0500 Subject: [PATCH 18/19] Rename MiddlewareNotCallableException to InvalidMiddlewareException Also, adds a `fromNull()` method, allowing it to be used in cases where a `null` value is provided for middleware. This means that `null` middleware is handled exactly the same way as any other invalid middleware type, which required changes to several test expectations. --- ...ion.php => InvalidMiddlewareException.php} | 8 +++++++- src/MiddlewareListener.php | 20 +++++++++---------- ...php => InvalidMiddlewareExceptionTest.php} | 19 +++++++++++++----- test/MiddlewareListenerTest.php | 11 +++++----- 4 files changed, 37 insertions(+), 21 deletions(-) rename src/Exception/{MiddlewareNotCallableException.php => InvalidMiddlewareException.php} (82%) rename test/Exception/{MiddlewareNotCallableExceptionTest.php => InvalidMiddlewareExceptionTest.php} (54%) diff --git a/src/Exception/MiddlewareNotCallableException.php b/src/Exception/InvalidMiddlewareException.php similarity index 82% rename from src/Exception/MiddlewareNotCallableException.php rename to src/Exception/InvalidMiddlewareException.php index 43c7b3e70..59bd669b7 100644 --- a/src/Exception/MiddlewareNotCallableException.php +++ b/src/Exception/InvalidMiddlewareException.php @@ -9,7 +9,7 @@ namespace Zend\Mvc\Exception; -final class MiddlewareNotCallableException extends RuntimeException +final class InvalidMiddlewareException extends RuntimeException { /** * @var string @@ -28,6 +28,12 @@ public static function fromMiddlewareName($middlewareName) return $instance; } + public static function fromNull() + { + $instance = new self('Middleware name cannot be null'); + return $instance; + } + /** * @return string */ diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index dea994641..0df2555a2 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -16,7 +16,7 @@ use Psr\Http\Message\ServerRequestInterface as PsrServerRequestInterface; use Zend\EventManager\AbstractListenerAggregate; use Zend\EventManager\EventManagerInterface; -use Zend\Mvc\Exception\MiddlewareNotCallableException; +use Zend\Mvc\Exception\InvalidMiddlewareException; use Zend\Mvc\Exception\ReachedFinalHandlerException; use Zend\Psr7Bridge\Psr7ServerRequest as Psr7Request; use Zend\Psr7Bridge\Psr7Response; @@ -63,12 +63,13 @@ public function onDispatch(MvcEvent $event) $psr7ResponsePrototype, is_array($middleware) ? $middleware : [$middleware] ); - } catch (MiddlewareNotCallableException $middlewareNotCallableException) { - $return = $this->marshalMiddlewareNotCallable( + } catch (InvalidMiddlewareException $invalidMiddlewareException) { + $return = $this->marshalInvalidMiddleware( $application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, - $middlewareNotCallableException->toMiddlewareName(), + $invalidMiddlewareException->toMiddlewareName(), $event, - $application + $application, + $invalidMiddlewareException ); $event->setResult($return); return $return; @@ -122,8 +123,7 @@ function (PsrServerRequestInterface $request, PsrResponseInterface $response) { * @param ResponseInterface $responsePrototype * @param array $middlewaresToBePiped * @return MiddlewarePipe - * @throws \InvalidArgumentException - * @throws \Zend\Mvc\Exception\MiddlewareNotCallableException + * @throws InvalidMiddlewareException */ private function createPipeFromSpec( ContainerInterface $serviceLocator, @@ -134,7 +134,7 @@ private function createPipeFromSpec( $pipe->setResponsePrototype($responsePrototype); foreach ($middlewaresToBePiped as $middlewareToBePiped) { if (null === $middlewareToBePiped) { - throw new \InvalidArgumentException('Middleware name cannot be null'); + throw InvalidMiddlewareException::fromNull(); } $middlewareName = is_string($middlewareToBePiped) ? $middlewareToBePiped : get_class($middlewareToBePiped); @@ -143,7 +143,7 @@ private function createPipeFromSpec( $middlewareToBePiped = $serviceLocator->get($middlewareToBePiped); } if (! $middlewareToBePiped instanceof MiddlewareInterface && ! is_callable($middlewareToBePiped)) { - throw MiddlewareNotCallableException::fromMiddlewareName($middlewareName); + throw InvalidMiddlewareException::fromMiddlewareName($middlewareName); } $pipe->pipe($middlewareToBePiped); @@ -161,7 +161,7 @@ private function createPipeFromSpec( * @param \Exception $exception * @return mixed */ - protected function marshalMiddlewareNotCallable( + protected function marshalInvalidMiddleware( $type, $middlewareName, MvcEvent $event, diff --git a/test/Exception/MiddlewareNotCallableExceptionTest.php b/test/Exception/InvalidMiddlewareExceptionTest.php similarity index 54% rename from test/Exception/MiddlewareNotCallableExceptionTest.php rename to test/Exception/InvalidMiddlewareExceptionTest.php index 22997d377..57376c699 100644 --- a/test/Exception/MiddlewareNotCallableExceptionTest.php +++ b/test/Exception/InvalidMiddlewareExceptionTest.php @@ -10,23 +10,32 @@ namespace ZendTest\Mvc; use PHPUnit\Framework\TestCase; -use Zend\Mvc\Exception\MiddlewareNotCallableException; +use Zend\Mvc\Exception\InvalidMiddlewareException; -final class MiddlewareNotCallableExceptionTest extends TestCase +final class InvalidMiddlewareExceptionTest extends TestCase { public function testFromMiddlewareName() { $middlewareName = uniqid('middlewareName', true); - $exception = MiddlewareNotCallableException::fromMiddlewareName($middlewareName); + $exception = InvalidMiddlewareException::fromMiddlewareName($middlewareName); - $this->assertInstanceOf(MiddlewareNotCallableException::class, $exception); + $this->assertInstanceOf(InvalidMiddlewareException::class, $exception); $this->assertSame('Cannot dispatch middleware ' . $middlewareName, $exception->getMessage()); $this->assertSame($middlewareName, $exception->toMiddlewareName()); } public function testToMiddlewareNameWhenNotSet() { - $exception = new MiddlewareNotCallableException(); + $exception = new InvalidMiddlewareException(); + $this->assertSame('', $exception->toMiddlewareName()); + } + + public function testFromNull() + { + $exception = InvalidMiddlewareException::fromNull(); + + $this->assertInstanceOf(InvalidMiddlewareException::class, $exception); + $this->assertSame('Middleware name cannot be null', $exception->getMessage()); $this->assertSame('', $exception->toMiddlewareName()); } } diff --git a/test/MiddlewareListenerTest.php b/test/MiddlewareListenerTest.php index 35b4ed87f..9a70cc31e 100644 --- a/test/MiddlewareListenerTest.php +++ b/test/MiddlewareListenerTest.php @@ -20,6 +20,7 @@ use Zend\Http\Request; use Zend\Http\Response; use Zend\Mvc\Application; +use Zend\Mvc\Exception\InvalidMiddlewareException; use Zend\Mvc\Exception\ReachedFinalHandlerException; use Zend\Mvc\MiddlewareListener; use Zend\Mvc\MvcEvent; @@ -305,7 +306,7 @@ public function testMiddlewareWithNothingPipedReachesFinalHandlerException() $this->assertEquals('FAILED', $return); } - public function testNullMiddlewareThrowsInvalidArgument() + public function testNullMiddlewareThrowsInvalidMiddlewareException() { $response = new Response(); $routeMatch = $this->prophesize(RouteMatch::class); @@ -329,14 +330,14 @@ public function testNullMiddlewareThrowsInvalidArgument() $event->setRouteMatch($routeMatch->reveal()); $event->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH_ERROR, function ($e) { - $this->assertEquals(Application::ERROR_EXCEPTION, $e->getError()); - $this->assertInstanceOf(ReachedFinalHandlerException::class, $e->getParam('exception')); + $this->assertEquals(Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH, $e->getError()); + $this->assertInstanceOf(InvalidMiddlewareException::class, $e->getParam('exception')); return 'FAILED'; }); $listener = new MiddlewareListener(); - $this->expectException(\InvalidArgumentException::class); - $listener->onDispatch($event); + $return = $listener->onDispatch($event); + $this->assertEquals('FAILED', $return); } } From 6a4bf9f65ce69833c0f8281cdc1905bd7bab694d Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 1 May 2017 11:23:48 -0500 Subject: [PATCH 19/19] Use http-interop process() Instead of `__invoke()`, for forwards compatibility once PSR-15 is ratified. --- src/MiddlewareListener.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/MiddlewareListener.php b/src/MiddlewareListener.php index 0df2555a2..3c3aaab62 100644 --- a/src/MiddlewareListener.php +++ b/src/MiddlewareListener.php @@ -21,6 +21,7 @@ use Zend\Psr7Bridge\Psr7ServerRequest as Psr7Request; use Zend\Psr7Bridge\Psr7Response; use Zend\Router\RouteMatch; +use Zend\Stratigility\Delegate\CallableDelegateDecorator; use Zend\Stratigility\MiddlewarePipe; class MiddlewareListener extends AbstractListenerAggregate @@ -81,13 +82,12 @@ public function onDispatch(MvcEvent $event) foreach ($routeMatch->getParams() as $key => $value) { $psr7Request = $psr7Request->withAttribute($key, $value); } - $return = $pipe( - $psr7Request, - $psr7ResponsePrototype, + $return = $pipe->process($psr7Request, new CallableDelegateDecorator( function (PsrServerRequestInterface $request, PsrResponseInterface $response) { throw ReachedFinalHandlerException::create(); - } - ); + }, + $psr7ResponsePrototype + )); } catch (\Throwable $ex) { $caughtException = $ex; } catch (\Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced