From 2470adde096729f798c81d58aa2fa63e00b5ece5 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 31 Mar 2016 11:37:05 -0500 Subject: [PATCH 01/59] Bumped to next dev version (3.0.1) --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6690d8..5ebe0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.0.1 - TBD + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 3.0.0 - 2015-03-31 First release as a standalone component. Previous releases were as part of From 5f4c21a7b6448ab23acf025361650b5da45fd4f6 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 31 Mar 2016 11:38:22 -0500 Subject: [PATCH 02/59] Bumped version --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ebe0dd..4efafce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.1.0 - TBD + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 3.0.1 - TBD ### Added From b726b934bcdb2e7a434e3829754bd4960d178fc1 Mon Sep 17 00:00:00 2001 From: SpiLLeR Date: Sat, 23 Apr 2016 21:50:58 +0300 Subject: [PATCH 03/59] Fix type juggling If $key is int with value 0, we have true result for condition. It's wrong. --- src/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Response.php b/src/Response.php index f8b9ff8..d05fae6 100644 --- a/src/Response.php +++ b/src/Response.php @@ -74,7 +74,7 @@ public function setOptions(array $options) continue; } - if ($key == 'jsonrpc') { + if ('jsonrpc' == $key) { $this->setVersion($value); continue; } From c399dd3304cb3d1a7b9f8aa76256ff724aec2dd8 Mon Sep 17 00:00:00 2001 From: malinink Date: Thu, 5 May 2016 11:42:26 +0300 Subject: [PATCH 04/59] add new class for server methods testing --- test/TestAsset/FooParameters.php | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/TestAsset/FooParameters.php diff --git a/test/TestAsset/FooParameters.php b/test/TestAsset/FooParameters.php new file mode 100644 index 0000000..cab4e6f --- /dev/null +++ b/test/TestAsset/FooParameters.php @@ -0,0 +1,39 @@ + Date: Thu, 5 May 2016 11:48:21 +0300 Subject: [PATCH 05/59] add tests for issue #3 --- test/ServerTest.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/ServerTest.php b/test/ServerTest.php index b28a1c2..039639a 100644 --- a/test/ServerTest.php +++ b/test/ServerTest.php @@ -14,6 +14,7 @@ use Zend\Json; use Zend\Json\Server\Request; use Zend\Json\Server\Response; +use Zend\Json\Server\Error; use Zend\Server\Reflection\Exception\RuntimeException; class ServerTest extends TestCase @@ -528,4 +529,32 @@ public function testHandleWithNamedParamsShouldSetMissingDefaults2() $this->assertEquals('two', $result[1]); $this->assertEquals(3, $result[2]); } + + public function testResponseShouldBeInvalidWhenRequestHasLessRequiredParametersPassedWithoutKeys() + { + $server = $this->server; + $server->setClass(TestAsset\FooParameters::class); + $server->setReturnResponse(true); + $request = $server->getRequest(); + $request->setMethod('bar') + ->setParams([true]); + $server->handle(); + + $response = $server->getResponse(); + $this->assertEquals($response->getError()->getCode(), Error::ERROR_INVALID_PARAMS); + } + + public function testResponseShouldBeInvalidWhenRequestHasLessRequiredParametersPassedWithoutKeys1() + { + $server = $this->server; + $server->setClass(TestAsset\FooParameters::class); + $server->setReturnResponse(true); + $request = $server->getRequest(); + $request->setMethod('baz') + ->setParams([true]); + $server->handle(); + $response = $server->getResponse(); + $this->assertNotEmpty($response->getError()); + $this->assertEquals($response->getError()->getCode(), Error::ERROR_INVALID_PARAMS); + } } From 7d3300db5e745773102f09bca8981d8688230660 Mon Sep 17 00:00:00 2001 From: malinink Date: Thu, 5 May 2016 11:54:36 +0300 Subject: [PATCH 06/59] add required parameters check --- src/Server.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Server.php b/src/Server.php index dbd6a70..7ccd76a 100644 --- a/src/Server.php +++ b/src/Server.php @@ -577,12 +577,13 @@ protected function handleRequest() $service = $serviceMap->getService($method); $serviceParams = $service->getParams(); - if (count($params) < count($serviceParams)) { - $params = $this->getDefaultParams($params, $serviceParams); - } // Make sure named parameters are passed in correct order. if (is_string(key($params))) { + if (count($params) < count($serviceParams)) { + $params = $this->getDefaultParams($params, $serviceParams); + } + $callback = $invokable->getCallback(); if ('function' == $callback->getType()) { $reflection = new ReflectionFunction($callback->getFunction()); @@ -609,6 +610,17 @@ protected function handleRequest() } $params = $orderedParams; + } else { + $requiredParamsCount = 0; + foreach ($serviceParams as $param) { + if (!$param['optional']) { + $requiredParamsCount++; + } + } + + if (count($params) < $requiredParamsCount) { + return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS); + } } try { From 43270d34855f6565156c6e8984f5414949800beb Mon Sep 17 00:00:00 2001 From: Don Koopa Date: Tue, 21 Jun 2016 23:46:10 +0200 Subject: [PATCH 07/59] src_dir is deprecated --- .coveralls.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.coveralls.yml b/.coveralls.yml index 53bda82..bc71b62 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,3 +1,2 @@ coverage_clover: clover.xml json_path: coveralls-upload.json -src_dir: src From 77cebf12dba011004a10ed67559ffb3029317f99 Mon Sep 17 00:00:00 2001 From: digitronac Date: Wed, 27 Jul 2016 16:54:20 +0000 Subject: [PATCH 08/59] default headers will not override those set by user anymore --- src/Client.php | 14 ++++++++++---- test/ClientTest.php | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/Client.php b/src/Client.php index 02f9ebd..6ea17c1 100644 --- a/src/Client.php +++ b/src/Client.php @@ -117,11 +117,16 @@ public function doRequest($request) $this->httpClient->setUri($this->serverAddress); } + // set default Accept and Content-Type headers unless already set $headers = $httpRequest->getHeaders(); - $headers->addHeaders([ - 'Content-Type' => 'application/json', - 'Accept' => 'application/json', - ]); + $headersToAdd = []; + if(!$headers->has('Content-Type')) { + $headersToAdd['Content-Type'] = 'application/json-rpc'; + } + if (!$headers->has('Accept')) { + $headersToAdd['Accept'] = 'application/json-rpc'; + } + $headers->addHeaders($headersToAdd); if (! $headers->get('User-Agent')) { $headers->addHeaderLine('User-Agent', 'Zend_Json_Server_Client'); @@ -188,4 +193,5 @@ protected function createRequest($method, array $params) ->setId(++$this->id); return $request; } + } diff --git a/test/ClientTest.php b/test/ClientTest.php index 64e3106..f3e582d 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -14,6 +14,7 @@ use Zend\Json\Server\Error; use Zend\Json\Server\Request; use Zend\Json\Server\Response; +use Zend\Http\Response as HttpResponse; class ClientTest extends TestCase { @@ -233,6 +234,41 @@ public function setServerResponseTo($nativeVars) $this->httpAdapter->setResponse($response); } + public function testClientShouldSetDefaultAcceptAndContentTypeHeadersOnRequest() + { + $request = new Request(); + $response = new HttpResponse(); + $response->setContent(\Zend\Json\Json::encode(['test' => 'test'])); + $testAdapter = new TestAdapter(); + $testAdapter->setResponse($response); + $jsonClient = new Client('http://foo'); + $jsonClient->getHttpClient()->setAdapter($testAdapter); + $jsonClient->doRequest($request); + $this->assertSame('application/json-rpc', $jsonClient->getHttpClient()->getHeader('Content-Type')); + $this->assertSame('application/json-rpc', $jsonClient->getHttpClient()->getHeader('Accept')); + } + + public function testClientShouldNotSetDefaultAcceptAndContentTypeHeadersOnRequestIfTheyAlreadyExist() + { + $request = new Request(); + $response = new HttpResponse(); + $response->setContent(\Zend\Json\Json::encode(['test' => 'test'])); + $testAdapter = new TestAdapter(); + $testAdapter->setResponse($response); + + $httpClient = new HttpClient(); + $httpClient->setHeaders([ + 'Content-Type' => 'application/jsonrequest', + 'Accept' => 'application/jsonrequest', + ]); + + $jsonClient = new Client('http://foo', $httpClient); + $jsonClient->getHttpClient()->setAdapter($testAdapter); + $jsonClient->doRequest($request); + $this->assertSame('application/jsonrequest', $jsonClient->getHttpClient()->getHeader('Content-Type')); + $this->assertSame('application/jsonrequest', $jsonClient->getHttpClient()->getHeader('Accept')); + } + public function getServerResponseFor($nativeVars) { $response = new Response(); From 27f359c19cb9245967e4447b71daaf6a63f518dd Mon Sep 17 00:00:00 2001 From: digitronac Date: Wed, 27 Jul 2016 17:13:14 +0000 Subject: [PATCH 09/59] fixed CS violations --- src/Client.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 6ea17c1..8a1abe7 100644 --- a/src/Client.php +++ b/src/Client.php @@ -120,7 +120,7 @@ public function doRequest($request) // set default Accept and Content-Type headers unless already set $headers = $httpRequest->getHeaders(); $headersToAdd = []; - if(!$headers->has('Content-Type')) { + if (!$headers->has('Content-Type')) { $headersToAdd['Content-Type'] = 'application/json-rpc'; } if (!$headers->has('Accept')) { @@ -193,5 +193,4 @@ protected function createRequest($method, array $params) ->setId(++$this->id); return $request; } - } From 68f75d462ad67754216ed1f80638ffcd95415507 Mon Sep 17 00:00:00 2001 From: Don Koopa Date: Thu, 15 Sep 2016 23:15:46 +0200 Subject: [PATCH 10/59] Remove fast_finish flag It has been confirmed that the fast_finish flag is responsible for triggering multiple build notifications on #zftalk.dev. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0725a0..a3f729d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ env: - secure: "HY4Zd9s8DQ1Qp2Ru2RwnTY67CxQ0ckdpBlt02QXvIKh8HMjwb5EochsQv0uj1Q2c5WigBLIHKN3Tv4WoCkSncDBsPR242vC02X9v78ZOZRirsicw/PES4cQ67/qT+biFXeM3wW9ME4DbSAcV5esL934wN99fCfNoPGkCLpL7LoNFUKf7medLJ72xulNP7mXpQOQCPBuB9ZixtItCO/DW9XouZ32ckoPjJiM6FSPszVbMyItK2+rNWjQ9BsxIGQsdPoX+jths8oHrTJJ5jabFNh527Az+n3kPhHLXy1CpU8CMSXSXEFOLxeJfMgVw4XbsKFarKqVcRvsSVPo4M6NFHUNX7SmT9p0DxfMDbc2avhp8CfSuvn675wKLwg3P2htwB41eB6XkOwwE0PTcsDBCbk0Y2JHyEp5KTTbwUSSUNU3ISpGUO+KBU82dyeiTb/YPBmA5yFE9UgxGDcI7UqReqQNamNFkI2ns4OjCwIH0X1fzIb2OAA7wvOGKib9N/FP9dz+gXJ59cH0YRAeA4Kob0N3WqjMHF4noiBCkGiCUIUHr2Bi9ceZnf4qDEKxbp3MFN7nKdfgiJQ1aU9ZLvjqhYCsW/8mx+7KNtjRF5tUtMQDrsJXt34pIoPmj0IudJQQx98xAPpWpZx7Czbrd53dkwEzqdcTHDMS3bfuqIKcrp60=" matrix: - fast_finish: true include: - php: 5.5 env: From e001f4b8fac7f78c507d1291c3e4ad7b00b49ac5 Mon Sep 17 00:00:00 2001 From: Koopzington Date: Sun, 13 Nov 2016 16:12:14 +0100 Subject: [PATCH 11/59] Remove CS dependencies and add zend-coding-standard to require-dev --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 6e72e7a..cf4b287 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,8 @@ "zendframework/zend-server": "^2.6.1" }, "require-dev": { - "squizlabs/php_codesniffer": "^2.3", - "phpunit/PHPUnit": "~4.0" + "phpunit/PHPUnit": "~4.0", + "zendframework/zend-coding-standard": "~1.0.0" }, "autoload": { "psr-4": { From 1d22c0cccf029881e753fb57e9e60688d21b4a0c Mon Sep 17 00:00:00 2001 From: Koopzington Date: Sun, 13 Nov 2016 20:06:56 +0100 Subject: [PATCH 12/59] add/update phpcs.xml --- phpcs.xml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index e994eae..c48d19c 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,19 +1,6 @@ - Zend Framework coding standard - - - - - - - - - - - - - + src From 2cea3c5eda7a03fb0a2dce9e7c4268d0ddebb289 Mon Sep 17 00:00:00 2001 From: Koopzington Date: Sun, 13 Nov 2016 20:41:35 +0100 Subject: [PATCH 13/59] Use composer scripts in .travis.yml --- .travis.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0725a0..ce4870f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,10 +30,10 @@ matrix: - PATH="$HOME/.local/bin:$PATH" - php: 5.6 env: - - EXECUTE_TEST_COVERALLS=true + - TEST_COVERAGE=true - php: 7 env: - - EXECUTE_CS_CHECK=true + - CS_CHECK=true - php: hhvm allow_failures: - php: hhvm @@ -43,21 +43,20 @@ notifications: email: false before_install: - - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi + - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - travis_retry composer self-update - - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi install: - travis_retry composer install --no-interaction --ignore-platform-reqs script: - - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer test-coverage ; fi - - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then composer test ; fi - - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then composer cs-check ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi + - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi - if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi after_success: - if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi after_script: - - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer upload-coverage ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi From 36e31d411074e1fed816a723f2930bc5e165bfd8 Mon Sep 17 00:00:00 2001 From: Koopzington Date: Sun, 13 Nov 2016 20:43:19 +0100 Subject: [PATCH 14/59] Replace mentions of php-cs-fixer with phpcs --- CONTRIBUTING.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44ae18e..f353425 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,24 +77,24 @@ To do so: ## Running Coding Standards Checks -This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding +This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding standards checks, and provides configuration for our selected checks. -`php-cs-fixer` is installed by default via Composer. +`phpcs` is installed by default via Composer. To run checks only: ```console -$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs +$ ./vendor/bin/phpcs ``` -To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run` -flag: +`phpcs` also includes a tool for fixing most CS violations, `phpcbf`: + ```console -$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs +$ ./vendor/bin/phpcbf ``` -If you allow php-cs-fixer to fix CS issues, please re-run the tests to ensure +If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions From 83e4dd3986998ddb82c9bfcbd84a477897e76338 Mon Sep 17 00:00:00 2001 From: Koopzington Date: Sun, 13 Nov 2016 21:24:48 +0100 Subject: [PATCH 15/59] CS fixes --- test/CacheTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CacheTest.php b/test/CacheTest.php index 316acee..fe2e7ff 100644 --- a/test/CacheTest.php +++ b/test/CacheTest.php @@ -25,7 +25,7 @@ public function setUp() $this->cacheFile = tempnam(sys_get_temp_dir(), 'zjs'); // if (!is_writeable(__DIR__)) { - if (!is_writeable($this->cacheFile)) { + if (! is_writeable($this->cacheFile)) { $this->markTestSkipped('Cannot write test caches due to permissions'); } From bf5e2e3aec62788419f7173baa6705ce0241618d Mon Sep 17 00:00:00 2001 From: Koopzington Date: Tue, 15 Nov 2016 19:32:23 +0100 Subject: [PATCH 16/59] Replace mentions of phpcs and phpcbf with composer scripts --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f353425..f5c2046 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,14 +84,14 @@ standards checks, and provides configuration for our selected checks. To run checks only: ```console -$ ./vendor/bin/phpcs +$ composer cs-check ``` `phpcs` also includes a tool for fixing most CS violations, `phpcbf`: ```console -$ ./vendor/bin/phpcbf +$ composer cs-fix ``` If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure From ca67d3b6e37b27c6780f5a89ff7f2f7f0fe65c29 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:17:39 +0000 Subject: [PATCH 17/59] Renamed documentation directory: doc -> docs --- .gitignore | 2 +- {doc => docs}/book/error.md | 0 {doc => docs}/book/index.html | 0 {doc => docs}/book/index.md | 0 {doc => docs}/book/intro.md | 0 {doc => docs}/book/request.md | 0 {doc => docs}/book/response.md | 0 {doc => docs}/book/server.md | 0 {doc => docs}/book/smd.md | 0 {doc => docs}/book/usage.md | 0 {doc => docs}/bookdown.json | 0 mkdocs.yml | 4 ++-- 12 files changed, 3 insertions(+), 3 deletions(-) rename {doc => docs}/book/error.md (100%) rename {doc => docs}/book/index.html (100%) rename {doc => docs}/book/index.md (100%) rename {doc => docs}/book/intro.md (100%) rename {doc => docs}/book/request.md (100%) rename {doc => docs}/book/response.md (100%) rename {doc => docs}/book/server.md (100%) rename {doc => docs}/book/smd.md (100%) rename {doc => docs}/book/usage.md (100%) rename {doc => docs}/bookdown.json (100%) diff --git a/.gitignore b/.gitignore index d41a109..1b0e451 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ .*.sw* .*.un~ nbproject -doc/html/ +docs/html/ tmp/ vendor/ zf-mkdoc-theme/ diff --git a/doc/book/error.md b/docs/book/error.md similarity index 100% rename from doc/book/error.md rename to docs/book/error.md diff --git a/doc/book/index.html b/docs/book/index.html similarity index 100% rename from doc/book/index.html rename to docs/book/index.html diff --git a/doc/book/index.md b/docs/book/index.md similarity index 100% rename from doc/book/index.md rename to docs/book/index.md diff --git a/doc/book/intro.md b/docs/book/intro.md similarity index 100% rename from doc/book/intro.md rename to docs/book/intro.md diff --git a/doc/book/request.md b/docs/book/request.md similarity index 100% rename from doc/book/request.md rename to docs/book/request.md diff --git a/doc/book/response.md b/docs/book/response.md similarity index 100% rename from doc/book/response.md rename to docs/book/response.md diff --git a/doc/book/server.md b/docs/book/server.md similarity index 100% rename from doc/book/server.md rename to docs/book/server.md diff --git a/doc/book/smd.md b/docs/book/smd.md similarity index 100% rename from doc/book/smd.md rename to docs/book/smd.md diff --git a/doc/book/usage.md b/docs/book/usage.md similarity index 100% rename from doc/book/usage.md rename to docs/book/usage.md diff --git a/doc/bookdown.json b/docs/bookdown.json similarity index 100% rename from doc/bookdown.json rename to docs/bookdown.json diff --git a/mkdocs.yml b/mkdocs.yml index f87c9cf..a5584bd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ -docs_dir: doc/book -site_dir: doc/html +docs_dir: docs/book +site_dir: docs/html pages: - index.md - Intro: intro.md From cb59c96dea8c4897729a0c9f150e8ad0f7819856 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:18:44 +0000 Subject: [PATCH 18/59] Moved all support files into docs directory and added SUPPORT.md --- CONDUCT.md => docs/CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md => docs/CONTRIBUTING.md | 91 +++++++------------------ docs/SUPPORT.md | 25 +++++++ 3 files changed, 49 insertions(+), 69 deletions(-) rename CONDUCT.md => docs/CODE_OF_CONDUCT.md (96%) rename CONTRIBUTING.md => docs/CONTRIBUTING.md (54%) create mode 100644 docs/SUPPORT.md diff --git a/CONDUCT.md b/docs/CODE_OF_CONDUCT.md similarity index 96% rename from CONDUCT.md rename to docs/CODE_OF_CONDUCT.md index c663d2b..02fafcd 100644 --- a/CONDUCT.md +++ b/docs/CODE_OF_CONDUCT.md @@ -1,6 +1,6 @@ # Contributor Code of Conduct -The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +This project adheres to [The Code Manifesto](http://codemanifesto.com) as its guidelines for contributor interactions. ## The Code Manifesto diff --git a/CONTRIBUTING.md b/docs/CONTRIBUTING.md similarity index 54% rename from CONTRIBUTING.md rename to docs/CONTRIBUTING.md index f5c2046..3f88687 100644 --- a/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -2,73 +2,43 @@ ## RESOURCES -If you wish to contribute to Zend Framework, please be sure to +If you wish to contribute to this project, please be sure to read/subscribe to the following resources: - - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - - [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) - - ZF Contributor's mailing list: - Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html - Subscribe: zf-contributors-subscribe@lists.zend.com - - ZF Contributor's IRC channel: - #zftalk.dev on Freenode.net + - [Coding Standards](https://github.com/zendframework/zend-coding-standard) + - [Forums](https://discourse.zendframework.com/c/contributors) + - [Slack](https://zendframework-slack.herokuapp.com) + - [Code of Conduct](CODE_OF_CONDUCT.md) -If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-json-server/issues/new). - -## Reporting Potential Security Issues - -If you have encountered a potential security vulnerability, please **DO NOT** report it on the public -issue tracker: send it to us at [zf-security@zend.com](mailto:zf-security@zend.com) instead. -We will work with you to verify the vulnerability and patch it as soon as possible. - -When reporting issues, please provide the following information: - -- Component(s) affected -- A description indicating how to reproduce the issue -- A summary of the security vulnerability and impact - -We request that you contact us via the email address above and give the project -contributors a chance to resolve the vulnerability and issue a new release prior -to any public exposure; this helps protect users and provides them with a chance -to upgrade and/or update in order to protect their applications. - -For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). +If you are working on new features or refactoring +[create a proposal](https://github.com/zendframework/zend-json-server/issues/new). ## RUNNING TESTS -> ### Note: testing versions prior to 2.4 -> -> This component originates with Zend Framework 2. During the lifetime of ZF2, -> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no -> changes were necessary. However, due to the migration, tests may not run on -> versions < 2.4. As such, you may need to change the PHPUnit dependency if -> attempting a fix on such a version. - To run tests: - Clone the repository: ```console - $ git clone git@github.com:zendframework/zend-json-server.git - $ cd + $ git clone git://github.com/zendframework/zend-json-server.git + $ cd zend-json-server ``` - Install dependencies via composer: ```console - $ curl -sS https://getcomposer.org/installer | php -- - $ ./composer.phar install + $ composer install ``` - If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ + If you don't have `composer` installed, please download it from https://getcomposer.org/download/ -- Run the tests via `phpunit` and the provided PHPUnit config, like in this example: +- Run the tests using the "test" command shipped in the `composer.json`: ```console - $ ./vendor/bin/phpunit + $ composer test ``` -You can turn on conditional tests with the phpunit.xml file. +You can turn on conditional tests with the `phpunit.xml` file. To do so: - Copy `phpunit.xml.dist` file to `phpunit.xml` @@ -77,24 +47,22 @@ To do so: ## Running Coding Standards Checks -This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding -standards checks, and provides configuration for our selected checks. -`phpcs` is installed by default via Composer. +First, ensure you've installed dependencies via composer, per the previous +section on running tests. -To run checks only: +To run CS checks only: ```console $ composer cs-check ``` -`phpcs` also includes a tool for fixing most CS violations, `phpcbf`: - +To attempt to automatically fix common CS issues: ```console $ composer cs-fix ``` -If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure +If the above fixes any CS issues, please re-run the tests to ensure they pass, and make sure you add and commit the changes after verification. ## Recommended Workflow for Contributions @@ -103,12 +71,12 @@ Your first step is to establish a public repository from which we can pull your work into the master repository. We recommend using [GitHub](https://github.com), as that is where the component is already hosted. -1. Setup a [GitHub account](http://github.com/), if you haven't yet -2. Fork the repository (http://github.com/zendframework/zend-json-server) +1. Setup a [GitHub account](https://github.com/), if you haven't yet +2. Fork the repository (https://github.com/zendframework/zend-json-server) 3. Clone the canonical repository locally and enter it. ```console - $ git clone git://github.com:zendframework/zend-json-server.git + $ git clone git://github.com/zendframework/zend-json-server.git $ cd zend-json-server ``` @@ -188,15 +156,7 @@ To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user/organization -"zendframework" as the recipient. - -If using your own repository - or even if using GitHub - you can use `git -format-patch` to create a patchset for us to apply; in fact, this is -**recommended** for security-related patches. If you use `format-patch`, please -send the patches as attachments to: - -- zf-devteam@zend.com for patches without security implications -- zf-security@zend.com for security patches +"zendframework" (or whatever the upstream organization is) as the recipient. #### What branch to issue the pull request against? @@ -227,8 +187,3 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` - - -## Conduct - -Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 0000000..391c8ab --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,25 @@ +# Getting Support + +Zend Framework offers three support channels: + +- For real-time questions, use our + [Slack](https://zendframework-slack.herokuapp.com) +- For detailed questions (e.g., those requiring examples) use our + [forums](https://discourse.zendframework.com/c/questions/components) +- To report issues, use this repository's + [issue tracker](https://github.com/zendframework/zend-json-server/issues/new) + +**DO NOT** use the issue tracker to ask questions; use Slack or the forums for +that. Questions posed to the issue tracker will be closed. + +When reporting an issue, please include the following details: + +- A narrative description of what you are trying to accomplish. +- The minimum code necessary to reproduce the issue. +- The expected results of exercising that code. +- The actual results received. + +We may ask for additional details: what version of the library you are using, +and what PHP version was used to reproduce the issue. + +You may also submit a failing test case as a pull request. From 935ab68a5d32d9b889478226524dba72924bc779 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:20:13 +0000 Subject: [PATCH 19/59] Updated .gitattributes --- .gitattributes | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitattributes b/.gitattributes index ea5703b..6669e71 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,10 @@ +/docs export-ignore /test export-ignore -/vendor export-ignore -.coveralls.yml export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -phpcs.xml export-ignore -phpunit.xml.dist export-ignore +/.coveralls.yml export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/composer.lock export-ignore +/mkdocs.yml export-ignore +/phpcs.xml export-ignore +/phpunit.xml.dist export-ignore From 753450d421b97c7d0d5bd8a810c86c071f369b62 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:20:31 +0000 Subject: [PATCH 20/59] Updated .gitignore - removed all IDE/OS specific files/dirs --- .gitignore | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 1b0e451..9e68500 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,7 @@ -.buildpath -.DS_Store -.idea -.project -.settings/ -.*.sw* -.*.un~ -nbproject docs/html/ -tmp/ vendor/ zf-mkdoc-theme/ - clover.xml -composer.lock coveralls-upload.json phpunit.xml +zf-mkdoc-theme.tgz From 6c939308c692f52d89d8379e625092dadfbdc6b1 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:21:29 +0000 Subject: [PATCH 21/59] Updated Travis CI configuration - removed documentation deployment - added PHP 7.1 and PHP 7.2 builds - removed HHVM builds - disabled IRC notifications --- .travis.yml | 75 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 070d97c..66d5e50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,60 +2,75 @@ sudo: false language: php -branches: - except: - - /^release-.*$/ - - /^ghgfk-.*$/ - cache: directories: - $HOME/.composer/cache - - $HOME/.local - - zf-mkdoc-theme env: global: - - SITE_URL=https://zendframework.github.io/zend-json-server - - GH_USER_NAME="Matthew Weier O'Phinney" - - GH_USER_EMAIL=matthew@weierophinney.net - - GH_REF=github.com/zendframework/zend-json-server.git - - secure: "HY4Zd9s8DQ1Qp2Ru2RwnTY67CxQ0ckdpBlt02QXvIKh8HMjwb5EochsQv0uj1Q2c5WigBLIHKN3Tv4WoCkSncDBsPR242vC02X9v78ZOZRirsicw/PES4cQ67/qT+biFXeM3wW9ME4DbSAcV5esL934wN99fCfNoPGkCLpL7LoNFUKf7medLJ72xulNP7mXpQOQCPBuB9ZixtItCO/DW9XouZ32ckoPjJiM6FSPszVbMyItK2+rNWjQ9BsxIGQsdPoX+jths8oHrTJJ5jabFNh527Az+n3kPhHLXy1CpU8CMSXSXEFOLxeJfMgVw4XbsKFarKqVcRvsSVPo4M6NFHUNX7SmT9p0DxfMDbc2avhp8CfSuvn675wKLwg3P2htwB41eB6XkOwwE0PTcsDBCbk0Y2JHyEp5KTTbwUSSUNU3ISpGUO+KBU82dyeiTb/YPBmA5yFE9UgxGDcI7UqReqQNamNFkI2ns4OjCwIH0X1fzIb2OAA7wvOGKib9N/FP9dz+gXJ59cH0YRAeA4Kob0N3WqjMHF4noiBCkGiCUIUHr2Bi9ceZnf4qDEKxbp3MFN7nKdfgiJQ1aU9ZLvjqhYCsW/8mx+7KNtjRF5tUtMQDrsJXt34pIoPmj0IudJQQx98xAPpWpZx7Czbrd53dkwEzqdcTHDMS3bfuqIKcrp60=" + - COMPOSER_ARGS="--no-interaction" + - COVERAGE_DEPS="satooshi/php-coveralls" matrix: include: - - php: 5.5 + - php: 5.6 env: - - DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)" - - PATH="$HOME/.local/bin:$PATH" + - DEPS=lowest - php: 5.6 env: - - TEST_COVERAGE=true + - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" + - php: 5.6 + env: + - DEPS=latest + - php: 7 + env: + - DEPS=lowest + - php: 7 + env: + - DEPS=locked + - LEGACY_DEPS="phpunit/phpunit" - php: 7 env: + - DEPS=latest + - php: 7.1 + env: + - DEPS=lowest + - php: 7.1 + env: + - DEPS=locked - CS_CHECK=true - - php: hhvm - allow_failures: - - php: hhvm - -notifications: - irc: "irc.freenode.org#zftalk.dev" - email: false + - TEST_COVERAGE=true + - php: 7.1 + env: + - DEPS=latest + - php: 7.2 + env: + - DEPS=lowest + - php: 7.2 + env: + - DEPS=locked + - php: 7.2 + env: + - DEPS=latest before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - - travis_retry composer self-update - - if [[ $TEST_COVERAGE == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi install: - - travis_retry composer install --no-interaction --ignore-platform-reqs + - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs + - if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi + - if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi + - if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi + - stty cols 120 && composer show script: - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi - - if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi - -after_success: - - if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi after_script: - if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi + +notifications: + email: false From fdb7919d2e75ef4c5db8a669776dfc3f2413fbbf Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:21:53 +0000 Subject: [PATCH 22/59] Updated year in LICENSE.md and mkdocs.yml --- LICENSE.md | 12 ++++++------ mkdocs.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index dbb1b49..3846b8c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,16 +1,16 @@ -Copyright (c) 2005-2015, Zend Technologies USA, Inc. +Copyright (c) 2005-2017, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. +- Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. - Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this diff --git a/mkdocs.yml b/mkdocs.yml index a5584bd..5d92dc2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,4 +13,4 @@ pages: site_name: zend-json-server site_description: Zend\Json\Server repo_url: 'https://github.com/zendframework/zend-json-server' -copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2016-2017 Zend Technologies USA Inc.' From 2ffc139f1bff995e665f869dca31bb0634ce8c9f Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:22:02 +0000 Subject: [PATCH 23/59] Updated PHPUnit configuration --- phpunit.xml.dist | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fa74714..b4e59f1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,34 +1,17 @@ - ./test/ + ./test - - - disable - - - - + ./src - - - - - - - - From 63c9003fde2e2c40aa59cb31b0f5659d50b83fd1 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:25:44 +0000 Subject: [PATCH 24/59] Updated composer skeleton and dependencies + added composer.lock --- composer.json | 49 +- composer.lock | 2167 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2197 insertions(+), 19 deletions(-) create mode 100644 composer.lock diff --git a/composer.json b/composer.json index cf4b287..303d5c2 100644 --- a/composer.json +++ b/composer.json @@ -3,26 +3,28 @@ "description": "Zend Json-Server is a JSON-RPC server implementation.", "license": "BSD-3-Clause", "keywords": [ - "zf2", + "zf", + "zendframework", "json", "server", "json-server" ], - "homepage": "https://github.com/zendframework/zend-json-server", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" - } + "support": { + "docs": "https://docs.zendframework.com/zend-json-server/", + "issues": "https://github.com/zendframework/zend-json-server/issues", + "source": "https://github.com/zendframework/zend-json-server", + "rss": "https://github.com/zendframework/zend-json-server/releases.atom", + "slack": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/components" }, "require": { - "php": "^5.5 || ^7.0", + "php": "^5.6 || ^7.0", + "zendframework/zend-http": "^2.7", "zendframework/zend-json": "^2.6.1 || ^3.0", - "zendframework/zend-http": "^2.5.4", - "zendframework/zend-server": "^2.6.1" + "zendframework/zend-server": "^2.7" }, "require-dev": { - "phpunit/PHPUnit": "~4.0", + "phpunit/phpunit": "^5.7.23 || ^6.4.3", "zendframework/zend-coding-standard": "~1.0.0" }, "autoload": { @@ -31,22 +33,31 @@ } }, "autoload-dev": { - "psr-4": { - "ZendTest\\Json\\Server\\": "test/" - }, "files": [ "test/TestAsset/FooFunc.php" - ] + ], + "psr-4": { + "ZendTest\\Json\\Server\\": "test/" + } + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" + } }, "scripts": { "check": [ "@cs-check", "@test" ], - "upload-coverage": "coveralls", "cs-check": "phpcs", - "cs-fix": "phpcbf fix -v", - "test": "phpunit", - "test-coverage": "phpunit --coverage-clover clover.xml" + "cs-fix": "phpcbf", + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", + "upload-coverage": "coveralls -v" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..f2ec946 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2167 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "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": "a6d2888c1f8ba831f35d954f59db3c3e", + "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "zendframework/zend-code", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-code.git", + "reference": "6b1059db5b368db769e4392c6cb6cc139e56640d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/6b1059db5b368db769e4392c6cb6cc139e56640d", + "reference": "6b1059db5b368db769e4392c6cb6cc139e56640d", + "shasum": "" + }, + "require": { + "php": "^7.1", + "zendframework/zend-eventmanager": "^2.6 || ^3.0" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "zendframework/zend-coding-standard": "^1.0.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "suggest": { + "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", + "zendframework/zend-stdlib": "Zend\\Stdlib component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Code\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides facilities to generate arbitrary code using an object oriented interface", + "homepage": "https://github.com/zendframework/zend-code", + "keywords": [ + "code", + "zf2" + ], + "time": "2017-10-20T15:21:32+00:00" + }, + { + "name": "zendframework/zend-escaper", + "version": "2.5.2", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Escaper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-escaper", + "keywords": [ + "escaper", + "zf2" + ], + "time": "2016-06-30T19:48:38+00:00" + }, + { + "name": "zendframework/zend-eventmanager", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-eventmanager.git", + "reference": "9d72db10ceb6e42fb92350c0cb54460da61bd79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/9d72db10ceb6e42fb92350c0cb54460da61bd79c", + "reference": "9d72db10ceb6e42fb92350c0cb54460da61bd79c", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "athletic/athletic": "^0.1", + "container-interop/container-interop": "^1.1.0", + "phpunit/phpunit": "^6.0.7 || ^5.7.14", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-stdlib": "^2.7.3 || ^3.0" + }, + "suggest": { + "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", + "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Trigger and listen to events within a PHP application", + "homepage": "https://github.com/zendframework/zend-eventmanager", + "keywords": [ + "event", + "eventmanager", + "events", + "zf2" + ], + "time": "2017-07-11T19:17:22+00:00" + }, + { + "name": "zendframework/zend-http", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-http.git", + "reference": "78aa510c0ea64bfb2aa234f50c4f232c9531acfa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-http/zipball/78aa510c0ea64bfb2aa234f50c4f232c9531acfa", + "reference": "78aa510c0ea64bfb2aa234f50c4f232c9531acfa", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "zendframework/zend-loader": "^2.5.1", + "zendframework/zend-stdlib": "^3.1 || ^2.7.7", + "zendframework/zend-uri": "^2.5.2", + "zendframework/zend-validator": "^2.10.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4.1 || ^5.7.15", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^3.1 || ^2.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Http\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", + "homepage": "https://github.com/zendframework/zend-http", + "keywords": [ + "ZendFramework", + "http", + "http client", + "zend", + "zf" + ], + "time": "2017-10-13T12:06:24+00:00" + }, + { + "name": "zendframework/zend-json", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-json.git", + "reference": "f42a1588e75c2a3e338cd94c37906231e616daab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-json/zipball/f42a1588e75c2a3e338cd94c37906231e616daab", + "reference": "f42a1588e75c2a3e338cd94c37906231e616daab", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.3", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "suggest": { + "zendframework/zend-json-server": "For implementing JSON-RPC servers", + "zendframework/zend-xml2json": "For converting XML documents to JSON" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", + "homepage": "https://github.com/zendframework/zend-json", + "keywords": [ + "json", + "zf2" + ], + "time": "2016-04-01T02:34:00+00:00" + }, + { + "name": "zendframework/zend-loader", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-loader.git", + "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/c5fd2f071bde071f4363def7dea8dec7393e135c", + "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c", + "shasum": "" + }, + "require": { + "php": ">=5.3.23" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Loader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-loader", + "keywords": [ + "loader", + "zf2" + ], + "time": "2015-06-03T14:05:47+00:00" + }, + { + "name": "zendframework/zend-server", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-server.git", + "reference": "7cb617ca3e9b24579f544a244ee79ae61f480914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-server/zipball/7cb617ca3e9b24579f544a244ee79ae61f480914", + "reference": "7cb617ca3e9b24579f544a244ee79ae61f480914", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "zendframework/zend-code": "^2.5 || ^3.0", + "zendframework/zend-stdlib": "^2.5 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.3.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Server\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-server", + "keywords": [ + "server", + "zf2" + ], + "time": "2016-06-20T22:27:55+00:00" + }, + { + "name": "zendframework/zend-stdlib", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "debedcfc373a293f9250cc9aa03cf121428c8e78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/debedcfc373a293f9250cc9aa03cf121428c8e78", + "reference": "debedcfc373a293f9250cc9aa03cf121428c8e78", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "athletic/athletic": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev", + "dev-develop": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-stdlib", + "keywords": [ + "stdlib", + "zf2" + ], + "time": "2016-09-13T14:38:50+00:00" + }, + { + "name": "zendframework/zend-uri", + "version": "2.5.2", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-uri.git", + "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/0bf717a239432b1a1675ae314f7c4acd742749ed", + "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-validator": "^2.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "a component that aids in manipulating and validating ยป Uniform Resource Identifiers (URIs)", + "homepage": "https://github.com/zendframework/zend-uri", + "keywords": [ + "uri", + "zf2" + ], + "time": "2016-02-17T22:38:51+00:00" + }, + { + "name": "zendframework/zend-validator", + "version": "2.10.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-validator.git", + "reference": "010084ddbd33299bf51ea6f0e07f8f4e8bd832a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/010084ddbd33299bf51ea6f0e07f8f4e8bd832a8", + "reference": "010084ddbd33299bf51ea6f0e07f8f4e8bd832a8", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.1", + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.6 || ^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6", + "zendframework/zend-db": "^2.7", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-http": "^2.5.4", + "zendframework/zend-i18n": "^2.6", + "zendframework/zend-math": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-session": "^2.8", + "zendframework/zend-uri": "^2.5" + }, + "suggest": { + "zendframework/zend-db": "Zend\\Db component, required by the (No)RecordExists validator", + "zendframework/zend-filter": "Zend\\Filter component, required by the Digits validator", + "zendframework/zend-i18n": "Zend\\I18n component to allow translation of validation error messages", + "zendframework/zend-i18n-resources": "Translations of validator messages", + "zendframework/zend-math": "Zend\\Math component, required by the Csrf validator", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", + "zendframework/zend-session": "Zend\\Session component, ^2.8; required by the Csrf validator", + "zendframework/zend-uri": "Zend\\Uri component, required by the Uri and Sitemap\\Loc validators" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.10-dev", + "dev-develop": "2.11-dev" + }, + "zf": { + "component": "Zend\\Validator", + "config-provider": "Zend\\Validator\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\Validator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a set of commonly needed validators", + "homepage": "https://github.com/zendframework/zend-validator", + "keywords": [ + "validator", + "zf2" + ], + "time": "2017-08-22T14:19:23+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+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.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2", + "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-08-30T18:51:59+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.7.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", + "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2017-09-04T11:05:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b", + "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^1.4.11 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "ext-xdebug": "^2.5", + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-xdebug": "^2.5.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2017-08-03T12:40:43+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2016-10-03T07:40:28+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "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": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0", + "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-08-20T05:47:52+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "6.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/06b28548fd2b4a20c3cd6e247dc86331a7d4db13", + "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.2.2", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^4.0.3", + "sebastian/comparator": "^2.0.2", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-10-16T13:18:59+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "2f789b59ab89669015ad984afa350c4ec577ade0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0", + "reference": "2f789b59ab89669015ad984afa350c4ec577ade0", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.0" + }, + "conflict": { + "phpunit/phpunit": "<6.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2017-08-03T14:08:16+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.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": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "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": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1174d9018191e93cb9d719edec01257fc05f8158" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", + "reference": "1174d9018191e93cb9d719edec01257fc05f8158", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/diff": "^2.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-11-03T07:16:52+00:00" + }, + { + "name": "sebastian/diff", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-08-03T08:09:46+00:00" + }, + { + "name": "sebastian/environment", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2017-07-01T08:51:00+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "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": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "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": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.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": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "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": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "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": "2016-10-03T07:35:21+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-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/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "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" + ], + "time": "2017-05-22T02:43:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^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" + } + ], + "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", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "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" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^5.6 || ^7.0" + }, + "platform-dev": [] +} From c2881f471feaea0a28038c390076108d8b8d523a Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:33:32 +0000 Subject: [PATCH 25/59] Updated PHPUnit - ^5.7 || ^6.4 --- test/CacheTest.php | 4 ++-- test/ClientTest.php | 25 +++++++++++++---------- test/ErrorTest.php | 4 ++-- test/RequestTest.php | 8 ++++---- test/ResponseTest.php | 8 ++++---- test/ServerTest.php | 4 ++-- test/Smd/ServiceTest.php | 43 +++++++++++++++++++++++----------------- test/SmdTest.php | 16 +++++++-------- 8 files changed, 62 insertions(+), 50 deletions(-) diff --git a/test/CacheTest.php b/test/CacheTest.php index fe2e7ff..84ddd48 100644 --- a/test/CacheTest.php +++ b/test/CacheTest.php @@ -7,7 +7,7 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; use Zend\Json\Server; class CacheTest extends TestCase @@ -25,7 +25,7 @@ public function setUp() $this->cacheFile = tempnam(sys_get_temp_dir(), 'zjs'); // if (!is_writeable(__DIR__)) { - if (! is_writeable($this->cacheFile)) { + if (! is_writable($this->cacheFile)) { $this->markTestSkipped('Cannot write test caches due to permissions'); } diff --git a/test/ClientTest.php b/test/ClientTest.php index 64e3106..587e5f6 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -7,12 +7,12 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; use Zend\Http\Client as HttpClient; use Zend\Http\Client\Adapter\Test as TestAdapter; use Zend\Json\Server\Client; use Zend\Json\Server\Error; -use Zend\Json\Server\Request; +use Zend\Json\Server\Exception; use Zend\Json\Server\Response; class ClientTest extends TestCase @@ -141,7 +141,9 @@ public function testRpcMethodCallThrowsOnHttpFailure() $response = $this->makeHttpResponseFrom($body, $status, $message); $this->httpAdapter->setResponse($response); - $this->setExpectedException('Zend\\Json\\Server\\Exception\\HttpException', $message, $status); + $this->expectException(Exception\HttpException::class); + $this->expectExceptionMessage($message); + $this->expectExceptionCode($status); $this->jsonClient->call('foo'); } @@ -158,7 +160,9 @@ public function testRpcMethodCallThrowsOnJsonRpcFault() $response = $this->makeHttpResponseFrom($json); $this->httpAdapter->setResponse($response); - $this->setExpectedException('Zend\\Json\\Server\\Exception\\ErrorException', $message, $code); + $this->expectException(Exception\ErrorException::class); + $this->expectExceptionMessage($message); + $this->expectExceptionCode($code); $this->jsonClient->call('foo'); } @@ -222,7 +226,7 @@ public function testScalarServerResponseThrowsException() { $response = $this->makeHttpResponseFrom('false'); $this->httpAdapter->setResponse($response); - $this->setExpectedException('Zend\Json\Server\Exception\ExceptionInterface'); + $this->expectException(Exception\ExceptionInterface::class); $this->jsonClient->call('foo'); } @@ -245,11 +249,12 @@ public function getServerResponseFor($nativeVars) public function makeHttpResponseFrom($data, $status = 200, $message = 'OK') { - $headers = ["HTTP/1.1 $status $message", - "Status: $status", - 'Content-Type: application/json', - 'Content-Length: ' . strlen($data) - ]; + $headers = [ + "HTTP/1.1 $status $message", + "Status: $status", + 'Content-Type: application/json', + 'Content-Length: ' . strlen($data), + ]; return implode("\r\n", $headers) . "\r\n\r\n$data\r\n\r\n"; } diff --git a/test/ErrorTest.php b/test/ErrorTest.php index 330a8c6..5424a32 100644 --- a/test/ErrorTest.php +++ b/test/ErrorTest.php @@ -7,9 +7,9 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; -use Zend\Json\Server; +use PHPUnit\Framework\TestCase; use Zend\Json; +use Zend\Json\Server; class ErrorTest extends TestCase { diff --git a/test/RequestTest.php b/test/RequestTest.php index 065e424..2583dd4 100644 --- a/test/RequestTest.php +++ b/test/RequestTest.php @@ -7,7 +7,7 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; use Zend\Json\Json; use Zend\Json\Server\Request; @@ -34,7 +34,7 @@ public function testShouldBeAbleToAddAParamAsValueOnly() { $this->request->addParam('foo'); $params = $this->request->getParams(); - $this->assertEquals(1, count($params)); + $this->assertCount(1, $params); $test = array_shift($params); $this->assertEquals('foo', $test); } @@ -43,7 +43,7 @@ public function testShouldBeAbleToAddAParamAsKeyValuePair() { $this->request->addParam('bar', 'foo'); $params = $this->request->getParams(); - $this->assertEquals(1, count($params)); + $this->assertCount(1, $params); $this->assertArrayHasKey('foo', $params); $this->assertEquals('bar', $params['foo']); } @@ -56,7 +56,7 @@ public function testInvalidKeysShouldBeIgnored() $this->assertNull($this->request->getParam('foo')); $params = $this->request->getParams(); ++$count; - $this->assertEquals($count, count($params)); + $this->assertCount($count, $params); } } diff --git a/test/ResponseTest.php b/test/ResponseTest.php index 271816f..4778776 100644 --- a/test/ResponseTest.php +++ b/test/ResponseTest.php @@ -7,11 +7,11 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; +use Zend\Json\Json; use Zend\Json\Server\Error; use Zend\Json\Server\Exception\RuntimeException; use Zend\Json\Server\Response; -use Zend\Json\Json; class ResponseTest extends TestCase { @@ -177,7 +177,7 @@ public function testCastToStringShouldCastToJSON() */ public function testLoadingScalarJSONResponseShouldThrowException($json) { - $this->setExpectedException(RuntimeException::class); + $this->expectException(RuntimeException::class); $this->response->loadJson($json); } @@ -197,7 +197,7 @@ public function getOptions() 'four', true, ], - 'id' => 'foobar' + 'id' => 'foobar', ]; } } diff --git a/test/ServerTest.php b/test/ServerTest.php index b28a1c2..82b71af 100644 --- a/test/ServerTest.php +++ b/test/ServerTest.php @@ -9,9 +9,9 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; -use Zend\Json\Server; +use PHPUnit\Framework\TestCase; use Zend\Json; +use Zend\Json\Server; use Zend\Json\Server\Request; use Zend\Json\Server\Response; use Zend\Server\Reflection\Exception\RuntimeException; diff --git a/test/Smd/ServiceTest.php b/test/Smd/ServiceTest.php index 14b8c32..23e9140 100644 --- a/test/Smd/ServiceTest.php +++ b/test/Smd/ServiceTest.php @@ -7,12 +7,11 @@ namespace ZendTest\Json\Server\Smd; -use PHPUnit_Framework_TestCase as TestCase; +use PHPUnit\Framework\TestCase; use stdClass; use Zend\Json\Server\Exception; use Zend\Json\Server\Smd; use Zend\Json\Server\Smd\Service; -use Zend\Json\Server; class ServiceTest extends TestCase { @@ -29,19 +28,22 @@ public function setUp() public function testConstructorShouldThrowExceptionWhenNoNameSetWhenNullProvided() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'requires a name'); - $service = new Service(null); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('requires a name'); + new Service(null); } public function testConstructorShouldThrowExceptionWhenNoNameSetWhenArrayProvided() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'requires a name'); - $service = new Service(null); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('requires a name'); + new Service(null); } public function testSettingNameShouldThrowExceptionWhenContainingInvalidFormatStartingWithInt() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'Invalid name'); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid name'); $this->service->setName('0ab-?'); } @@ -53,7 +55,8 @@ public function testSettingNameShouldNotThrowExceptionWhenContainingValidFormatS public function testSettingNameShouldThrowExceptionWhenContainingInvalidFormatStartingWithRpc() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'Invalid name'); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid name'); $this->service->setName('rpc.Foo'); } @@ -92,13 +95,15 @@ public function testTransportShouldDefaultToPost() public function testSettingTransportThrowsExceptionWhenSetToGet() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'Invalid transport'); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid transport'); $this->service->setTransport('GET'); } public function testSettingTransportThrowsExceptionWhenSetToRest() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'Invalid transport'); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid transport'); $this->service->setTransport('REST'); } @@ -159,7 +164,7 @@ public function testShouldBeAbleToAddParamsByTypeOnly() { $this->service->addParam('integer'); $params = $this->service->getParams(); - $this->assertEquals(1, count($params)); + $this->assertCount(1, $params); $param = array_shift($params); $this->assertEquals('integer', $param['type']); } @@ -177,7 +182,8 @@ public function testParamsShouldAcceptArrayOfTypes() public function testInvalidParamTypeShouldThrowException() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'Invalid param type'); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid param type'); $this->service->addParam(new stdClass); } @@ -188,7 +194,7 @@ public function testShouldBeAbleToOrderParams() ->addParam('boolean', [], 3); $params = $this->service->getParams(); - $this->assertEquals(3, count($params)); + $this->assertCount(3, $params); $param = array_shift($params); $this->assertEquals('string', $param['type'], var_export($params, 1)); @@ -226,7 +232,7 @@ public function testShouldBeAbleToAddMultipleParamsAtOnce() ]); $params = $this->service->getParams(); - $this->assertEquals(3, count($params)); + $this->assertCount(3, $params); $param = array_shift($params); $this->assertEquals('string', $param['type']); $this->assertEquals('foo', $param['name']); @@ -242,7 +248,7 @@ public function testSetparamsShouldOverwriteExistingParams() { $this->testShouldBeAbleToAddMultipleParamsAtOnce(); $params = $this->service->getParams(); - $this->assertEquals(3, count($params)); + $this->assertCount(3, $params); $this->service->setParams([ ['type' => 'string'], @@ -250,7 +256,7 @@ public function testSetparamsShouldOverwriteExistingParams() ]); $test = $this->service->getParams(); $this->assertNotEquals($params, $test); - $this->assertEquals(2, count($test)); + $this->assertCount(2, $test); } public function testReturnShouldBeNullByDefault() @@ -275,7 +281,8 @@ public function testReturnAccessorsShouldAllowArrayOfTypes() public function testInvalidReturnTypeShouldThrowException() { - $this->setExpectedException(Exception\InvalidArgumentException::class, 'Invalid param type'); + $this->expectException(Exception\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid param type'); $this->service->setReturn(new stdClass); } @@ -320,7 +327,7 @@ public function validateSmdArray(array $smd) $this->assertArrayHasKey('parameters', $smd); $params = $smd['parameters']; - $this->assertEquals(3, count($params)); + $this->assertCount(3, $params); $param = array_shift($params); $this->assertEquals('boolean', $param['type']); $param = array_shift($params); diff --git a/test/SmdTest.php b/test/SmdTest.php index 39b343f..6ed5586 100644 --- a/test/SmdTest.php +++ b/test/SmdTest.php @@ -7,11 +7,11 @@ namespace ZendTest\Json\Server; -use PHPUnit_Framework_TestCase as TestCase; -use Zend\Json\Server\Smd; +use PHPUnit\Framework\TestCase; +use Zend\Json; use Zend\Json\Server\Exception\InvalidArgumentException; use Zend\Json\Server\Exception\RuntimeException; -use Zend\Json; +use Zend\Json\Server\Smd; class SmdTest extends TestCase { @@ -287,7 +287,7 @@ public function testShouldBeAbleToCastToDojoArray() $this->assertEquals('.1', $smd['SMDVersion']); $this->assertEquals('JSON-RPC', $smd['serviceType']); $methods = $smd['methods']; - $this->assertEquals(2, count($methods)); + $this->assertCount(2, $methods); $foo = array_shift($methods); $this->assertArrayHasKey('name', $foo); @@ -296,7 +296,7 @@ public function testShouldBeAbleToCastToDojoArray() $this->assertEquals('foo', $foo['name']); $this->assertEquals($this->smd->getTarget(), $foo['serviceURL']); $this->assertInternalType('array', $foo['parameters']); - $this->assertEquals(1, count($foo['parameters'])); + $this->assertCount(1, $foo['parameters']); $bar = array_shift($methods); $this->assertArrayHasKey('name', $bar); @@ -305,7 +305,7 @@ public function testShouldBeAbleToCastToDojoArray() $this->assertEquals('bar', $bar['name']); $this->assertEquals($this->smd->getTarget(), $bar['serviceURL']); $this->assertInternalType('array', $bar['parameters']); - $this->assertEquals(1, count($bar['parameters'])); + $this->assertCount(1, $bar['parameters']); } public function testShouldBeAbleToRenderAsJSON() @@ -346,7 +346,7 @@ public function getOptions() ], 'return' => 'string', ], - ] + ], ]; } @@ -369,7 +369,7 @@ public function validateServiceArray(array $smd, array $options) $this->assertEquals($this->smd->getEnvelope(), $smd['envelope']); $this->assertEquals($this->smd->getContentType(), $smd['contentType']); $services = $smd['services']; - $this->assertEquals(2, count($services)); + $this->assertCount(2, $services); $this->assertArrayHasKey('foo', $services); $this->assertArrayHasKey('bar', $services); } From 76a22f1c91c6b84ba439d8dc8eb0bdad43caa997 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 08:49:38 +0000 Subject: [PATCH 26/59] Updated link to the documentation - docs.zendframework.com --- README.md | 2 +- docs/book/intro.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 078fc91..548b0fd 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ Provides a JSON-RPC server implementation. - File issues at https://github.com/zendframework/zend-json-server/issues -- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-json-server +- Documentation is at https://docs.zendframework.com/zend-json-server/ diff --git a/docs/book/intro.md b/docs/book/intro.md index d20ed7d..233aa93 100644 --- a/docs/book/intro.md +++ b/docs/book/intro.md @@ -16,7 +16,7 @@ situation, you will simply: - Attach one or more functions and/or classes/objects to the server object. - `handle()` the request. -zend-json-server utilizes [Zend\Server\Reflection](http://framework.zend.com/manual/current/en/modules/zend.server.reflection.html) +zend-json-server utilizes [Zend\Server\Reflection](https://docs.zendframework.com/zend-server/reflection/) to perform reflection on any attached classes or functions, and uses that information to build both the SMD and enforce method call signatures. As such, it is imperative that any attached functions and/or class methods have full From 23631d4fd6db29fa47de8dad711652bb9b9aed40 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 3 Nov 2017 09:06:01 +0000 Subject: [PATCH 27/59] Added zend-code to legacy dependencies as the latest version requires PHP 7.1 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66d5e50..c9e0380 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ matrix: - php: 5.6 env: - DEPS=locked - - LEGACY_DEPS="phpunit/phpunit" + - LEGACY_DEPS="phpunit/phpunit zendframework/zend-code" - php: 5.6 env: - DEPS=latest @@ -29,7 +29,7 @@ matrix: - php: 7 env: - DEPS=locked - - LEGACY_DEPS="phpunit/phpunit" + - LEGACY_DEPS="phpunit/phpunit zendframework/zend-code" - php: 7 env: - DEPS=latest From e06694a71a732f67895aa6264c95cc5aafce1538 Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 22 Nov 2017 08:26:09 +0000 Subject: [PATCH 28/59] Updated .gitattributes and .gitignore - natsort --- .gitattributes | 4 ++-- .gitignore | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitattributes b/.gitattributes index 6669e71..16d8d29 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,10 @@ -/docs export-ignore -/test export-ignore /.coveralls.yml export-ignore /.gitattributes export-ignore /.gitignore export-ignore /.travis.yml export-ignore /composer.lock export-ignore +/docs/ export-ignore /mkdocs.yml export-ignore /phpcs.xml export-ignore /phpunit.xml.dist export-ignore +/test/ export-ignore diff --git a/.gitignore b/.gitignore index 9e68500..245087a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -docs/html/ -vendor/ -zf-mkdoc-theme/ -clover.xml -coveralls-upload.json -phpunit.xml -zf-mkdoc-theme.tgz +/clover.xml +/coveralls-upload.json +/docs/html/ +/phpunit.xml +/vendor/ +/zf-mkdoc-theme.tgz +/zf-mkdoc-theme/ From 61a35d027f9729da645a509ec628e66bd7d43a73 Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 22 Nov 2017 08:26:17 +0000 Subject: [PATCH 29/59] Removed empty line in LICENSE.md --- LICENSE.md | 1 - 1 file changed, 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 3846b8c..63df410 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,5 +1,4 @@ Copyright (c) 2005-2017, Zend Technologies USA, Inc. - All rights reserved. Redistribution and use in source and binary forms, with or without modification, From a6de06b4b4ffa65caee7e6093577c92110dd179f Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 22 Nov 2017 08:26:27 +0000 Subject: [PATCH 30/59] Updated coveralls badge in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 548b0fd..316b29f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zend-json-server [![Build Status](https://secure.travis-ci.org/zendframework/zend-json-server.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-json-server) -[![Coverage Status](https://coveralls.io/repos/zendframework/zend-json-server/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-json-server?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-json-server/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-json-server?branch=master) Provides a JSON-RPC server implementation. From 1d716d9d71e20f442f8ffcf9474f29eef5bede53 Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 22 Nov 2017 08:26:47 +0000 Subject: [PATCH 31/59] Removed ehite characters at the end of the line in the docs --- docs/book/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/index.html b/docs/book/index.html index da1a2ab..710a735 100644 --- a/docs/book/index.html +++ b/docs/book/index.html @@ -1,7 +1,7 @@

zend-json-server

- +

JSON-RPC implementation for PHP.

$ composer require zendframework/zend-json-server
From 5baa03ff07f39f0ec9ee1d8ec32834d3010be0ca Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 22 Nov 2017 08:27:05 +0000 Subject: [PATCH 32/59] Updated copyright range year in mkdocs.yml to match LICENSE.md --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 5d92dc2..3598622 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,4 +13,4 @@ pages: site_name: zend-json-server site_description: Zend\Json\Server repo_url: 'https://github.com/zendframework/zend-json-server' -copyright: 'Copyright (c) 2016-2017 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2005-2017 Zend Technologies USA Inc.' From 122c6d502bd9cea4382e108b62b014aa98a14dc6 Mon Sep 17 00:00:00 2001 From: webimpress Date: Wed, 22 Nov 2017 08:27:17 +0000 Subject: [PATCH 33/59] Added PR and ISSUE github templates --- docs/ISSUE_TEMPLATE.md | 19 +++++++++++++++++++ docs/PULL_REQUEST_TEMPLATE.md | 25 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docs/ISSUE_TEMPLATE.md create mode 100644 docs/PULL_REQUEST_TEMPLATE.md diff --git a/docs/ISSUE_TEMPLATE.md b/docs/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..de2f091 --- /dev/null +++ b/docs/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + - [ ] I was not able to find an [open](https://github.com/zendframework/zend-json-server/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-json-server/issues?q=is%3Aclosed) issue matching what I'm seeing. + - [ ] This is not a question. (Questions should be asked on [slack](https://zendframework.slack.com/) ([Signup for Slack here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).) + +Provide a narrative description of what you are trying to accomplish. + +### Code to reproduce the issue + + + +```php +``` + +### Expected results + + + +### Actual results + + diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f00d90c --- /dev/null +++ b/docs/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ +Provide a narrative description of what you are trying to accomplish: + +- [ ] Are you fixing a bug? + - [ ] Detail how the bug is invoked currently. + - [ ] Detail the original, incorrect behavior. + - [ ] Detail the new, expected behavior. + - [ ] Base your feature on the `master` branch, and submit against that branch. + - [ ] Add a regression test that demonstrates the bug, and proves the fix. + - [ ] Add a `CHANGELOG.md` entry for the fix. + +- [ ] Are you creating a new feature? + - [ ] Why is the new feature needed? What purpose does it serve? + - [ ] How will users use the new feature? + - [ ] Base your feature on the `develop` branch, and submit against that branch. + - [ ] Add only one feature per pull request; split multiple features over multiple pull requests + - [ ] Add tests for the new feature. + - [ ] Add documentation for the new feature. + - [ ] Add a `CHANGELOG.md` entry for the new feature. + +- [ ] Is this related to quality assurance? + + +- [ ] Is this related to documentation? + + From 8f6fb1df062572521998138d205f7e161bb086c8 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 14 Dec 2017 08:33:04 +0000 Subject: [PATCH 34/59] Updated to php-coveralls/php-coveralls With version 2 package has been renamed from "satooshi/php-coveralls" to "php-coveralls/php-coveralls", and the script has been renamed from "coveralls" to "php-coveralls" --- .travis.yml | 4 ++-- composer.json | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c9e0380..a1fd2f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ cache: env: global: - COMPOSER_ARGS="--no-interaction" - - COVERAGE_DEPS="satooshi/php-coveralls" + - COVERAGE_DEPS="php-coveralls/php-coveralls" matrix: include: @@ -70,7 +70,7 @@ script: - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi after_script: - - if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi notifications: email: false diff --git a/composer.json b/composer.json index 303d5c2..c79aaa4 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,6 @@ "cs-check": "phpcs", "cs-fix": "phpcbf", "test": "phpunit --colors=always", - "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", - "upload-coverage": "coveralls -v" + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } } From 475baf7d3decee5e891ce8fb748a0c785ec8aec6 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 12 Apr 2018 11:21:43 +0100 Subject: [PATCH 35/59] Added travis_retry on uploading coverage to coveralls in Travis CI config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a1fd2f7..5724a01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ script: - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi after_script: - - if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi notifications: email: false From 9326720fb47fa56bcbf4afa4e69b38c2d77ccaac Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 12 Apr 2018 11:21:52 +0100 Subject: [PATCH 36/59] Updated copyright year range in LICENSE.md and mkdocs.yml --- LICENSE.md | 2 +- mkdocs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 63df410..d44ab5d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2005-2017, Zend Technologies USA, Inc. +Copyright (c) 2005-2018, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/mkdocs.yml b/mkdocs.yml index 3598622..84bb1ce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,4 +13,4 @@ pages: site_name: zend-json-server site_description: Zend\Json\Server repo_url: 'https://github.com/zendframework/zend-json-server' -copyright: 'Copyright (c) 2005-2017 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2005-2018 Zend Technologies USA Inc.' From 25e80cb66288309b299d6233eb9fb35f939d4200 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 12 Apr 2018 11:22:08 +0100 Subject: [PATCH 37/59] Updated link to https in mkdocs.yml --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 84bb1ce..a37386c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -13,4 +13,4 @@ pages: site_name: zend-json-server site_description: Zend\Json\Server repo_url: 'https://github.com/zendframework/zend-json-server' -copyright: 'Copyright (c) 2005-2018 Zend Technologies USA Inc.' +copyright: 'Copyright (c) 2005-2018 Zend Technologies USA Inc.' From ce5f879ac1dd72305281e3b1353a24f0a87cde40 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 12 Apr 2018 11:22:16 +0100 Subject: [PATCH 38/59] Updated branch aliases in composer.json --- composer.json | 4 ++-- composer.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index c79aaa4..e167870 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,8 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.0.x-dev", + "dev-develop": "3.1.x-dev" } }, "scripts": { diff --git a/composer.lock b/composer.lock index f2ec946..bb18b58 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": "a6d2888c1f8ba831f35d954f59db3c3e", + "content-hash": "23f9caeca0c5aa25688836333198ebcd", "packages": [ { "name": "container-interop/container-interop", From e6753f11d8fb15fd875f64a971f27a73c9890d16 Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 12 Apr 2018 11:28:11 +0100 Subject: [PATCH 39/59] Allow PHPUnit 7 --- composer.json | 2 +- composer.lock | 204 +++++++++++++++++++++++++------------------------- 2 files changed, 104 insertions(+), 102 deletions(-) diff --git a/composer.json b/composer.json index e167870..69f7fc8 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "zendframework/zend-server": "^2.7" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", "zendframework/zend-coding-standard": "~1.0.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index bb18b58..4e859d8 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": "23f9caeca0c5aa25688836333198ebcd", + "content-hash": "708a00261f6955ba62d2f5898a280321", "packages": [ { "name": "container-interop/container-interop", @@ -852,29 +852,35 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.1.1", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2d3d238c433cf69caeb4842e97a3223a116f94b2", - "reference": "2d3d238c433cf69caeb4842e97a3223a116f94b2", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -893,7 +899,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-08-30T18:51:59+00:00" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -944,16 +950,16 @@ }, { "name": "phpspec/prophecy", - "version": "v1.7.2", + "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6" + "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", - "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", "shasum": "" }, "require": { @@ -965,7 +971,7 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { @@ -1003,45 +1009,44 @@ "spy", "stub" ], - "time": "2017-09-04T11:05:03+00:00" + "time": "2018-02-19T10:16:54+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.2.2", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b" + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/8ed1902a57849e117b5651fc1a5c48110946c06b", - "reference": "8ed1902a57849e117b5651fc1a5c48110946c06b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/774a82c0c5da4c1c7701790c262035d235ab7856", + "reference": "774a82c0c5da4c1c7701790c262035d235ab7856", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", + "php": "^7.1", "phpunit/php-file-iterator": "^1.4.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^1.4.11 || ^2.0", + "phpunit/php-token-stream": "^3.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^3.1", "sebastian/version": "^2.0.1", "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": "^2.5", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.2.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -1056,7 +1061,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1067,20 +1072,20 @@ "testing", "xunit" ], - "time": "2017-08-03T12:40:43+00:00" + "time": "2018-04-06T15:39:20+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -1114,7 +1119,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -1159,28 +1164,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1195,7 +1200,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1204,33 +1209,33 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0" + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9a02332089ac48e704c70f6cefed30c224e3c0b0", - "reference": "9a02332089ac48e704c70f6cefed30c224e3c0b0", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1253,20 +1258,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-08-20T05:47:52+00:00" + "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", - "version": "6.4.3", + "version": "7.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13" + "reference": "6a17c170fb92845896e1b3b00fcb462cd4b3c017" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/06b28548fd2b4a20c3cd6e247dc86331a7d4db13", - "reference": "06b28548fd2b4a20c3cd6e247dc86331a7d4db13", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6a17c170fb92845896e1b3b00fcb462cd4b3c017", + "reference": "6a17c170fb92845896e1b3b00fcb462cd4b3c017", "shasum": "" }, "require": { @@ -1278,15 +1283,15 @@ "myclabs/deep-copy": "^1.6.1", "phar-io/manifest": "^1.0.1", "phar-io/version": "^1.0", - "php": "^7.0", + "php": "^7.1", "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.2.2", - "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-code-coverage": "^6.0.1", + "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^4.0.3", - "sebastian/comparator": "^2.0.2", - "sebastian/diff": "^2.0", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit-mock-objects": "^6.1", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^3.0", "sebastian/environment": "^3.1", "sebastian/exporter": "^3.1", "sebastian/global-state": "^2.0", @@ -1294,16 +1299,12 @@ "sebastian/resource-operations": "^1.0", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -1311,7 +1312,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.4.x-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -1337,33 +1338,30 @@ "testing", "xunit" ], - "time": "2017-10-16T13:18:59+00:00" + "time": "2018-04-10T11:40:22+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "4.0.4", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "2f789b59ab89669015ad984afa350c4ec577ade0" + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/2f789b59ab89669015ad984afa350c4ec577ade0", - "reference": "2f789b59ab89669015ad984afa350c4ec577ade0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", - "php": "^7.0", + "php": "^7.1", "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.0" - }, - "conflict": { - "phpunit/phpunit": "<6.0" + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" @@ -1371,7 +1369,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -1386,7 +1384,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1396,7 +1394,7 @@ "mock", "xunit" ], - "time": "2017-08-03T14:08:16+00:00" + "time": "2018-04-11T04:50:36+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1445,21 +1443,21 @@ }, { "name": "sebastian/comparator", - "version": "2.1.0", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158" + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { "php": "^7.0", - "sebastian/diff": "^2.0", + "sebastian/diff": "^2.0 || ^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { @@ -1505,32 +1503,33 @@ "compare", "equality" ], - "time": "2017-11-03T07:16:52+00:00" + "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1555,9 +1554,12 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2017-08-03T08:09:46+00:00" + "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", @@ -2077,16 +2079,16 @@ }, { "name": "webmozart/assert", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { @@ -2123,7 +2125,7 @@ "check", "validate" ], - "time": "2016-11-23T20:04:58+00:00" + "time": "2018-01-29T19:49:41+00:00" }, { "name": "zendframework/zend-coding-standard", From 0c1192ff2e8e9f50ce6bbbcd98eeceab40762ef8 Mon Sep 17 00:00:00 2001 From: webimpress Date: Fri, 13 Apr 2018 08:05:27 +0100 Subject: [PATCH 40/59] Use "chat" instead of "slack" --- composer.json | 2 +- docs/CONTRIBUTING.md | 2 +- docs/ISSUE_TEMPLATE.md | 2 +- docs/SUPPORT.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 69f7fc8..1b5b904 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "issues": "https://github.com/zendframework/zend-json-server/issues", "source": "https://github.com/zendframework/zend-json-server", "rss": "https://github.com/zendframework/zend-json-server/releases.atom", - "slack": "https://zendframework-slack.herokuapp.com", + "chat": "https://zendframework-slack.herokuapp.com", "forum": "https://discourse.zendframework.com/c/questions/components" }, "require": { diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 3f88687..df0f831 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -7,7 +7,7 @@ read/subscribe to the following resources: - [Coding Standards](https://github.com/zendframework/zend-coding-standard) - [Forums](https://discourse.zendframework.com/c/contributors) - - [Slack](https://zendframework-slack.herokuapp.com) + - [Chat](https://zendframework-slack.herokuapp.com) - [Code of Conduct](CODE_OF_CONDUCT.md) If you are working on new features or refactoring diff --git a/docs/ISSUE_TEMPLATE.md b/docs/ISSUE_TEMPLATE.md index de2f091..a16797d 100644 --- a/docs/ISSUE_TEMPLATE.md +++ b/docs/ISSUE_TEMPLATE.md @@ -1,5 +1,5 @@ - [ ] I was not able to find an [open](https://github.com/zendframework/zend-json-server/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-json-server/issues?q=is%3Aclosed) issue matching what I'm seeing. - - [ ] This is not a question. (Questions should be asked on [slack](https://zendframework.slack.com/) ([Signup for Slack here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).) + - [ ] This is not a question. (Questions should be asked on [chat](https://zendframework.slack.com/) ([Signup here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).) Provide a narrative description of what you are trying to accomplish. diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md index 391c8ab..8734faa 100644 --- a/docs/SUPPORT.md +++ b/docs/SUPPORT.md @@ -3,13 +3,13 @@ Zend Framework offers three support channels: - For real-time questions, use our - [Slack](https://zendframework-slack.herokuapp.com) + [chat](https://zendframework-slack.herokuapp.com) - For detailed questions (e.g., those requiring examples) use our [forums](https://discourse.zendframework.com/c/questions/components) - To report issues, use this repository's [issue tracker](https://github.com/zendframework/zend-json-server/issues/new) -**DO NOT** use the issue tracker to ask questions; use Slack or the forums for +**DO NOT** use the issue tracker to ask questions; use chat or the forums for that. Questions posed to the issue tracker will be closed. When reporting an issue, please include the following details: From e12569930690c4f1747ba0dbfb3be92d18b35b6a Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 16:02:22 -0500 Subject: [PATCH 41/59] Ensure that options key of 0 is not interpreted as JSONRPC version by Response class Due to a non-strict equality check, a key of `0` passed to `Response::setOptions()` would inadvertently set the response version. This patch adds a test demonstrating correct behavior, and fixes the equality check to be strict. --- src/Response.php | 2 +- test/ResponseTest.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Response.php b/src/Response.php index d05fae6..0a3d978 100644 --- a/src/Response.php +++ b/src/Response.php @@ -74,7 +74,7 @@ public function setOptions(array $options) continue; } - if ('jsonrpc' == $key) { + if ('jsonrpc' === $key) { $this->setVersion($value); continue; } diff --git a/test/ResponseTest.php b/test/ResponseTest.php index 271816f..ea20897 100644 --- a/test/ResponseTest.php +++ b/test/ResponseTest.php @@ -200,4 +200,15 @@ public function getOptions() 'id' => 'foobar' ]; } + + /** + * @see https://github.com/zendframework/zend-json-server/pull/2 + */ + public function testValueOfZeroForOptionsKeyShouldNotBeInterpretedAsVersionKey() + { + $this->response->setOptions([ + 0 => '2.0', + ]); + $this->assertNull($this->response->getVersion()); + } } From a4c42eaba6528c95cb29f9893bf7d48bf9a1e1bd Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 16:03:57 -0500 Subject: [PATCH 42/59] Adds CHANGELOG entry for #2 --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ebe0dd..e64abed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file, in reverse - Nothing. +### Changed + +- Nothing. + ### Deprecated - Nothing. @@ -18,7 +22,9 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed -- Nothing. +- [#2](https://github.com/zendframework/zend-json-server/pull/2) fixes an issue with how the `Response::setOptions()` method would handle a + key of `0`; previously, it would (incorrectly) set the JSON-RPC version of the response; + now it does not. ## 3.0.0 - 2015-03-31 From 6797498a1077a7d405d137ff9a5bf90feee1e6de Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 16:54:18 -0500 Subject: [PATCH 43/59] Refactors `handleRequest()`: extract method(s) Refactors `handleRequest()` to extract three methods: - `validateAndPrepareParams()` - `validateAndPrepareNamedParams()` - `validateAndPrepareOrderedParams()` These allow simplifying the logic of `handleRequest()` better, and make it more clear what each of the nested conditionals were doing. --- src/Server.php | 128 ++++++++++++++++++++++++++++---------------- test/ServerTest.php | 8 ++- 2 files changed, 85 insertions(+), 51 deletions(-) diff --git a/src/Server.php b/src/Server.php index 7ccd76a..03c7ae8 100644 --- a/src/Server.php +++ b/src/Server.php @@ -1,7 +1,7 @@ fault('Method not found', Error::ERROR_INVALID_METHOD); } - $params = $request->getParams(); - $invokable = $this->table->getMethod($method); - $serviceMap = $this->getServiceMap(); - $service = $serviceMap->getService($method); - $serviceParams = $service->getParams(); + $invokable = $this->table->getMethod($method); + $serviceMap = $this->getServiceMap(); + $service = $serviceMap->getService($method); + $params = $this->validateAndPrepareParams( + $request->getParams(), + $service->getParams(), + $invokable + ); + if ($params instanceof Error) { + return $params; + } - // Make sure named parameters are passed in correct order. - if (is_string(key($params))) { - if (count($params) < count($serviceParams)) { - $params = $this->getDefaultParams($params, $serviceParams); - } + try { + $result = $this->_dispatch($invokable, $params); + } catch (PhpException $e) { + return $this->fault($e->getMessage(), $e->getCode(), $e); + } - $callback = $invokable->getCallback(); - if ('function' == $callback->getType()) { - $reflection = new ReflectionFunction($callback->getFunction()); - } else { - $reflection = new ReflectionMethod( - $callback->getClass(), - $callback->getMethod() - ); - } + $this->getResponse()->setResult($result); + } - $orderedParams = []; - foreach ($reflection->getParameters() as $refParam) { - if (array_key_exists($refParam->getName(), $params)) { - $orderedParams[$refParam->getName()] = $params[$refParam->getName()]; - continue; - } + /** + * @param array $requestedParams + * @param array $serviceParams + * @param Method\Definition $invokable + * @return array|Error Array of parameters to use when calling the requested + * method on success, Error if there is a mismatch between request + * parameters and the method signature. + */ + private function validateAndPrepareParams(array $requestedParams, array $serviceParams, Method\Definition $invokable) + { + return is_string(key($requestedParams)) + ? $this->validateAndPrepareNamedParams($requestedParams, $serviceParams, $invokable) + : $this->validateAndPrepareOrderedParams($requestedParams, $serviceParams); + } - if ($refParam->isOptional()) { - $orderedParams[$refParam->getName()] = null; - continue; - } + /** + * Ensures named parameters are passed in the correct order. + * + * @param array $requestedParams + * @param array $serviceParams + * @param Method\Definition $invokable + * @return array|Error Array of parameters to use when calling the requested + * method on success, Error if any named request parameters do not match + * those of the method requested. + */ + private function validateAndPrepareNamedParams(array $requestedParams, array $serviceParams, Method\Definition $invokable) + { + if (count($requestedParams) < count($serviceParams)) { + $requestedParams = $this->getDefaultParams($requestedParams, $serviceParams); + } - return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS); - } + $callback = $invokable->getCallback(); + $reflection = 'function' == $callback->getType() + ? new ReflectionFunction($callback->getFunction()) + : new ReflectionMethod($callback->getClass(), $callback->getMethod()); - $params = $orderedParams; - } else { - $requiredParamsCount = 0; - foreach ($serviceParams as $param) { - if (!$param['optional']) { - $requiredParamsCount++; - } + $orderedParams = []; + foreach ($reflection->getParameters() as $refParam) { + if (array_key_exists($refParam->getName(), $requestedParams)) { + $orderedParams[$refParam->getName()] = $requestedParams[$refParam->getName()]; + continue; } - if (count($params) < $requiredParamsCount) { - return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS); + if ($refParam->isOptional()) { + $orderedParams[$refParam->getName()] = null; + continue; } + + return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS); } - try { - $result = $this->_dispatch($invokable, $params); - } catch (PhpException $e) { - return $this->fault($e->getMessage(), $e->getCode(), $e); + return $orderedParams; + } + + /** + * @param array $requestedParams + * @param array $serviceParams + * @return array|Error Array of parameters to use when calling the requested + * method on success, Error if the number of request parameters does not + * match the number of parameters required by the requested method. + */ + private function validateAndPrepareOrderedParams(array $requestedParams, array $serviceParams) + { + $requiredParamsCount = array_reduce($serviceParams, function ($count, $param) { + $count += $param['optional'] ? 0 : 1; + return $count; + }, 0); + + if (count($requestedParams) < $requiredParamsCount) { + return $this->fault('Invalid params', Error::ERROR_INVALID_PARAMS); } - $this->getResponse()->setResult($result); + return $requestedParams; } } diff --git a/test/ServerTest.php b/test/ServerTest.php index 039639a..507cd57 100644 --- a/test/ServerTest.php +++ b/test/ServerTest.php @@ -1,10 +1,8 @@ Date: Wed, 25 Apr 2018 17:00:02 -0500 Subject: [PATCH 44/59] Adds CHANGELOG entry for #4 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e64abed..5befe53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed +- [#4](https://github.com/zendframework/zend-json-server/pull/4) provides a fix to how parameters are validated, ensuring default values + are provided when known (and only when named parameters are provided), and an error + is raised when not enough parameters are provided. + - [#2](https://github.com/zendframework/zend-json-server/pull/2) fixes an issue with how the `Response::setOptions()` method would handle a key of `0`; previously, it would (incorrectly) set the JSON-RPC version of the response; now it does not. From 0fa30d6cd1390dc9e34a1189afd7eabea373d2bb Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:04:29 -0500 Subject: [PATCH 45/59] Minor CS issues - Updated docblocks on changed files - Reworded test method - Space after `!` operators - Wrapped long lines --- src/Client.php | 12 ++++++------ src/Server.php | 14 ++++++++++---- test/ClientTest.php | 10 +++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/Client.php b/src/Client.php index 8a1abe7..18bde43 100644 --- a/src/Client.php +++ b/src/Client.php @@ -1,8 +1,8 @@ httpClient->setUri($this->serverAddress); } - // set default Accept and Content-Type headers unless already set + // Set default Accept and Content-Type headers unless already set. $headers = $httpRequest->getHeaders(); $headersToAdd = []; - if (!$headers->has('Content-Type')) { + if (! $headers->has('Content-Type')) { $headersToAdd['Content-Type'] = 'application/json-rpc'; } - if (!$headers->has('Accept')) { + if (! $headers->has('Accept')) { $headersToAdd['Accept'] = 'application/json-rpc'; } $headers->addHeaders($headersToAdd); diff --git a/src/Server.php b/src/Server.php index 03c7ae8..42f3854 100644 --- a/src/Server.php +++ b/src/Server.php @@ -601,8 +601,11 @@ protected function handleRequest() * method on success, Error if there is a mismatch between request * parameters and the method signature. */ - private function validateAndPrepareParams(array $requestedParams, array $serviceParams, Method\Definition $invokable) - { + private function validateAndPrepareParams( + array $requestedParams, + array $serviceParams, + Method\Definition $invokable + ) { return is_string(key($requestedParams)) ? $this->validateAndPrepareNamedParams($requestedParams, $serviceParams, $invokable) : $this->validateAndPrepareOrderedParams($requestedParams, $serviceParams); @@ -618,8 +621,11 @@ private function validateAndPrepareParams(array $requestedParams, array $service * method on success, Error if any named request parameters do not match * those of the method requested. */ - private function validateAndPrepareNamedParams(array $requestedParams, array $serviceParams, Method\Definition $invokable) - { + private function validateAndPrepareNamedParams( + array $requestedParams, + array $serviceParams, + Method\Definition $invokable + ) { if (count($requestedParams) < count($serviceParams)) { $requestedParams = $this->getDefaultParams($requestedParams, $serviceParams); } diff --git a/test/ClientTest.php b/test/ClientTest.php index f3e582d..307f018 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -1,8 +1,8 @@ assertSame('application/json-rpc', $jsonClient->getHttpClient()->getHeader('Accept')); } - public function testClientShouldNotSetDefaultAcceptAndContentTypeHeadersOnRequestIfTheyAlreadyExist() + public function testClientShouldNotOverwriteAcceptAndContentTypeHeadersIfAlreadyPresentInRequest() { $request = new Request(); $response = new HttpResponse(); From 851a194661aecf06dd606a91bdf9a5a5cede42a2 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:07:05 -0500 Subject: [PATCH 46/59] Adds CHANGELOG entries for #6 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5befe53..a97de8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ All notable changes to this project will be documented in this file, in reverse ### Changed -- Nothing. +- [#6](https://github.com/zendframework/zend-json-server/pull/6) updates the default `Accept` and `Content-Type` header values issued + by the `Client` to `application/json-rpc`, which is more correct per the JSON-RPC spec. ### Deprecated @@ -22,6 +23,9 @@ All notable changes to this project will be documented in this file, in reverse ### Fixed +- [#6](https://github.com/zendframework/zend-json-server/pull/6) fixes how the `Client` handles the `Accept` and `Content-Type` headers, + honoring those already present in the request, and providing defaults if not. + - [#4](https://github.com/zendframework/zend-json-server/pull/4) provides a fix to how parameters are validated, ensuring default values are provided when known (and only when named parameters are provided), and an error is raised when not enough parameters are provided. From 7d0344031bddf5f62572d0d5654f2887f0b20647 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:10:52 -0500 Subject: [PATCH 47/59] Adds missing import in ClientTest --- test/ClientTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/ClientTest.php b/test/ClientTest.php index 37d83b0..10a66d3 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -14,6 +14,7 @@ use Zend\Json\Server\Client; use Zend\Json\Server\Error; use Zend\Json\Server\Exception; +use Zend\Json\Server\Request; use Zend\Json\Server\Response; class ClientTest extends TestCase From 70547f1e46991796835ce5d87d62241e4766c6de Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:11:48 -0500 Subject: [PATCH 48/59] Merges 3.0.1 changelog to 3.1.0 changelog --- CHANGELOG.md | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf4b27d..ef53c5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,24 +8,6 @@ All notable changes to this project will be documented in this file, in reverse - Nothing. -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 3.0.1 - TBD - -### Added - -- Nothing. - ### Changed - [#6](https://github.com/zendframework/zend-json-server/pull/6) updates the default `Accept` and `Content-Type` header values issued From dbf9ead90e2192665b902995b567c4e12c5430fb Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:12:50 -0500 Subject: [PATCH 49/59] Adds CHANGELOG entries for #13 --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef53c5a..5572a7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse ### Added -- Nothing. +- [#13](https://github.com/zendframework/zend-json-server/pull/13) adds support for PHP 7.1 and 7.2. ### Changed @@ -19,7 +19,9 @@ All notable changes to this project will be documented in this file, in reverse ### Removed -- Nothing. +- [#13](https://github.com/zendframework/zend-json-server/pull/13) removes support for PHP 5.5. + +- [#13](https://github.com/zendframework/zend-json-server/pull/13) removes support for HHVM. ### Fixed From 8ba3b7ad7c479cecd94c7cdfa78354567d891983 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:15:15 -0500 Subject: [PATCH 50/59] Updates branch aliases - dev-master => 3.1.x-dev - dev-develop => 3.2.x-dev --- composer.json | 4 ++-- composer.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 1b5b904..485667b 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,8 @@ }, "extra": { "branch-alias": { - "dev-master": "3.0.x-dev", - "dev-develop": "3.1.x-dev" + "dev-master": "3.1.x-dev", + "dev-develop": "3.2.x-dev" } }, "scripts": { diff --git a/composer.lock b/composer.lock index 4e859d8..880e7d0 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "708a00261f6955ba62d2f5898a280321", + "content-hash": "07ae7a353390f8c5fb4b45b76fc0de9b", "packages": [ { "name": "container-interop/container-interop", From e869ee8c13b085991b2d79a8b3839be29df2cb78 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:15:53 -0500 Subject: [PATCH 51/59] Adds date for 3.1.0 release to CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5572a7a..11507d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 3.1.0 - TBD +## 3.1.0 - 2018-04-25 ### Added From b1616e70302dc4d6c46eba6a4a0355e33e3e52af Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 25 Apr 2018 17:17:50 -0500 Subject: [PATCH 52/59] Bumped to next dev version (3.1.1) --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11507d6..8ca2e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.1.1 - TBD + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 3.1.0 - 2018-04-25 ### Added From b60bad31a131d8fab546c5a3c83e3bb176353a62 Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 15 Dec 2018 13:18:13 +0000 Subject: [PATCH 53/59] Added PHP 7.3 support - updated Travis CI configuration --- .travis.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5724a01..c5c0e62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,3 @@ -sudo: false - language: php cache: @@ -53,6 +51,15 @@ matrix: - php: 7.2 env: - DEPS=latest + - php: 7.3 + env: + - DEPS=lowest + - php: 7.3 + env: + - DEPS=locked + - php: 7.3 + env: + - DEPS=latest before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi From d752fc6994ff67c5bddf6a25bcf1aaa0c3cabf3f Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 29 Dec 2018 08:10:57 -0600 Subject: [PATCH 54/59] Removes support for zend-stdlib v2 releases --- composer.json | 3 +++ composer.lock | 27 ++++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 485667b..d64cca6 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,9 @@ "Zend\\Json\\Server\\": "src/" } }, + "conflict": { + "zendframework/zend-stdlib": "<3.2.1" + }, "autoload-dev": { "files": [ "test/TestAsset/FooFunc.php" diff --git a/composer.lock b/composer.lock index 880e7d0..b3119b1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "07ae7a353390f8c5fb4b45b76fc0de9b", + "content-hash": "b644cc2ce72d6ba38ff9757b96809a8b", "packages": [ { "name": "container-interop/container-interop", @@ -432,31 +432,31 @@ }, { "name": "zendframework/zend-stdlib", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "debedcfc373a293f9250cc9aa03cf121428c8e78" + "reference": "66536006722aff9e62d1b331025089b7ec71c065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/debedcfc373a293f9250cc9aa03cf121428c8e78", - "reference": "debedcfc373a293f9250cc9aa03cf121428c8e78", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/66536006722aff9e62d1b331025089b7ec71c065", + "reference": "66536006722aff9e62d1b331025089b7ec71c065", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, "require-dev": { - "athletic/athletic": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "^2.6.2" + "phpbench/phpbench": "^0.13", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev", - "dev-develop": "3.2-dev" + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" } }, "autoload": { @@ -468,12 +468,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-stdlib", + "description": "SPL extensions, array utilities, error handlers, and more", "keywords": [ + "ZendFramework", "stdlib", - "zf2" + "zf" ], - "time": "2016-09-13T14:38:50+00:00" + "time": "2018-08-28T21:34:05+00:00" }, { "name": "zendframework/zend-uri", From 66bf2ff7aec74e9f27472e474d94e088231005a4 Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 29 Dec 2018 08:12:09 -0600 Subject: [PATCH 55/59] Adds CHANGELOG entry for #14 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6894435..30eabb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse ### Added -- Nothing. +- [#14](https://github.com/zendframework/zend-json-server/pull/14) adds support for PHP 7.3. ### Changed @@ -18,7 +18,7 @@ All notable changes to this project will be documented in this file, in reverse ### Removed -- Nothing. +- [#14](https://github.com/zendframework/zend-json-server/pull/14) removes support for zend-stdlib v2 releases. ### Fixed From 373f7cf205389da0573263f20df7cad2d7903a40 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 17 Oct 2019 09:36:01 -0500 Subject: [PATCH 56/59] release: 3.2.0 readiness - Updates CHANGELOG: - Removes empty stub for 3.1.1 release. - Sets date for 3.2.0 release. - Updates branch aliases: - dev-master => 3.2.x-dev - dev-develop => 3.3.x-dev --- CHANGELOG.md | 24 +----------------------- composer.json | 4 ++-- composer.lock | 2 +- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30eabb0..959d7cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 3.2.0 - TBD +## 3.2.0 - 2019-10-17 ### Added @@ -24,28 +24,6 @@ All notable changes to this project will be documented in this file, in reverse - Nothing. -## 3.1.1 - TBD - -### Added - -- Nothing. - -### Changed - -- Nothing. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - ## 3.1.0 - 2018-04-25 ### Added diff --git a/composer.json b/composer.json index d64cca6..9d99e7b 100644 --- a/composer.json +++ b/composer.json @@ -48,8 +48,8 @@ }, "extra": { "branch-alias": { - "dev-master": "3.1.x-dev", - "dev-develop": "3.2.x-dev" + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" } }, "scripts": { diff --git a/composer.lock b/composer.lock index b3119b1..df0d787 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b644cc2ce72d6ba38ff9757b96809a8b", + "content-hash": "f08a2a3612d4f1870b4275a6300c7f09", "packages": [ { "name": "container-interop/container-interop", From 02f76f0b7be87078d78fc443f7f91401867750f0 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 17 Oct 2019 09:37:44 -0500 Subject: [PATCH 57/59] Bump version to 3.2.1 --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 959d7cb..444d391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.2.1 - TBD + +### Added + +- Nothing. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 3.2.0 - 2019-10-17 ### Added From 2819bef0769f4f3496b8d79b5443779638735c78 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Tue, 31 Dec 2019 15:33:24 -0600 Subject: [PATCH 58/59] Marking package as abandoned --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 316b29f..98a57b5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # zend-json-server +> ## Repository abandoned 2019-12-31 +> +> This repository has moved to laminas/laminas-json-server. + [![Build Status](https://secure.travis-ci.org/zendframework/zend-json-server.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-json-server) [![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-json-server/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-json-server?branch=master) Provides a JSON-RPC server implementation. - File issues at https://github.com/zendframework/zend-json-server/issues -- Documentation is at https://docs.zendframework.com/zend-json-server/ +- Documentation is at https://docs.zendframework.com/zend-json-server/ \ No newline at end of file From 3e698f5d015426fcea9649fd81d583bb5fc7fdcd Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 20 Jan 2020 13:38:53 -0600 Subject: [PATCH 59/59] Link to new repository --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 98a57b5..2b4647c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ > ## Repository abandoned 2019-12-31 > -> This repository has moved to laminas/laminas-json-server. +> This repository has moved to [laminas/laminas-json-server](https://github.com/laminas/laminas-json-server). [![Build Status](https://secure.travis-ci.org/zendframework/zend-json-server.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-json-server) [![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-json-server/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-json-server?branch=master) @@ -10,4 +10,4 @@ Provides a JSON-RPC server implementation. - File issues at https://github.com/zendframework/zend-json-server/issues -- Documentation is at https://docs.zendframework.com/zend-json-server/ \ No newline at end of file +- Documentation is at https://docs.zendframework.com/zend-json-server/