From 13d6e5d02c25203703117c3d1bb969f45403955e Mon Sep 17 00:00:00 2001 From: Witold Wasiczko Date: Thu, 25 Aug 2016 13:13:08 +0200 Subject: [PATCH 01/25] Allow auth interface into auth user id provider --- src/Provider/UserId/AuthenticationService.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Provider/UserId/AuthenticationService.php b/src/Provider/UserId/AuthenticationService.php index 74bf5db..681e8c7 100644 --- a/src/Provider/UserId/AuthenticationService.php +++ b/src/Provider/UserId/AuthenticationService.php @@ -6,13 +6,13 @@ namespace ZF\OAuth2\Provider\UserId; -use Zend\Authentication\AuthenticationService as ZendAuthenticationService; +use Zend\Authentication\AuthenticationServiceInterface; use Zend\Stdlib\RequestInterface; class AuthenticationService implements UserIdProviderInterface { /** - * @var ZendAuthenticationService + * @var AuthenticationServiceInterface */ private $authenticationService; @@ -24,10 +24,10 @@ class AuthenticationService implements UserIdProviderInterface /** * Set authentication service * - * @param ZendAuthenticationService $service + * @param AuthenticationServiceInterface $service * @param array $config */ - public function __construct(ZendAuthenticationService $service = null, $config = []) + public function __construct(AuthenticationServiceInterface $service = null, $config = []) { $this->authenticationService = $service; @@ -37,14 +37,14 @@ public function __construct(ZendAuthenticationService $service = null, $config = } /** - * Use Zend\Authentication\AuthenticationService to fetch the identity. + * Use implementation of Zend\Authentication\AuthenticationServiceInterface to fetch the identity. * * @param RequestInterface $request * @return mixed */ public function __invoke(RequestInterface $request) { - if (empty($this->authenticationService)) { + if (null === $this->authenticationService) { return null; } From 926563ce86cfef60b35341861d47791cf2365b11 Mon Sep 17 00:00:00 2001 From: bertrandgauthier Date: Thu, 12 Jan 2017 11:51:40 +0100 Subject: [PATCH 02/25] module.config.php references classes that do not exist --- config/module.config.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/module.config.php b/config/module.config.php index 0e30506..ad2200d 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -9,7 +9,7 @@ return [ 'controllers' => [ 'factories' => [ - Controller\Auth::class => Factory\AuthControllerFactory::class, + 'ZF\OAuth2\Controller\Auth' => Factory\AuthControllerFactory::class, ], ], 'router' => [ @@ -19,7 +19,7 @@ 'options' => [ 'route' => '/oauth', 'defaults' => [ - 'controller' => Controller\Auth::class, + 'controller' => 'ZF\OAuth2\Controller\Auth', 'action' => 'token', ], ], @@ -67,14 +67,14 @@ ], 'service_manager' => [ 'aliases' => [ - Provider\UserId::class => Provider\UserId\AuthenticationService::class, + 'ZF\OAuth2\Provider\UserId' => Provider\UserId\AuthenticationService::class, ], 'factories' => [ Adapter\PdoAdapter::class => Factory\PdoAdapterFactory::class, Adapter\IbmDb2Adapter::class => Factory\IbmDb2AdapterFactory::class, Adapter\MongoAdapter::class => Factory\MongoAdapterFactory::class, Provider\UserId\AuthenticationService::class => Provider\UserId\AuthenticationServiceFactory::class, - Service\OAuth2Server::class => Factory\OAuth2ServerFactory::class + 'ZF\OAuth2\Service\OAuth2Server' => Factory\OAuth2ServerFactory::class ] ], 'view_manager' => [ @@ -118,7 +118,7 @@ ], 'zf-content-negotiation' => [ 'controllers' => [ - Controller\Auth::class => [ + 'ZF\OAuth2\Controller\Auth' => [ 'ZF\ContentNegotiation\JsonModel' => [ 'application/json', 'application/*+json', From 7dbc24d296c4a4b0e4fe0e5f010cb118ca2d2aa9 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Tue, 10 Apr 2018 13:34:58 -0600 Subject: [PATCH 03/25] Include all server options in config file --- config/oauth2.local.php.dist | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/config/oauth2.local.php.dist b/config/oauth2.local.php.dist index f081b63..677ae62 100644 --- a/config/oauth2.local.php.dist +++ b/config/oauth2.local.php.dist @@ -6,9 +6,31 @@ return [ 'username' => 'insert here the DB username', 'password' => 'insert here the DB password', ], - 'allow_implicit' => false, // default (set to true when you need to support browser-based or mobile apps) + 'storage' => 'ZF\OAuth2\Adapter\PdoAdapter', // service name for the OAuth2 storage adapter + + /** + * These special OAuth2Server options are parsed outside the options array + */ + 'allow_implicit' => false, // default (set to true when you need to support browser-based or mobile apps) 'access_lifetime' => 3600, // default (set a value in seconds for access tokens lifetime) - 'enforce_state' => true, // default - 'storage' => 'ZF\OAuth2\Adapter\PdoAdapter', // service name for the OAuth2 storage adapter + 'enforce_state' => true, // default + + /** + * These are all OAuth2Server options with their default values + */ + 'options' => [ + 'use_jwt_access_tokens' => false, + 'store_encrypted_token_string' => true, + 'use_openid_connect' => false, + 'id_lifetime' => 3600, + 'www_realm' => 'Service', + 'token_param_name' => 'access_token', + 'token_bearer_header_name' => 'Bearer', + 'require_exact_redirect_uri' => true, + 'allow_credentials_in_request_body' => true, + 'allow_public_clients' => true, + 'always_issue_new_refresh_token' => false, + 'unset_refresh_token_after_use' => true, + ], ], ]; From 234989f78813f005b46d2db1549f9e48c2935ae2 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 15:41:28 -0500 Subject: [PATCH 04/25] Removes empty 1.4.1 stub from CHANGELOG --- CHANGELOG.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0009854..67c47dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,21 +8,7 @@ All notable changes to this project will be documented in this file, in reverse - Nothing. -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Nothing. - -## 1.4.1 - TBD - -### Added +### Changed - Nothing. From aa88bd8fea93c64d5e36904a61e45b349632745f Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 15:43:51 -0500 Subject: [PATCH 05/25] Adds CHANGELOG entry for #151 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67c47dd..11a6817 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. +- [#151](https://github.com/zfcampus/zf-oauth2/pull/151) updates `ZF\OAuth2\Provider\UserId\AuthenticationService` to allow injecting any + `Zend\Authentication\AuthenticationServiceInterface` implementation, not just `Zend\Authentication\AuthenticationService`. ### Deprecated From c89dc1a22d7380affb8c4c5138541f79f54aceed Mon Sep 17 00:00:00 2001 From: Joao Dias Date: Tue, 25 Apr 2017 15:24:32 +0200 Subject: [PATCH 06/25] Inherit code from token exception --- src/Controller/AuthController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Controller/AuthController.php b/src/Controller/AuthController.php index deb7d48..90d35a7 100644 --- a/src/Controller/AuthController.php +++ b/src/Controller/AuthController.php @@ -106,8 +106,13 @@ public function tokenAction() try { $response = $oauth2server->handleTokenRequest($oauth2request); } catch (ProblemExceptionInterface $ex) { + $status = $ex->getCode(); + if (empty($status)) { + $status = 401; + } + return new ApiProblemResponse( - new ApiProblem(401, $ex) + new ApiProblem($status, $ex) ); } From 8ed32ee7f71d4da8ab3f90a554b78bb59de3fb85 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 16:37:40 -0500 Subject: [PATCH 07/25] Incorporate feedback and provide tests Incorporates feedback: make assignment a short ternary, and add a second assignment ternary based on code range. Also adds unit tests. --- src/Controller/AuthController.php | 6 +- test/Controller/AuthControllerTest.php | 101 ++++++++++++++++++ test/Controller/TestAsset/BodyParams.php | 17 +++ .../CustomProblemDetailsException.php | 32 ++++++ 4 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 test/Controller/TestAsset/BodyParams.php create mode 100644 test/Controller/TestAsset/CustomProblemDetailsException.php diff --git a/src/Controller/AuthController.php b/src/Controller/AuthController.php index 90d35a7..a8a04a2 100644 --- a/src/Controller/AuthController.php +++ b/src/Controller/AuthController.php @@ -106,10 +106,8 @@ public function tokenAction() try { $response = $oauth2server->handleTokenRequest($oauth2request); } catch (ProblemExceptionInterface $ex) { - $status = $ex->getCode(); - if (empty($status)) { - $status = 401; - } + $status = $ex->getCode() ?: 401; + $status = $status >=400 && $status < 600 ? $status : 401; return new ApiProblemResponse( new ApiProblem($status, $ex) diff --git a/test/Controller/AuthControllerTest.php b/test/Controller/AuthControllerTest.php index 598d9e1..5ca1c0d 100644 --- a/test/Controller/AuthControllerTest.php +++ b/test/Controller/AuthControllerTest.php @@ -6,11 +6,21 @@ namespace ZFTest\OAuth2\Controller; +use OAuth2\Request as OAuth2Request; +use OAuth2\Server as OAuth2Server; +use Prophecy\Argument; use ReflectionProperty; +use RuntimeException; use Zend\Db\Adapter\Adapter; use Zend\Db\Adapter\Driver\Pdo\Pdo as PdoDriver; use Zend\Db\Sql\Sql; +use Zend\Http\Request; +use Zend\Mvc\Controller\Plugin\Params; use Zend\Stdlib\Parameters; +use ZF\ApiProblem\ApiProblemResponse; +use ZF\ApiProblem\Exception\ProblemExceptionInterface; +use ZF\OAuth2\Controller\AuthController; +use ZF\OAuth2\Provider\UserId\UserIdProviderInterface; use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; class AuthControllerTest extends AbstractHttpControllerTestCase @@ -48,6 +58,29 @@ public function getDb() return $this->db; } + public function setRequest(AuthController $controller, Request $request) + { + $r = new ReflectionProperty($controller, 'request'); + $r->setAccessible(true); + $r->setValue($controller, $request); + } + + public function setBodyParamsPlugin(AuthController $controller) + { + $plugins = $controller->getPluginManager(); + $plugins->setService('bodyParams', new TestAsset\BodyParams()); + } + + public function setParamsPlugin(AuthController $controller, $key, $value) + { + $params = $this->prophesize(Params::class); + $params->__invoke($key)->willReturn($value); + $params->setController($controller)->shouldBeCalled(); + + $plugins = $controller->getPluginManager(); + $plugins->setService('params', $params->reveal()); + } + public function testToken() { $request = $this->getRequest(); @@ -349,4 +382,72 @@ protected function setIsOAuth2FormatResponse() $serviceManager->setAllowOverride(true); $serviceManager->setService('config', $config); } + + public function testTokenActionUsesCodeFromTokenExceptionIfPresentToCreateApiProblem() + { + $exception = new TestAsset\CustomProblemDetailsException('problem', 409); + $exception->type = 'custom'; + $exception->title = 'title'; + $exception->details = ['some' => 'details']; + + $oauth2Server = $this->prophesize(OAuth2Server::class); + $oauth2Server + ->handleTokenRequest(Argument::type(OAuth2Request::class)) + ->willThrow($exception); + $factory = function () use ($oauth2Server) { + return $oauth2Server->reveal(); + }; + + $provider = $this->prophesize(UserIdProviderInterface::class)->reveal(); + + $controller = new AuthController($factory, $provider); + $this->setBodyParamsPlugin($controller); + $this->setParamsPlugin($controller, 'oauth', []); + + $request = $this->getRequest(); + $request->setMethod('POST'); + $this->setRequest($controller, $request); + + $result = $controller->tokenAction(); + $this->assertInstanceOf(ApiProblemResponse::class, $result); + $problem = $result->getApiProblem(); + $this->assertEquals(409, $problem->status); + $this->assertEquals('custom', $problem->type); + $this->assertEquals('title', $problem->title); + $this->assertEquals('details', $problem->some); + } + + public function testTokenActionUses401CodeIfTokenExceptionCodeIsInvalidWhenCreatingApiProblem() + { + $exception = new TestAsset\CustomProblemDetailsException('problem', 601); + $exception->type = 'custom'; + $exception->title = 'title'; + $exception->details = ['some' => 'details']; + + $oauth2Server = $this->prophesize(OAuth2Server::class); + $oauth2Server + ->handleTokenRequest(Argument::type(OAuth2Request::class)) + ->willThrow($exception); + $factory = function () use ($oauth2Server) { + return $oauth2Server->reveal(); + }; + + $provider = $this->prophesize(UserIdProviderInterface::class)->reveal(); + + $controller = new AuthController($factory, $provider); + $this->setBodyParamsPlugin($controller); + $this->setParamsPlugin($controller, 'oauth', []); + + $request = $this->getRequest(); + $request->setMethod('POST'); + $this->setRequest($controller, $request); + + $result = $controller->tokenAction(); + $this->assertInstanceOf(ApiProblemResponse::class, $result); + $problem = $result->getApiProblem(); + $this->assertEquals(401, $problem->status); + $this->assertEquals('custom', $problem->type); + $this->assertEquals('title', $problem->title); + $this->assertEquals('details', $problem->some); + } } diff --git a/test/Controller/TestAsset/BodyParams.php b/test/Controller/TestAsset/BodyParams.php new file mode 100644 index 0000000..e4edaf9 --- /dev/null +++ b/test/Controller/TestAsset/BodyParams.php @@ -0,0 +1,17 @@ +type; + } + + public function getTitle() + { + return $this->title; + } + + public function getAdditionalDetails() + { + return $this->details; + } +} From 6707ad9397bac2f99672794e956d77a7f4fcdc47 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 16:39:42 -0500 Subject: [PATCH 08/25] Adds CHANGELOG entry for #160 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a6817..8db7c55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ All notable changes to this project will be documented in this file, in reverse ### Changed +- [#160](https://github.com/zfcampus/zf-oauth2/pull/160) alters `AuthController::tokenAction()` such that it uses the exception code from + a caught `ProblemExceptionInterface` instance as the ApiProblem status if it falls in the 400-600 range. + - [#151](https://github.com/zfcampus/zf-oauth2/pull/151) updates `ZF\OAuth2\Provider\UserId\AuthenticationService` to allow injecting any `Zend\Authentication\AuthenticationServiceInterface` implementation, not just `Zend\Authentication\AuthenticationService`. From c40cd9b58d8af918f368b640bd892ebf545cf535 Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 5 May 2018 17:29:48 +0100 Subject: [PATCH 09/25] Results of running `zf-maintainer rebase-doc-templates` --- .coveralls.yml | 2 + .gitattributes | 9 ++ .gitignore | 7 +- CONTRIBUTING.md | 80 ----------- LICENSE.md | 13 +- README.md | 41 ++---- composer.json | 28 ++-- composer.lock | 127 +++++++++-------- CONDUCT.md => docs/CODE_OF_CONDUCT.md | 2 +- docs/CONTRIBUTING.md | 189 ++++++++++++++++++++++++++ docs/ISSUE_TEMPLATE.md | 19 +++ docs/PULL_REQUEST_TEMPLATE.md | 25 ++++ docs/SUPPORT.md | 25 ++++ 13 files changed, 378 insertions(+), 189 deletions(-) create mode 100644 .coveralls.yml create mode 100644 .gitattributes delete mode 100644 CONTRIBUTING.md rename CONDUCT.md => docs/CODE_OF_CONDUCT.md (96%) create mode 100644 docs/CONTRIBUTING.md create mode 100644 docs/ISSUE_TEMPLATE.md create mode 100644 docs/PULL_REQUEST_TEMPLATE.md create mode 100644 docs/SUPPORT.md diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..bc71b62 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,2 @@ +coverage_clover: clover.xml +json_path: coveralls-upload.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6f9bfcf --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +/.coveralls.yml export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/composer.lock export-ignore +/docs/ export-ignore +/phpcs.xml export-ignore +/phpunit.xml.dist export-ignore +/test/ export-ignore diff --git a/.gitignore b/.gitignore index 587c423..d822fd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -.idea/ -vendor/ -phpunit.xml +/clover.xml +/coveralls-upload.json +/phpunit.xml +/vendor/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 62fdd14..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,80 +0,0 @@ -# CONTRIBUTING - -Apigility and related modules (of which this is one) are open source and licensed -as [BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause). Contributions -are welcome in the form of issue reports and pull requests. - -All pull requests should include unit tests when applicable, and should follow -our coding standards (more on these below); failure to do so may result in -rejection of the pull request. If you need help writing tests, please ask on the -developer mailing list and/or in IRC. - -## RESOURCES - -If you wish to contribute to Apigility modules, please be sure to -read/subscribe to the following resources: - - - [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) - - [ZF Git Guide](https://github.com/zendframework/zf2/blob/master/README-GIT.md) - - [Apigility developer mailing list](http://bit.ly/apigility-dev) - - Apigility developer IRC channel: #apigility-dev on Freenode.net - -If you are working on new features, refactoring an existing module, or proposing -a new module, please send an email to the developer mailing list. - -## REPORTING POTENTIAL SECURITY ISSUES - -If you have encountered a potential security vulnerability in any Apigility -module, please report it to us at [zf-security@zend.com](mailto:zf-security@zend.com). -We will work with you to verify the vulnerability and patch it. - -When reporting issues, please provide the following information: - -- Module(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 Apigility 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). - -## RUNNING TESTS - -First, use [Composer](https://getcomposer.org) to install all dependencies: - -```console -$ composer install -``` - -To run tests: - -```console -$ composer test -``` - -## CODING STANDARDS - -While Apigility uses Zend Framework 2 coding standards, in practice, we check -standards against PSR-1/2. To check for CS issues: - -```console -$ composer cs-check -``` - -This will report CS issues. You can also attempt to fix many reported errors -automatically: - -```console -$ composer cs-fix -``` - -If you use `cs-fix` to fix issues, make certain you add and commit any files -changed! - -## Conduct - -Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/LICENSE.md b/LICENSE.md index 94fe586..3aa0dce 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,16 +1,15 @@ -Copyright (c) 2014-2016, Zend Technologies USA, Inc. - +Copyright (c) 2014-2018, 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/README.md b/README.md index 8bcf409..bfba938 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,18 @@ -Zf-OAuth2 -========= +# zf-oauth2 -[![Build Status](https://travis-ci.org/zfcampus/zf-oauth2.png)](https://travis-ci.org/zfcampus/zf-oauth2) +[![Build Status](https://secure.travis-ci.org/zfcampus/zf-oauth2.svg?branch=master)](https://secure.travis-ci.org/zfcampus/zf-oauth2) +[![Coverage Status](https://coveralls.io/repos/github/zfcampus/zf-oauth2/badge.svg?branch=master)](https://coveralls.io/github/zfcampus/zf-oauth2?branch=master) -ZF2 module for [OAuth2](http://oauth.net/2/) authentication. +ZF module for [OAuth2](http://oauth.net/2/) authentication. This module uses the [oauth2-server-php](https://github.com/bshaffer/oauth2-server-php) library by Brent Shaffer to provide OAuth2 support. -Requirements ------------- +## Requirements Please see the [composer.json](composer.json) file. -Installation ------------- +## Installation You can install using: @@ -47,8 +45,7 @@ configuration: > that plugin will install zf-oauth2 and its other Apigility dependencies as > modules for you. -Configuration -------------- +## Configuration This module uses any PDO-suported database to manage the OAuth2 information (users, client, token, etc). The database structure is stored in @@ -141,8 +138,7 @@ return array( ); ``` -Mongo Configuration -------------------- +## Mongo Configuration The Mongo OAuth2 adapter wraps the bshaffer adapter by adding the same password encryption as the rest of apigility. The collections needed are the same as above in the PDO @@ -158,8 +154,7 @@ oauth_clients collection: } ``` -User ID Provider ----------------- +## User ID Provider When a user requests an authorization code they may provide their user_id as a request parameter to the `/oauth/authorize` route. This will store the `user_id` in the `access_token`, `refresh_token`, @@ -188,8 +183,7 @@ return array( ); ``` -How to test OAuth2 ------------------- +## How to test OAuth2 To test the OAuth2 module, you have to add a `client_id` and a `client_secret` into the oauth2 database. If you are using the SQLite test database, you don't @@ -232,8 +226,7 @@ To test the OAuth2 module, you can use an HTTP client like [HTTPie](https://github.com/jkbr/httpie) or [CURL](http://curl.haxx.se/). The examples below use HTTPie and the test account "testclient"/"testpass". -REQUEST TOKEN (client\_credentials) ------------------------------------ +## REQUEST TOKEN (client\_credentials) You can request an OAuth2 token using the following HTTPie command: @@ -260,8 +253,7 @@ call, a [TLS/SSL](http://en.wikipedia.org/wiki/Transport_Layer_Security) connection is required. -AUTHORIZE (code) ----------------- +## AUTHORIZE (code) If you have to integrate an OAuth2 service with a web application, you need to use the Authorization Code grant type. This grant requires an approval step to @@ -346,8 +338,7 @@ var parseQueryString = function( queryString ) { var tokenParams = parseQueryString(window.location.hash.substr(1)); ``` -REVOKE (code) -------------- +## REVOKE (code) Starting with version 1.4.0, you can revoke access tokens. By default, revocation happens via a POST request to the path `/oauth/revoke`, which expects a payload @@ -359,8 +350,7 @@ with: The payload may be delivered as `application/x-www-form-urlencoded` or as JSON. -Access a test resource ----------------------- +## Access a test resource When you obtain a valid token, you can access a restricted API resource. The OAuth2 module is shipped with a test resource that is accessible with the URL @@ -378,8 +368,7 @@ As you can see, the OAuth2 module supports the data either via POST, using the `access_token` value, or using the [Bearer](http://tools.ietf.org/html/rfc6750) authorization header. -How to protect your API using OAuth2 ------------------------------------- +## How to protect your API using OAuth2 You can protect your API using the following code (for instance, at the top of a controller): diff --git a/composer.json b/composer.json index 52b5c8a..bb1af19 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,20 @@ { "name": "zfcampus/zf-oauth2", - "description": "ZF2 module for implementing an OAuth2 server", + "description": "ZF module for implementing an OAuth2 server", "license": "BSD-3-Clause", "keywords": [ + "zendframework", "api", "oauth2", "framework", - "zf2" + "zf" ], - "extra": { - "branch-alias": { - "dev-master": "1.4-dev", - "dev-develop": "1.5-dev" - } + "support": { + "issues": "https://github.com/zfcampus/zf-oauth2/issues", + "source": "https://github.com/zfcampus/zf-oauth2", + "rss": "https://github.com/zfcampus/zf-oauth2/releases.atom", + "chat": "https://zendframework-slack.herokuapp.com", + "forum": "https://discourse.zendframework.com/c/questions/apigility" }, "require": { "php": "^5.6 || ^7.0", @@ -49,6 +51,15 @@ "ZFTest\\OAuth2\\": "test/" } }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev", + "dev-develop": "1.5.x-dev" + } + }, "bin": [ "bin/bcrypt.php" ], @@ -59,6 +70,7 @@ ], "cs-check": "phpcs", "cs-fix": "phpcbf", - "test": "phpunit" + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } } diff --git a/composer.lock b/composer.lock index 8e7993a..94221be 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +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" ], - "hash": "8b3de83ffe9f5472dde021837257fc13", - "content-hash": "b30b519e713ba722c3bf7a97a2d4cc17", + "content-hash": "851d0100a913bf5ac3102ee98afff252", "packages": [ { "name": "bshaffer/oauth2-server-php", @@ -54,7 +53,7 @@ "oauth", "oauth2" ], - "time": "2015-09-18 18:05:10" + "time": "2015-09-18T18:05:10+00:00" }, { "name": "container-interop/container-interop", @@ -81,7 +80,7 @@ "MIT" ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "time": "2014-12-30 15:22:37" + "time": "2014-12-30T15:22:37+00:00" }, { "name": "paragonie/random_compat", @@ -129,7 +128,7 @@ "pseudorandom", "random" ], - "time": "2016-04-03 06:00:07" + "time": "2016-04-03T06:00:07+00:00" }, { "name": "zendframework/zend-config", @@ -185,7 +184,7 @@ "config", "zf2" ], - "time": "2016-02-04 23:01:10" + "time": "2016-02-04T23:01:10+00:00" }, { "name": "zendframework/zend-crypt", @@ -236,7 +235,7 @@ "crypt", "zf2" ], - "time": "2016-06-21 18:15:32" + "time": "2016-06-21T18:15:32+00:00" }, { "name": "zendframework/zend-escaper", @@ -280,7 +279,7 @@ "escaper", "zf2" ], - "time": "2016-06-30 19:48:38" + "time": "2016-06-30T19:48:38+00:00" }, { "name": "zendframework/zend-eventmanager", @@ -334,7 +333,7 @@ "events", "zf2" ], - "time": "2016-02-18 20:53:00" + "time": "2016-02-18T20:53:00+00:00" }, { "name": "zendframework/zend-filter", @@ -394,7 +393,7 @@ "filter", "zf2" ], - "time": "2016-04-18 18:32:43" + "time": "2016-04-18T18:32:43+00:00" }, { "name": "zendframework/zend-http", @@ -444,7 +443,7 @@ "http", "zf2" ], - "time": "2016-02-04 20:36:48" + "time": "2016-02-04T20:36:48+00:00" }, { "name": "zendframework/zend-json", @@ -494,7 +493,7 @@ "json", "zf2" ], - "time": "2016-04-01 02:34:00" + "time": "2016-04-01T02:34:00+00:00" }, { "name": "zendframework/zend-loader", @@ -538,7 +537,7 @@ "loader", "zf2" ], - "time": "2015-06-03 14:05:47" + "time": "2015-06-03T14:05:47+00:00" }, { "name": "zendframework/zend-math", @@ -588,7 +587,7 @@ "math", "zf2" ], - "time": "2016-04-28 17:37:42" + "time": "2016-04-28T17:37:42+00:00" }, { "name": "zendframework/zend-modulemanager", @@ -647,7 +646,7 @@ "modulemanager", "zf2" ], - "time": "2016-05-16 21:21:11" + "time": "2016-05-16T21:21:11+00:00" }, { "name": "zendframework/zend-mvc", @@ -712,7 +711,7 @@ "mvc", "zf2" ], - "time": "2016-06-30 20:30:28" + "time": "2016-06-30T20:30:28+00:00" }, { "name": "zendframework/zend-router", @@ -773,7 +772,7 @@ "routing", "zf2" ], - "time": "2016-05-31 20:47:48" + "time": "2016-05-31T20:47:48+00:00" }, { "name": "zendframework/zend-servicemanager", @@ -828,7 +827,7 @@ "servicemanager", "zf" ], - "time": "2016-06-01 16:50:58" + "time": "2016-06-01T16:50:58+00:00" }, { "name": "zendframework/zend-stdlib", @@ -873,7 +872,7 @@ "stdlib", "zf2" ], - "time": "2016-04-12 21:19:36" + "time": "2016-04-12T21:19:36+00:00" }, { "name": "zendframework/zend-uri", @@ -920,7 +919,7 @@ "uri", "zf2" ], - "time": "2016-02-17 22:38:51" + "time": "2016-02-17T22:38:51+00:00" }, { "name": "zendframework/zend-validator", @@ -991,7 +990,7 @@ "validator", "zf2" ], - "time": "2016-06-23 13:44:31" + "time": "2016-06-23T13:44:31+00:00" }, { "name": "zendframework/zend-view", @@ -1078,7 +1077,7 @@ "view", "zf2" ], - "time": "2016-06-30 22:28:07" + "time": "2016-06-30T22:28:07+00:00" }, { "name": "zfcampus/zf-api-problem", @@ -1135,7 +1134,7 @@ "zend", "zf2" ], - "time": "2016-07-07 13:52:00" + "time": "2016-07-07T13:52:00+00:00" }, { "name": "zfcampus/zf-content-negotiation", @@ -1199,7 +1198,7 @@ "zend", "zf2" ], - "time": "2016-07-07 21:13:40" + "time": "2016-07-07T21:13:40+00:00" } ], "packages-dev": [ @@ -1255,7 +1254,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -1300,19 +1299,19 @@ "keywords": [ "test" ], - "time": "2015-05-11 14:41:42" + "time": "2015-05-11T14:41:42+00:00" }, { "name": "mockery/mockery", "version": "0.9.5", "source": { "type": "git", - "url": "https://github.com/padraic/mockery.git", + "url": "https://github.com/mockery/mockery.git", "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2", + "url": "https://api.github.com/repos/mockery/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2", "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2", "shasum": "" }, @@ -1365,7 +1364,7 @@ "test double", "testing" ], - "time": "2016-05-22 21:52:33" + "time": "2016-05-22T21:52:33+00:00" }, { "name": "myclabs/deep-copy", @@ -1407,7 +1406,7 @@ "object", "object graph" ], - "time": "2015-11-20 12:04:31" + "time": "2015-11-20T12:04:31+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1461,7 +1460,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -1506,7 +1505,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": "2016-06-10 09:48:41" + "time": "2016-06-10T09:48:41+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1553,7 +1552,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10 07:14:17" + "time": "2016-06-10T07:14:17+00:00" }, { "name": "phpspec/prophecy", @@ -1615,7 +1614,7 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2016-06-07T08:13:47+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1678,7 +1677,7 @@ "testing", "xunit" ], - "time": "2016-06-03 05:03:56" + "time": "2016-06-03T05:03:56+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1725,7 +1724,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2015-06-21T13:08:43+00:00" }, { "name": "phpunit/php-text-template", @@ -1766,7 +1765,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -1810,7 +1809,7 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2016-05-12T18:03:57+00:00" }, { "name": "phpunit/php-token-stream", @@ -1859,7 +1858,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2015-09-15T10:49:45+00:00" }, { "name": "phpunit/phpunit", @@ -1937,7 +1936,7 @@ "testing", "xunit" ], - "time": "2016-06-16 06:01:15" + "time": "2016-06-16T06:01:15+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -1996,7 +1995,7 @@ "mock", "xunit" ], - "time": "2016-06-12 07:37:26" + "time": "2016-06-12T07:37:26+00:00" }, { "name": "psr/log", @@ -2034,7 +2033,7 @@ "psr", "psr-3" ], - "time": "2012-12-21 11:40:51" + "time": "2012-12-21T11:40:51+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2079,7 +2078,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2016-02-13T06:45:14+00:00" }, { "name": "sebastian/comparator", @@ -2143,7 +2142,7 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2015-07-26T15:48:44+00:00" }, { "name": "sebastian/diff", @@ -2195,7 +2194,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", @@ -2245,7 +2244,7 @@ "environment", "hhvm" ], - "time": "2016-05-17 03:18:57" + "time": "2016-05-17T03:18:57+00:00" }, { "name": "sebastian/exporter", @@ -2312,7 +2311,7 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2016-06-17T09:04:28+00:00" }, { "name": "sebastian/global-state", @@ -2363,7 +2362,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -2409,7 +2408,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-01-28 13:25:10" + "time": "2016-01-28T13:25:10+00:00" }, { "name": "sebastian/recursion-context", @@ -2462,7 +2461,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "time": "2015-11-11T19:50:13+00:00" }, { "name": "sebastian/resource-operations", @@ -2504,7 +2503,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -2539,7 +2538,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2015-06-21T13:59:46+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -2617,7 +2616,7 @@ "phpcs", "standards" ], - "time": "2016-05-30 22:24:32" + "time": "2016-05-30T22:24:32+00:00" }, { "name": "symfony/yaml", @@ -2666,7 +2665,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2016-06-29T05:41:56+00:00" }, { "name": "webmozart/assert", @@ -2715,7 +2714,7 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "time": "2015-08-24T13:29:44+00:00" }, { "name": "zendframework/zend-authentication", @@ -2777,7 +2776,7 @@ "Authentication", "zf2" ], - "time": "2016-02-28 15:02:34" + "time": "2016-02-28T15:02:34+00:00" }, { "name": "zendframework/zend-console", @@ -2829,7 +2828,7 @@ "console", "zf2" ], - "time": "2016-02-09 17:15:12" + "time": "2016-02-09T17:15:12+00:00" }, { "name": "zendframework/zend-db", @@ -2886,7 +2885,7 @@ "db", "zf2" ], - "time": "2016-04-14 14:27:16" + "time": "2016-04-14T14:27:16+00:00" }, { "name": "zendframework/zend-dom", @@ -2931,7 +2930,7 @@ "dom", "zf2" ], - "time": "2015-10-14 03:37:48" + "time": "2015-10-14T03:37:48+00:00" }, { "name": "zendframework/zend-i18n", @@ -2998,7 +2997,7 @@ "i18n", "zf2" ], - "time": "2016-06-07 21:08:30" + "time": "2016-06-07T21:08:30+00:00" }, { "name": "zendframework/zend-log", @@ -3069,7 +3068,7 @@ "logging", "zf2" ], - "time": "2016-06-22 22:25:25" + "time": "2016-06-22T22:25:25+00:00" }, { "name": "zendframework/zend-serializer", @@ -3126,7 +3125,7 @@ "serializer", "zf2" ], - "time": "2016-06-21 17:01:55" + "time": "2016-06-21T17:01:55+00:00" }, { "name": "zendframework/zend-test", @@ -3193,7 +3192,7 @@ "test", "zf2" ], - "time": "2016-06-15 22:59:55" + "time": "2016-06-15T22:59:55+00:00" } ], "aliases": [], 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/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..a4d0d0f --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,189 @@ +# CONTRIBUTING + +## RESOURCES + +If you wish to contribute to this project, please be sure to +read/subscribe to the following resources: + + - [Coding Standards](https://github.com/zendframework/zend-coding-standard) + - [Forums](https://discourse.zendframework.com/c/contributors) + - [Chat](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/zfcampus/zf-oauth2/issues/new). + +## RUNNING TESTS + +To run tests: + +- Clone the repository: + + ```console + $ git clone git://github.com/zfcampus/zf-oauth2.git + $ cd zf-oauth2 + ``` + +- Install dependencies via composer: + + ```console + $ composer install + ``` + + If you don't have `composer` installed, please download it from https://getcomposer.org/download/ + +- Run the tests using the "test" command shipped in the `composer.json`: + + ```console + $ composer test + ``` + +You can turn on conditional tests with the `phpunit.xml` file. +To do so: + + - Copy `phpunit.xml.dist` file to `phpunit.xml` + - Edit `phpunit.xml` to enable any specific functionality you + want to test, as well as to provide test values to utilize. + +## Running Coding Standards Checks + +First, ensure you've installed dependencies via composer, per the previous +section on running tests. + +To run CS checks only: + +```console +$ composer cs-check +``` + +To attempt to automatically fix common CS issues: + +```console +$ composer cs-fix +``` + +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 + +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](https://github.com/), if you haven't yet +2. Fork the repository (https://github.com/zfcampus/zf-oauth2) +3. Clone the canonical repository locally and enter it. + + ```console + $ git clone git://github.com/zfcampus/zf-oauth2.git + $ cd zf-oauth2 + ``` + +4. Add a remote to your fork; substitute your GitHub username in the command + below. + + ```console + $ git remote add {username} git@github.com:{username}/zf-oauth2.git + $ git fetch {username} + ``` + +### Keeping Up-to-Date + +Periodically, you should update your fork or personal repository to +match the canonical ZF repository. Assuming you have setup your local repository +per the instructions above, you can do the following: + + +```console +$ git checkout master +$ git fetch origin +$ git rebase origin/master +# OPTIONALLY, to keep your remote up-to-date - +$ git push {username} master:master +``` + +If you're tracking other branches -- for example, the "develop" branch, where +new feature development occurs -- you'll want to do the same operations for that +branch; simply substitute "develop" for "master". + +### Working on a patch + +We recommend you do each new feature or bugfix in a new branch. This simplifies +the task of code review as well as the task of merging your changes into the +canonical repository. + +A typical workflow will then consist of the following: + +1. Create a new local branch based off either your master or develop branch. +2. Switch to your new local branch. (This step can be combined with the + previous step with the use of `git checkout -b`.) +3. Do some work, commit, repeat as necessary. +4. Push the local branch to your remote repository. +5. Send a pull request. + +The mechanics of this process are actually quite trivial. Below, we will +create a branch for fixing an issue in the tracker. + +```console +$ git checkout -b hotfix/9295 +Switched to a new branch 'hotfix/9295' +``` + +... do some work ... + + +```console +$ git commit +``` + +... write your log message ... + + +```console +$ git push {username} hotfix/9295:hotfix/9295 +Counting objects: 38, done. +Delta compression using up to 2 threads. +Compression objects: 100% (18/18), done. +Writing objects: 100% (20/20), 8.19KiB, done. +Total 20 (delta 12), reused 0 (delta 0) +To ssh://git@github.com/{username}/zf-oauth2.git + b5583aa..4f51698 HEAD -> master +``` + +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 +"zfcampus" (or whatever the upstream organization is) as the recipient. + +#### What branch to issue the pull request against? + +Which branch should you issue a pull request against? + +- For fixes against the stable release, issue the pull request against the + "master" branch. +- For new features, or fixes that introduce new elements to the public API (such + as new public methods or properties), issue the pull request against the + "develop" branch. + +### Branch Cleanup + +As you might imagine, if you are a frequent contributor, you'll start to +get a ton of branches both locally and on your remote. + +Once you know that your changes have been accepted to the master +repository, we suggest doing some cleanup of these branches. + +- Local branch cleanup + + ```console + $ git branch -d + ``` + +- Remote branch removal + + ```console + $ git push {username} : + ``` diff --git a/docs/ISSUE_TEMPLATE.md b/docs/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..0c299b2 --- /dev/null +++ b/docs/ISSUE_TEMPLATE.md @@ -0,0 +1,19 @@ + - [ ] I was not able to find an [open](https://github.com/zfcampus/zf-oauth2/issues?q=is%3Aopen) or [closed](https://github.com/zfcampus/zf-oauth2/issues?q=is%3Aclosed) issue matching what I'm seeing. + - [ ] 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. + +### 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? + + diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md new file mode 100644 index 0000000..3cf7345 --- /dev/null +++ b/docs/SUPPORT.md @@ -0,0 +1,25 @@ +# Getting Support + +Zend Framework offers three support channels: + +- For real-time questions, use our + [chat](https://zendframework-slack.herokuapp.com) +- For detailed questions (e.g., those requiring examples) use our + [forums](https://discourse.zendframework.com/c/questions/apigility) +- To report issues, use this repository's + [issue tracker](https://github.com/zfcampus/zf-oauth2/issues/new) + +**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: + +- 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 eea3ba93dcf864af775e21dd84afaa3415dc6c5f Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 5 May 2018 17:49:42 +0100 Subject: [PATCH 10/25] Updated Travis CI configuration - added PHP 7.1 and 7.2 builds - removed HHVM builds - updated legacy deps - removed IRC notifications --- .travis.yml | 64 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index a51d5c9..1a88400 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,74 +5,82 @@ language: php cache: directories: - $HOME/.composer/cache - - vendor services: - mongodb env: global: - - COMPOSER_ARGS="--no-interaction --ignore-platform-reqs" + - COMPOSER_ARGS="--no-interaction" + - COVERAGE_DEPS="php-coveralls/php-coveralls" + - MONGO_DRIVER=mongodb matrix: - fast_finish: true include: - php: 5.6 env: - DEPS=lowest + - MONGO_DRIVER=mongo - php: 5.6 env: - DEPS=locked + - MONGO_DRIVER=mongo + - LEGACY_DEPS="phpunit/phpunit" - php: 5.6 env: - DEPS=latest + - MONGO_DRIVER=mongo - php: 7 env: - DEPS=lowest - - EXT_MONGODB=true - php: 7 env: - DEPS=locked - - EXT_MONGODB=true - - CS_CHECK=true + - LEGACY_DEPS="phpunit/phpunit" - php: 7 env: - DEPS=latest - - EXT_MONGODB=true - - php: hhvm + - php: 7.1 env: - DEPS=lowest - - php: hhvm + - php: 7.1 env: - DEPS=locked - - php: hhvm + - CS_CHECK=true + - 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: - - EXT_MONGODB=true - DEPS=latest - allow_failures: - - php: hhvm - -notifications: - irc: "irc.freenode.org#apigility-dev" - email: false before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - - if [[ $EXT_MONGODB == 'true' && $TRAVIS_PHP_VERSION == '7' ]]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi - - if [[ $EXT_MONGODB == 'true' && $TRAVIS_PHP_VERSION == 'hhvm' ]]; then echo "extension = mongodb.so" >> /etc/hhvm/php.ini ; fi - - if [[ $EXT_MONGODB != 'true' && $TRAVIS_PHP_VERSION != 'hhvm' ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi - - if [[ $EXT_MONGODB != 'true' && $TRAVIS_PHP_VERSION == 'hhvm' ]]; then echo "extension = mongo.so" >> /etc/hhvm/php.ini ; fi - - travis_retry composer self-update - - chmod -R +rwX test/TestAsset + - if [[ $MONGO_DRIVER == 'mongodb' ]]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi + - if [[ $MONGO_DRIVER == 'mongo' ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi install: - - if [[ $EXT_MONGODB == 'true' ]]; then composer require --dev $COMPOSER_ARGS alcaeus/mongo-php-adapter ; fi + - 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 - - travis_retry composer install $COMPOSER_ARGS - - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then php -m ; fi - - composer show + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi + - if [[ $MONGO_DRIVER == 'mongodb' ]]; then composer require --dev $COMPOSER_ARGS alcaeus/mongo-php-adapter ; fi + - stty cols 120 && composer show script: - - composer test + - if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi - if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi + +after_script: + - if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi + +notifications: + email: false From 3f17929a90ca7a1ed4f7903849a0b4cdfe798423 Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 5 May 2018 18:01:14 +0100 Subject: [PATCH 11/25] Updated dependencies --- composer.json | 8 +- composer.lock | 1065 ++++++++++------- phpcs.xml | 15 +- phpunit.xml.dist | 7 +- test/Controller/AuthControllerTest.php | 2 +- .../AuthControllerWithCustomAdapterTest.php | 2 +- .../AuthControllerWithMongoAdapterTest.php | 4 +- ...ollerWithZendAuthenticationServiceTest.php | 2 +- 8 files changed, 677 insertions(+), 428 deletions(-) diff --git a/composer.json b/composer.json index bb1af19..1143eae 100644 --- a/composer.json +++ b/composer.json @@ -21,16 +21,16 @@ "bshaffer/oauth2-server-php": "^1.8", "zendframework/zend-crypt": "^2.6 || ^3.0", "zendframework/zend-http": "^2.5.4", - "zendframework/zend-mvc": "^2.7.9 || ^3.0.2", + "zendframework/zend-mvc": "^2.7.15 || ^3.0.2", "zendframework/zend-servicemanager": "^2.7.6 || ^3.1", "zfcampus/zf-api-problem": "^1.2.1", "zfcampus/zf-content-negotiation": "^1.2.1" }, "require-dev": { - "mockery/mockery": "^0.9", - "phpunit/phpunit": "^4.8 || ^5.4", - "squizlabs/php_codesniffer": "^2.3.1", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5", "zendframework/zend-authentication": "^2.5.3", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-db": "^2.8.1", "zendframework/zend-i18n": "^2.7.3", "zendframework/zend-log": "^2.9", diff --git a/composer.lock b/composer.lock index 94221be..f7f5df9 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": "851d0100a913bf5ac3102ee98afff252", + "content-hash": "7d3dc1267084fadb33e688e1a5b77d1b", "packages": [ { "name": "bshaffer/oauth2-server-php", @@ -57,18 +57,21 @@ }, { "name": "container-interop/container-interop", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/container-interop/container-interop.git", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "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": { @@ -80,7 +83,8 @@ "MIT" ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "time": "2014-12-30T15:22:37+00:00" + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" }, { "name": "paragonie/random_compat", @@ -130,6 +134,55 @@ ], "time": "2016-04-03T06:00:07+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-config", "version": "2.6.0", @@ -239,30 +292,30 @@ }, { "name": "zendframework/zend-escaper", - "version": "2.5.2", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074", + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "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": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -274,35 +327,36 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-escaper", + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", "keywords": [ + "ZendFramework", "escaper", - "zf2" + "zf" ], - "time": "2016-06-30T19:48:38+00:00" + "time": "2018-04-25T15:48:53+00:00" }, { "name": "zendframework/zend-eventmanager", - "version": "3.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "5c80bdee0e952be112dcec0968bad770082c3a6e" + "reference": "a5e2583a211f73604691586b8406ff7296a946dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/5c80bdee0e952be112dcec0968bad770082c3a6e", - "reference": "5c80bdee0e952be112dcec0968bad770082c3a6e", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd", + "reference": "a5e2583a211f73604691586b8406ff7296a946dd", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { "athletic/athletic": "^0.1", "container-interop/container-interop": "^1.1.0", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-stdlib": "^2.7.3 || ^3.0" }, "suggest": { @@ -312,8 +366,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" } }, "autoload": { @@ -333,7 +387,7 @@ "events", "zf2" ], - "time": "2016-02-18T20:53:00+00:00" + "time": "2018-04-25T15:33:34+00:00" }, { "name": "zendframework/zend-filter", @@ -497,30 +551,30 @@ }, { "name": "zendframework/zend-loader", - "version": "2.5.1", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-loader.git", - "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c" + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/c5fd2f071bde071f4363def7dea8dec7393e135c", - "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c", + "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/78f11749ea340f6ca316bca5958eef80b38f9b6c", + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -532,12 +586,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-loader", + "description": "Autoloading and plugin loading strategies", "keywords": [ + "ZendFramework", "loader", - "zf2" + "zf" ], - "time": "2015-06-03T14:05:47+00:00" + "time": "2018-04-30T15:20:54+00:00" }, { "name": "zendframework/zend-math", @@ -831,31 +886,31 @@ }, { "name": "zendframework/zend-stdlib", - "version": "3.0.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "8bafa58574204bdff03c275d1d618aaa601588ae" + "reference": "cd164b4a18b5d1aeb69be2c26db035b5ed6925ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8bafa58574204bdff03c275d1d618aaa601588ae", - "reference": "8bafa58574204bdff03c275d1d618aaa601588ae", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cd164b4a18b5d1aeb69be2c26db035b5ed6925ae", + "reference": "cd164b4a18b5d1aeb69be2c26db035b5ed6925ae", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "athletic/athletic": "~0.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "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.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" } }, "autoload": { @@ -867,41 +922,42 @@ "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-04-12T21:19:36+00:00" + "time": "2018-04-30T13:50:40+00:00" }, { "name": "zendframework/zend-uri", - "version": "2.5.2", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", - "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed" + "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/0bf717a239432b1a1675ae314f7c4acd742749ed", - "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/3b6463645c6766f78ce537c70cb4fdabee1e725f", + "reference": "3b6463645c6766f78ce537c70cb4fdabee1e725f", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", + "php": "^5.6 || ^7.0", "zendframework/zend-escaper": "^2.5", - "zendframework/zend-validator": "^2.5" + "zendframework/zend-validator": "^2.10" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -913,37 +969,37 @@ "license": [ "BSD-3-Clause" ], - "description": "a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://github.com/zendframework/zend-uri", + "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", "keywords": [ + "ZendFramework", "uri", - "zf2" + "zf" ], - "time": "2016-02-17T22:38:51+00:00" + "time": "2018-04-30T13:40:08+00:00" }, { "name": "zendframework/zend-validator", - "version": "2.8.1", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-validator.git", - "reference": "8ec9f57a717dd37340308aa632f148a2c2be1cfc" + "reference": "38109ed7d8e46cfa71bccbe7e6ca80cdd035f8c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/8ec9f57a717dd37340308aa632f148a2c2be1cfc", - "reference": "8ec9f57a717dd37340308aa632f148a2c2be1cfc", + "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/38109ed7d8e46cfa71bccbe7e6ca80cdd035f8c9", + "reference": "38109ed7d8e46cfa71bccbe7e6ca80cdd035f8c9", "shasum": "" }, "require": { "container-interop/container-interop": "^1.1", - "php": "^5.5 || ^7.0", - "zendframework/zend-stdlib": "^2.7 || ^3.0" + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.6 || ^3.1" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.0", + "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", @@ -951,24 +1007,24 @@ "zendframework/zend-i18n": "^2.6", "zendframework/zend-math": "^2.6", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", - "zendframework/zend-session": "^2.6.2", + "zendframework/zend-session": "^2.8", "zendframework/zend-uri": "^2.5" }, "suggest": { - "zendframework/zend-db": "Zend\\Db component", + "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 as well as to use the various Date validators", + "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", + "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", + "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.8-dev", - "dev-develop": "2.9-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" }, "zf": { "component": "Zend\\Validator", @@ -990,33 +1046,33 @@ "validator", "zf2" ], - "time": "2016-06-23T13:44:31+00:00" + "time": "2018-02-01T17:05:33+00:00" }, { "name": "zendframework/zend-view", - "version": "2.8.1", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-view.git", - "reference": "71b4ebd0c4c9a2d0e0438f9d3a435e08dd769ff8" + "reference": "4478cc5dd960e2339d88b363ef99fa278700e80e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-view/zipball/71b4ebd0c4c9a2d0e0438f9d3a435e08dd769ff8", - "reference": "71b4ebd0c4c9a2d0e0438f9d3a435e08dd769ff8", + "url": "https://api.github.com/repos/zendframework/zend-view/zipball/4478cc5dd960e2339d88b363ef99fa278700e80e", + "reference": "4478cc5dd960e2339d88b363ef99fa278700e80e", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", + "php": "^5.6 || ^7.0", "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", "zendframework/zend-loader": "^2.5", "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.5", + "phpunit/phpunit": "^5.7.15 || ^6.0.8", "zendframework/zend-authentication": "^2.5", "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-config": "^2.6", "zendframework/zend-console": "^2.6", "zendframework/zend-escaper": "^2.5", @@ -1034,7 +1090,7 @@ "zendframework/zend-router": "^3.0.1", "zendframework/zend-serializer": "^2.6.1", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", - "zendframework/zend-session": "^2.6.2", + "zendframework/zend-session": "^2.8.1", "zendframework/zend-uri": "^2.5" }, "suggest": { @@ -1058,8 +1114,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev", - "dev-develop": "2.9-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" } }, "autoload": { @@ -1077,7 +1133,7 @@ "view", "zf2" ], - "time": "2016-06-30T22:28:07+00:00" + "time": "2018-01-17T22:21:50+00:00" }, { "name": "zfcampus/zf-api-problem", @@ -1204,32 +1260,32 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1254,24 +1310,24 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^5.3|^7.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -1280,15 +1336,18 @@ }, "require-dev": { "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1299,34 +1358,34 @@ "keywords": [ "test" ], - "time": "2015-05-11T14:41:42+00:00" + "time": "2016-01-20T08:20:44+00:00" }, { "name": "mockery/mockery", - "version": "0.9.5", + "version": "1.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2" + "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2", - "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1bac8c362b12f522fdd1f1fa3556284c91affa38", + "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "~1.1", + "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.3.2" + "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~5.7|~6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -1351,7 +1410,7 @@ } ], "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", + "homepage": "http://github.com/mockery/mockery", "keywords": [ "BDD", "TDD", @@ -1364,41 +1423,44 @@ "test double", "testing" ], - "time": "2016-05-22T21:52:33+00:00" + "time": "2017-10-06T16:20:43+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.5.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "a8773992b362b58498eed24bf85005f363c34771" + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", - "reference": "a8773992b362b58498eed24bf85005f363c34771", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "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", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -1406,20 +1468,122 @@ "object", "object graph" ], - "time": "2015-11-20T12:04:31+00:00" + "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", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -1460,33 +1624,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "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\\": [ @@ -1505,24 +1675,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-06-10T09:48:41+00:00" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -1552,36 +1722,37 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10T07:14:17+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.6.1", + "version": "1.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -1614,44 +1785,44 @@ "spy", "stub" ], - "time": "2016-06-07T08:13:47+00:00" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.0", + "version": "6.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" + "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/52187754b0eed0b8159f62a6fa30073327e8c2ca", + "reference": "52187754b0eed0b8159f62a6fa30073327e8c2ca", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0|~2.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^7.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "6.0-dev" } }, "autoload": { @@ -1666,7 +1837,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1677,20 +1848,20 @@ "testing", "xunit" ], - "time": "2016-06-03T05:03:56+00:00" + "time": "2018-04-29T14:59:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -1724,7 +1895,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21T13:08:43+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -1769,25 +1940,30 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8b8454ea6958c3dee38453d3bd571e023108c91f", + "reference": "8b8454ea6958c3dee38453d3bd571e023108c91f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^7.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1800,7 +1976,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1809,33 +1985,33 @@ "keywords": [ "timer" ], - "time": "2016-05-12T18:03:57+00:00" + "time": "2018-02-01T13:07:23+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/21ad88bbba7c3d93530d93994e0a33cd45f02ace", + "reference": "21ad88bbba7c3d93530d93994e0a33cd45f02ace", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1858,51 +2034,53 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15T10:49:45+00:00" + "time": "2018-02-01T13:16:43+00:00" }, { "name": "phpunit/phpunit", - "version": "5.4.6", + "version": "7.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59" + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f1fc94b77ea6418bd6a06c64a1dac0645fbce59", - "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435", + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3 || ^2.0", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/object-enumerator": "~1.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", - "symfony/yaml": "~2.1|~3.0" + "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.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.1", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.0", + "phpunit/phpunit-mock-objects": "^6.1.1", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.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" + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" }, "bin": [ "phpunit" @@ -1910,7 +2088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4.x-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -1936,33 +2114,30 @@ "testing", "xunit" ], - "time": "2016-06-16T06:01:15+00:00" + "time": "2018-04-29T15:09:19+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.2.3", + "version": "6.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52" + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/70c740bde8fd9ea9ea295be1cd875dd7b267e157", + "reference": "70c740bde8fd9ea9ea295be1cd875dd7b267e157", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" + "doctrine/instantiator": "^1.0.5", + "php": "^7.1", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^7.0" }, "suggest": { "ext-soap": "*" @@ -1970,7 +2145,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "6.1-dev" } }, "autoload": { @@ -1985,7 +2160,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1995,7 +2170,7 @@ "mock", "xunit" ], - "time": "2016-06-12T07:37:26+00:00" + "time": "2018-04-11T04:50:36+00:00" }, { "name": "psr/log", @@ -2037,23 +2212,23 @@ }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -2078,34 +2253,34 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13T06:45:14+00:00" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5", + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2136,38 +2311,39 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2015-07-26T15:48:44+00:00" + "time": "2018-04-18T13:33:00+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e09160918c66281713f1c324c1f4c4c3037ba1e8", + "reference": "e09160918c66281713f1c324c1f4c4c3037ba1e8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^7.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2192,34 +2368,37 @@ "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], - "time": "2015-12-08T07:14:41+00:00" + "time": "2018-02-01T13:45:15+00:00" }, { "name": "sebastian/environment", - "version": "1.3.7", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -2244,34 +2423,34 @@ "environment", "hhvm" ], - "time": "2016-05-17T03:18:57+00:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -2311,27 +2490,27 @@ "export", "exporter" ], - "time": "2016-06-17T09:04:28+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -2339,7 +2518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2362,33 +2541,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", - "version": "1.0.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2408,32 +2588,77 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-01-28T13:25:10+00:00" + "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": "1.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2461,7 +2686,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11T19:50:13+00:00" + "time": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", @@ -2507,19 +2732,27 @@ }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "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/" @@ -2538,20 +2771,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.6.1", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d" + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", - "reference": "fb72ed32f8418db5e7770be1653e62e0d6f5dd3d", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", "shasum": "" }, "require": { @@ -2616,81 +2849,73 @@ "phpcs", "standards" ], - "time": "2016-05-30T22:24:32+00:00" + "time": "2017-05-22T02:43:20+00:00" }, { - "name": "symfony/yaml", - "version": "v3.1.2", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2016-06-29T05:41:56+00:00" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", - "version": "1.0.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2714,7 +2939,7 @@ "check", "validate" ], - "time": "2015-08-24T13:29:44+00:00" + "time": "2018-01-29T19:49:41+00:00" }, { "name": "zendframework/zend-authentication", @@ -2778,30 +3003,59 @@ ], "time": "2016-02-28T15:02:34+00:00" }, + { + "name": "zendframework/zend-coding-standard", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-coding-standard.git", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework coding standard", + "keywords": [ + "Coding Standard", + "zf" + ], + "time": "2016-11-09T21:30:43+00:00" + }, { "name": "zendframework/zend-console", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-console.git", - "reference": "cbbdfdfa0564aa20d1c6c6ef3daeafe6aec02360" + "reference": "e8aa08da83de3d265256c40ba45cd649115f0e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-console/zipball/cbbdfdfa0564aa20d1c6c6ef3daeafe6aec02360", - "reference": "cbbdfdfa0564aa20d1c6c6ef3daeafe6aec02360", + "url": "https://api.github.com/repos/zendframework/zend-console/zipball/e8aa08da83de3d265256c40ba45cd649115f0e18", + "reference": "e8aa08da83de3d265256c40ba45cd649115f0e18", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "zendframework/zend-stdlib": "^2.7 || ^3.0" + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.0", - "zendframework/zend-filter": "^2.6", - "zendframework/zend-json": "^2.6", - "zendframework/zend-validator": "^2.5" + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-filter": "^2.7.2", + "zendframework/zend-json": "^2.6 || ^3.0", + "zendframework/zend-validator": "^2.10.1" }, "suggest": { "zendframework/zend-filter": "To support DefaultRouteMatcher usage", @@ -2810,8 +3064,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev", - "dev-develop": "2.7-dev" + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "autoload": { @@ -2823,12 +3077,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-console", + "description": "Build console applications using getopt syntax or routing, complete with prompts", "keywords": [ + "ZendFramework", "console", - "zf2" + "zf" ], - "time": "2016-02-09T17:15:12+00:00" + "time": "2018-01-25T19:08:04+00:00" }, { "name": "zendframework/zend-db", @@ -2889,30 +3144,30 @@ }, { "name": "zendframework/zend-dom", - "version": "2.6.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-dom.git", - "reference": "a9e145b2b52fe6de5a7a6b0ddb5c773c2c72d59e" + "reference": "ec2c66c2bb0046e895651b24f2ebb83058b9bbca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-dom/zipball/a9e145b2b52fe6de5a7a6b0ddb5c773c2c72d59e", - "reference": "a9e145b2b52fe6de5a7a6b0ddb5c773c2c72d59e", + "url": "https://api.github.com/repos/zendframework/zend-dom/zipball/ec2c66c2bb0046e895651b24f2ebb83058b9bbca", + "reference": "ec2c66c2bb0046e895651b24f2ebb83058b9bbca", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "autoload": { @@ -2925,12 +3180,12 @@ "BSD-3-Clause" ], "description": "provides tools for working with DOM documents and structures", - "homepage": "https://github.com/zendframework/zend-dom", "keywords": [ + "ZendFramework", "dom", - "zf2" + "zf" ], - "time": "2015-10-14T03:37:48+00:00" + "time": "2018-04-09T20:18:00+00:00" }, { "name": "zendframework/zend-i18n", @@ -3129,22 +3384,22 @@ }, { "name": "zendframework/zend-test", - "version": "3.0.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-test.git", - "reference": "e344ab9ec4307f3e18664a81dc233554bbac58da" + "reference": "626606425072e9d513df3bf723913c0bb9d03f8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-test/zipball/e344ab9ec4307f3e18664a81dc233554bbac58da", - "reference": "e344ab9ec4307f3e18664a81dc233554bbac58da", + "url": "https://api.github.com/repos/zendframework/zend-test/zipball/626606425072e9d513df3bf723913c0bb9d03f8c", + "reference": "626606425072e9d513df3bf723913c0bb9d03f8c", "shasum": "" }, "require": { "php": "^5.6 || ^7.0", - "phpunit/phpunit": "^4.0 || ^5.0", - "sebastian/version": "^1.0.4", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0", + "sebastian/version": "^1.0.4 || ^2.0", "zendframework/zend-console": "^2.6", "zendframework/zend-dom": "^2.6", "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", @@ -3156,16 +3411,16 @@ "zendframework/zend-view": "^2.6.3" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", "mikey179/vfsstream": "~1.2", "symfony/finder": "^2.2", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-i18n": "^2.6", "zendframework/zend-log": "^2.7.1", "zendframework/zend-modulemanager": "^2.7.1", "zendframework/zend-mvc-console": "^1.1.8", "zendframework/zend-mvc-plugin-flashmessenger": "^0.1.0", "zendframework/zend-serializer": "^2.6.1", - "zendframework/zend-session": "^2.6.2", + "zendframework/zend-session": "^2.8.5", "zendframework/zend-validator": "^2.8" }, "suggest": { @@ -3174,11 +3429,14 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.1.x-dev", + "dev-develop": "3.2.x-dev" } }, "autoload": { + "files": [ + "autoload/phpunit-class-aliases.php" + ], "psr-4": { "Zend\\Test\\": "src/" } @@ -3187,12 +3445,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-test", + "description": "Tools to facilitate unit testing of zend-mvc applications", "keywords": [ + "ZendFramework", "test", - "zf2" + "zf" ], - "time": "2016-06-15T22:59:55+00:00" + "time": "2018-04-07T09:56:35+00:00" } ], "aliases": [], diff --git a/phpcs.xml b/phpcs.xml index 461aaeb..29bb289 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,19 +1,6 @@ - Zend Framework coding standard - - - - - - - - - - - - - + config diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 01633a2..d68c56e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,8 @@ - + ./test/Adapter/Pdo @@ -10,7 +13,7 @@ - + ./src diff --git a/test/Controller/AuthControllerTest.php b/test/Controller/AuthControllerTest.php index 5ca1c0d..3681ca8 100644 --- a/test/Controller/AuthControllerTest.php +++ b/test/Controller/AuthControllerTest.php @@ -27,7 +27,7 @@ class AuthControllerTest extends AbstractHttpControllerTestCase { protected $db; - public function setUp() + protected function setUp() { $this->setApplicationConfig(include __DIR__ . '/../TestAsset/pdo.application.config.php'); parent::setUp(); diff --git a/test/Controller/AuthControllerWithCustomAdapterTest.php b/test/Controller/AuthControllerWithCustomAdapterTest.php index 9618d11..7f8a926 100644 --- a/test/Controller/AuthControllerWithCustomAdapterTest.php +++ b/test/Controller/AuthControllerWithCustomAdapterTest.php @@ -10,7 +10,7 @@ class AuthControllerWithCustomAdapterTest extends AbstractHttpControllerTestCase { - public function setUp() + protected function setUp() { $this->setApplicationConfig(include __DIR__ . '/../TestAsset/custom.application.config.php'); diff --git a/test/Controller/AuthControllerWithMongoAdapterTest.php b/test/Controller/AuthControllerWithMongoAdapterTest.php index 9c3b607..332cf79 100644 --- a/test/Controller/AuthControllerWithMongoAdapterTest.php +++ b/test/Controller/AuthControllerWithMongoAdapterTest.php @@ -34,7 +34,7 @@ class AuthControllerWithMongoAdapterTest extends AbstractHttpControllerTestCase 'grant_types' => null, ]; - public function setUp() + protected function setUp() { if (! (extension_loaded('mongodb') || extension_loaded('mongo')) || ! class_exists(MongoClient::class) @@ -59,7 +59,7 @@ public function setUp() $this->getApplicationServiceLocator()->setService('MongoDB', $this->db); } - public function tearDown() + protected function tearDown() { if ($this->db instanceof MongoDB) { $this->db->drop(); diff --git a/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php b/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php index d76ec1c..b584552 100644 --- a/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php +++ b/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php @@ -18,7 +18,7 @@ class AuthControllerWithZendAuthenticationServiceTest extends AbstractHttpContro protected $loader; protected $db; - public function setUp() + protected function setUp() { $this->setApplicationConfig( include __DIR__ . '/../TestAsset/zend.authenticationservice.application.config.php' From e7c0b47676060528671fac34e25aed6dbc4f26bf Mon Sep 17 00:00:00 2001 From: webimpress Date: Sat, 5 May 2018 18:54:14 +0100 Subject: [PATCH 12/25] Install pecl mongo/mongodb --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1a88400..39afa74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,6 +63,7 @@ matrix: before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi + - yes '' | pecl -q install -f $MONGO_DRIVER - if [[ $MONGO_DRIVER == 'mongodb' ]]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi - if [[ $MONGO_DRIVER == 'mongo' ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi From e0e2beb13525508a6af1cdf951081bec435fb330 Mon Sep 17 00:00:00 2001 From: webimpress Date: Sun, 6 May 2018 01:29:51 +0100 Subject: [PATCH 13/25] Removed mockery loader --- .../AuthControllerWithZendAuthenticationServiceTest.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php b/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php index b584552..94786f7 100644 --- a/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php +++ b/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php @@ -7,8 +7,6 @@ namespace ZFTest\OAuth2\Controller; use Mockery as M; -use Mockery\Loader; -use PDO; use ReflectionProperty; use Zend\Stdlib\Parameters; use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; @@ -24,9 +22,6 @@ protected function setUp() include __DIR__ . '/../TestAsset/zend.authenticationservice.application.config.php' ); - $this->loader = new Loader; - $this->loader->register(); - parent::setUp(); $this->setupDb(); } From 42defa3a508525332cde012e20095968bdb0101f Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 08:45:23 +0100 Subject: [PATCH 14/25] Removed manual enabling mongo/mongodb php extensions in Travis CI config --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 39afa74..f763abd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,8 +64,6 @@ matrix: before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi - yes '' | pecl -q install -f $MONGO_DRIVER - - if [[ $MONGO_DRIVER == 'mongodb' ]]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi - - if [[ $MONGO_DRIVER == 'mongo' ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi install: - travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs From e0f634915ee4798af4cdce562ea4cb55cbb3e331 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 09:02:52 +0100 Subject: [PATCH 15/25] Updated to zendframework/zend-crypt 3.3.0 --- composer.json | 2 +- composer.lock | 66 ++++++++++++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/composer.json b/composer.json index 1143eae..ae016c0 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require": { "php": "^5.6 || ^7.0", "bshaffer/oauth2-server-php": "^1.8", - "zendframework/zend-crypt": "^2.6 || ^3.0", + "zendframework/zend-crypt": "^3.3", "zendframework/zend-http": "^2.5.4", "zendframework/zend-mvc": "^2.7.15 || ^3.0.2", "zendframework/zend-servicemanager": "^2.7.6 || ^3.1", diff --git a/composer.lock b/composer.lock index f7f5df9..9d0dae3 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": "7d3dc1267084fadb33e688e1a5b77d1b", + "content-hash": "1ab28e62081bd6279784533e27202937", "packages": [ { "name": "bshaffer/oauth2-server-php", @@ -88,16 +88,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.2", + "version": "v2.0.12", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf" + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf", - "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb", + "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb", "shasum": "" }, "require": { @@ -132,7 +132,7 @@ "pseudorandom", "random" ], - "time": "2016-04-03T06:00:07+00:00" + "time": "2018-04-04T21:24:14+00:00" }, { "name": "psr/container", @@ -241,28 +241,28 @@ }, { "name": "zendframework/zend-crypt", - "version": "3.0.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-crypt.git", - "reference": "ed348e3e87c945759d11edae5316125c3582bc72" + "reference": "9c2916faa9b2132a0f91cdca8e95b025c352f065" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/ed348e3e87c945759d11edae5316125c3582bc72", - "reference": "ed348e3e87c945759d11edae5316125c3582bc72", + "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/9c2916faa9b2132a0f91cdca8e95b025c352f065", + "reference": "9c2916faa9b2132a0f91cdca8e95b025c352f065", "shasum": "" }, "require": { - "container-interop/container-interop": "~1.0", + "container-interop/container-interop": "^1.2", "ext-mbstring": "*", "php": "^5.6 || ^7.0", "zendframework/zend-math": "^3.0", - "zendframework/zend-stdlib": "^2.7 || ^3.0" + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.8", - "squizlabs/php_codesniffer": "^2.3.1" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "suggest": { "ext-openssl": "Required for most features of Zend\\Crypt" @@ -270,8 +270,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.3.x-dev", + "dev-develop": "3.4.x-dev" } }, "autoload": { @@ -283,12 +283,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-crypt", + "description": "Strong cryptography tools and password hashing", "keywords": [ + "ZendFramework", "crypt", - "zf2" + "zf" ], - "time": "2016-06-21T18:15:32+00:00" + "time": "2018-04-24T22:01:58+00:00" }, { "name": "zendframework/zend-escaper", @@ -596,26 +597,26 @@ }, { "name": "zendframework/zend-math", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-math.git", - "reference": "fda3b4e6c3bb15c35adc6db38b2eacabaa243e65" + "reference": "558806e338ee68575fbe69489c9dcb6d57a1dae0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-math/zipball/fda3b4e6c3bb15c35adc6db38b2eacabaa243e65", - "reference": "fda3b4e6c3bb15c35adc6db38b2eacabaa243e65", + "url": "https://api.github.com/repos/zendframework/zend-math/zipball/558806e338ee68575fbe69489c9dcb6d57a1dae0", + "reference": "558806e338ee68575fbe69489c9dcb6d57a1dae0", "shasum": "" }, "require": { "ext-mbstring": "*", - "paragonie/random_compat": "^2.0.2", - "php": "^5.5 || ^7.0" + "paragonie/random_compat": "^2.0.11", + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "suggest": { "ext-bcmath": "If using the bcmath functionality", @@ -624,8 +625,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev", - "dev-develop": "3.1-dev" + "dev-master": "3.1.x-dev", + "dev-develop": "3.2.x-dev" } }, "autoload": { @@ -637,12 +638,13 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-math", + "description": "Create cryptographically secure pseudo-random numbers, and manage big integers", "keywords": [ + "ZendFramework", "math", - "zf2" + "zf" ], - "time": "2016-04-28T17:37:42+00:00" + "time": "2018-04-26T21:37:02+00:00" }, { "name": "zendframework/zend-modulemanager", From a9ccaa9aa856cc5cc27f57a3f536550a15a1fbe3 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 10:52:39 +0100 Subject: [PATCH 16/25] Fix tests to work with zend-mvc 3.1+ Event is shared between dispatch calls on application, so we need to reset it somehow. Maybe we should provide fix in zend-test to reset MvcEvent before every dispatch? --- test/Controller/AuthControllerTest.php | 3 +++ test/Controller/AuthControllerWithMongoAdapterTest.php | 2 ++ .../AuthControllerWithZendAuthenticationServiceTest.php | 1 + 3 files changed, 6 insertions(+) diff --git a/test/Controller/AuthControllerTest.php b/test/Controller/AuthControllerTest.php index 3681ca8..e64ad5b 100644 --- a/test/Controller/AuthControllerTest.php +++ b/test/Controller/AuthControllerTest.php @@ -280,6 +280,7 @@ public function testAuthorizeCode() $request->getServer()->set('PHP_AUTH_USER', 'testclient'); $request->getServer()->set('PHP_AUTH_PW', 'testpass'); + $this->getApplication()->bootstrap(); $this->dispatch('/oauth'); $this->assertControllerName('ZF\OAuth2\Controller\Auth'); $this->assertActionName('token'); @@ -346,6 +347,7 @@ public function testResource() unset($server['PHP_AUTH_USER']); unset($server['PHP_AUTH_PW']); + $this->getApplication()->bootstrap(); $this->dispatch('/oauth/resource'); $this->assertControllerName('ZF\OAuth2\Controller\Auth'); $this->assertActionName('resource'); @@ -362,6 +364,7 @@ public function testResource() unset($post['access_token']); $request->setMethod('GET'); + $this->getApplication()->bootstrap(); $this->dispatch('/oauth/resource'); $this->assertControllerName('ZF\OAuth2\Controller\Auth'); $this->assertActionName('resource'); diff --git a/test/Controller/AuthControllerWithMongoAdapterTest.php b/test/Controller/AuthControllerWithMongoAdapterTest.php index 332cf79..8893dc2 100644 --- a/test/Controller/AuthControllerWithMongoAdapterTest.php +++ b/test/Controller/AuthControllerWithMongoAdapterTest.php @@ -132,6 +132,7 @@ public function testAuthorizeCode() $request->getServer()->set('PHP_AUTH_USER', 'testclient'); $request->getServer()->set('PHP_AUTH_PW', 'testpass'); + $this->getApplication()->bootstrap(); $this->dispatch('/oauth'); $this->assertControllerName('ZF\OAuth2\Controller\Auth'); $this->assertActionName('token'); @@ -198,6 +199,7 @@ public function testResource() unset($server['PHP_AUTH_USER']); unset($server['PHP_AUTH_PW']); + $this->getApplication()->bootstrap(); $this->dispatch('/oauth/resource'); $this->assertControllerName('ZF\OAuth2\Controller\Auth'); $this->assertActionName('resource'); diff --git a/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php b/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php index 94786f7..836b443 100644 --- a/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php +++ b/test/Controller/AuthControllerWithZendAuthenticationServiceTest.php @@ -102,6 +102,7 @@ public function testAuthorizeCode() $request->getServer()->set('PHP_AUTH_USER', 'testclient'); $request->getServer()->set('PHP_AUTH_PW', 'testpass'); + $this->getApplication()->bootstrap(); $this->dispatch('/oauth'); $this->assertControllerName('ZF\OAuth2\Controller\Auth'); $this->assertActionName('token'); From ceb562d7d430a90a37caa570c192dfaf478cf839 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 11:44:20 +0100 Subject: [PATCH 17/25] Updated Travis CI config - removed installing mongodb adapter - pecl channel-update --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f763abd..3da8151 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,6 +63,7 @@ matrix: before_install: - if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi + - pecl channel-update pecl.php.net - yes '' | pecl -q install -f $MONGO_DRIVER install: @@ -71,7 +72,6 @@ install: - 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 - - if [[ $MONGO_DRIVER == 'mongodb' ]]; then composer require --dev $COMPOSER_ARGS alcaeus/mongo-php-adapter ; fi - stty cols 120 && composer show script: From f1a3241b37041fceca42bc1f405cdbd3dd84a952 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 11:45:37 +0100 Subject: [PATCH 18/25] CS fixes --- src/Adapter/MongoAdapter.php | 2 +- src/Adapter/PdoAdapter.php | 2 +- src/Controller/AuthController.php | 8 ++++---- src/Factory/OAuth2ServerInstanceFactory.php | 2 +- test/Adapter/Pdo/ScopeTest.php | 4 ++-- test/Controller/AuthControllerTest.php | 16 ++++++++-------- .../AuthControllerWithMongoAdapterTest.php | 14 +++++++------- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Adapter/MongoAdapter.php b/src/Adapter/MongoAdapter.php index 1c22960..a5638e2 100644 --- a/src/Adapter/MongoAdapter.php +++ b/src/Adapter/MongoAdapter.php @@ -146,7 +146,7 @@ public function setClientDetails( $scope = null; } - if (!empty($client_secret)) { + if (! empty($client_secret)) { $this->createBcryptHash($client_secret); } diff --git a/src/Adapter/PdoAdapter.php b/src/Adapter/PdoAdapter.php index 30a1891..b42bd00 100644 --- a/src/Adapter/PdoAdapter.php +++ b/src/Adapter/PdoAdapter.php @@ -143,7 +143,7 @@ public function setClientDetails( $scope = null; } - if (!empty($client_secret)) { + if (! empty($client_secret)) { $this->createBcryptHash($client_secret); } // if it exists, update it. diff --git a/src/Controller/AuthController.php b/src/Controller/AuthController.php index a8a04a2..078e1d7 100644 --- a/src/Controller/AuthController.php +++ b/src/Controller/AuthController.php @@ -182,7 +182,7 @@ public function authorizeAction() // validate the authorize request $isValid = $this->server->validateAuthorizeRequest($request, $response); - if (!$isValid) { + if (! $isValid) { return $this->getErrorResponse($response); } @@ -247,8 +247,8 @@ protected function getErrorResponse(OAuth2Response $response) protected function getApiProblemResponse(OAuth2Response $response) { $parameters = $response->getParameters(); - $errorUri = isset($parameters['error_uri']) ? $parameters['error_uri'] : null; - $error = isset($parameters['error']) ? $parameters['error'] : null; + $errorUri = isset($parameters['error_uri']) ? $parameters['error_uri'] : null; + $error = isset($parameters['error']) ? $parameters['error'] : null; $errorDescription = isset($parameters['error_description']) ? $parameters['error_description'] : null; return new ApiProblemResponse( @@ -292,7 +292,7 @@ protected function getOAuth2Request() $server = []; if ($zf2Request instanceof PhpEnvironmentRequest) { $server = $zf2Request->getServer()->toArray(); - } elseif (!empty($_SERVER)) { + } elseif (! empty($_SERVER)) { $server = $_SERVER; } $server['REQUEST_METHOD'] = $zf2Request->getMethod(); diff --git a/src/Factory/OAuth2ServerInstanceFactory.php b/src/Factory/OAuth2ServerInstanceFactory.php index 2ae18ed..4580b7f 100644 --- a/src/Factory/OAuth2ServerInstanceFactory.php +++ b/src/Factory/OAuth2ServerInstanceFactory.php @@ -56,7 +56,7 @@ public function __invoke() $config = $this->config; - if (!isset($config['storage']) || empty($config['storage'])) { + if (! isset($config['storage']) || empty($config['storage'])) { throw new Exception\RuntimeException( 'The storage configuration for OAuth2 is missing' ); diff --git a/test/Adapter/Pdo/ScopeTest.php b/test/Adapter/Pdo/ScopeTest.php index 3c141f2..63053c5 100644 --- a/test/Adapter/Pdo/ScopeTest.php +++ b/test/Adapter/Pdo/ScopeTest.php @@ -16,7 +16,7 @@ public function testScopeExists($storage) return; } - if (!$storage instanceof ScopeInterface) { + if (! $storage instanceof ScopeInterface) { // incompatible storage return; } @@ -38,7 +38,7 @@ public function testGetDefaultScope($storage) return; } - if (!$storage instanceof ScopeInterface) { + if (! $storage instanceof ScopeInterface) { // incompatible storage return; } diff --git a/test/Controller/AuthControllerTest.php b/test/Controller/AuthControllerTest.php index e64ad5b..eecc2bf 100644 --- a/test/Controller/AuthControllerTest.php +++ b/test/Controller/AuthControllerTest.php @@ -95,10 +95,10 @@ public function testToken() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['access_token'])); - $this->assertTrue(!empty($response['expires_in'])); + $this->assertTrue(! empty($response['access_token'])); + $this->assertTrue(! empty($response['expires_in'])); $this->assertTrue(array_key_exists('scope', $response)); - $this->assertTrue(!empty($response['token_type'])); + $this->assertTrue(! empty($response['token_type'])); } public function testTokenErrorIsApiProblem() @@ -161,7 +161,7 @@ public function testTokenRevoke() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['revoked'])); + $this->assertTrue(! empty($response['revoked'])); $this->assertTrue($response['revoked']); } @@ -287,7 +287,7 @@ public function testAuthorizeCode() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['access_token'])); + $this->assertTrue(! empty($response['access_token'])); } public function testImplicitClientAuth() @@ -295,7 +295,7 @@ public function testImplicitClientAuth() $config = $this->getApplication()->getConfig(); $allowImplicit = isset($config['zf-oauth2']['allow_implicit']) ? $config['zf-oauth2']['allow_implicit'] : false; - if (!$allowImplicit) { + if (! $allowImplicit) { $this->markTestSkipped('The allow implicit client mode is disabled'); } @@ -318,7 +318,7 @@ public function testImplicitClientAuth() if (preg_match('#access_token=([0-9a-f]+)#', $location, $matches)) { $token = $matches[1]; } - $this->assertTrue(!empty($token)); + $this->assertTrue(! empty($token)); } public function testResource() @@ -335,7 +335,7 @@ public function testResource() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['access_token'])); + $this->assertTrue(! empty($response['access_token'])); $token = $response['access_token']; diff --git a/test/Controller/AuthControllerWithMongoAdapterTest.php b/test/Controller/AuthControllerWithMongoAdapterTest.php index 8893dc2..8a2f608 100644 --- a/test/Controller/AuthControllerWithMongoAdapterTest.php +++ b/test/Controller/AuthControllerWithMongoAdapterTest.php @@ -82,11 +82,11 @@ public function testToken() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['access_token'])); + $this->assertTrue(! empty($response['access_token'])); - $this->assertTrue(!empty($response['expires_in'])); + $this->assertTrue(! empty($response['expires_in'])); $this->assertTrue(array_key_exists('scope', $response)); - $this->assertTrue(!empty($response['token_type'])); + $this->assertTrue(! empty($response['token_type'])); } public function testAuthorizeErrorParam() @@ -139,7 +139,7 @@ public function testAuthorizeCode() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['access_token'])); + $this->assertTrue(! empty($response['access_token'])); } public function testImplicitClientAuth() @@ -147,7 +147,7 @@ public function testImplicitClientAuth() $config = $this->getApplication()->getConfig(); $allowImplicit = isset($config['zf-oauth2']['allow_implicit']) ? $config['zf-oauth2']['allow_implicit'] : false; - if (!$allowImplicit) { + if (! $allowImplicit) { $this->markTestSkipped('The allow implicit client mode is disabled'); } @@ -170,7 +170,7 @@ public function testImplicitClientAuth() if (preg_match('#access_token=([0-9a-f]+)#', $location, $matches)) { $token = $matches[1]; } - $this->assertTrue(!empty($token)); + $this->assertTrue(! empty($token)); } public function testResource() @@ -187,7 +187,7 @@ public function testResource() $this->assertResponseStatusCode(200); $response = json_decode($this->getResponse()->getContent(), true); - $this->assertTrue(!empty($response['access_token'])); + $this->assertTrue(! empty($response['access_token'])); $token = $response['access_token']; From d12e5e9974544a6a75ff2727be1b2fc63ee877a8 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 12:03:48 +0100 Subject: [PATCH 19/25] Optimize imports --- src/Factory/OAuth2ServerInstanceFactory.php | 8 ++++---- test/Adapter/Pdo/AuthorizationCodeTest.php | 2 +- test/Adapter/Pdo/JwtAccessTokenTest.php | 1 - test/Adapter/Pdo/PublicKeyTest.php | 2 -- test/Factory/OAuth2ServerFactoryTest.php | 8 ++++---- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Factory/OAuth2ServerInstanceFactory.php b/src/Factory/OAuth2ServerInstanceFactory.php index 4580b7f..f47949c 100644 --- a/src/Factory/OAuth2ServerInstanceFactory.php +++ b/src/Factory/OAuth2ServerInstanceFactory.php @@ -6,14 +6,14 @@ namespace ZF\OAuth2\Factory; use Interop\Container\ContainerInterface; -use Zend\ServiceManager\ServiceLocatorInterface; -use ZF\OAuth2\Controller\Exception; -use OAuth2\Server as OAuth2Server; use OAuth2\GrantType\AuthorizationCode; use OAuth2\GrantType\ClientCredentials; +use OAuth2\GrantType\JwtBearer; use OAuth2\GrantType\RefreshToken; use OAuth2\GrantType\UserCredentials; -use OAuth2\GrantType\JwtBearer; +use OAuth2\Server as OAuth2Server; +use Zend\ServiceManager\ServiceLocatorInterface; +use ZF\OAuth2\Controller\Exception; class OAuth2ServerInstanceFactory { diff --git a/test/Adapter/Pdo/AuthorizationCodeTest.php b/test/Adapter/Pdo/AuthorizationCodeTest.php index 4c04017..c43f6e4 100644 --- a/test/Adapter/Pdo/AuthorizationCodeTest.php +++ b/test/Adapter/Pdo/AuthorizationCodeTest.php @@ -2,8 +2,8 @@ namespace ZFTest\OAuth2\Adapter\Pdo; -use OAuth2\Storage\AuthorizationCodeInterface; use OAuth2\Storage\AccessTokenInterface; +use OAuth2\Storage\AuthorizationCodeInterface; class AuthorizationCodeTest extends BaseTest { diff --git a/test/Adapter/Pdo/JwtAccessTokenTest.php b/test/Adapter/Pdo/JwtAccessTokenTest.php index ee7132c..f041721 100644 --- a/test/Adapter/Pdo/JwtAccessTokenTest.php +++ b/test/Adapter/Pdo/JwtAccessTokenTest.php @@ -6,7 +6,6 @@ namespace ZFTest\OAuth2\Adapter\Pdo; -use OAuth2\Encryption\Jwt; use DateTime; class JwtAccessTokenTest extends BaseTest diff --git a/test/Adapter/Pdo/PublicKeyTest.php b/test/Adapter/Pdo/PublicKeyTest.php index 84dc981..5a610d9 100644 --- a/test/Adapter/Pdo/PublicKeyTest.php +++ b/test/Adapter/Pdo/PublicKeyTest.php @@ -6,8 +6,6 @@ namespace ZFTest\OAuth2\Adapter\Pdo; -use OAuth2\Storage\PublicKeyInterface; - class PublicKeyTest extends BaseTest { /** @dataProvider provideStorage */ diff --git a/test/Factory/OAuth2ServerFactoryTest.php b/test/Factory/OAuth2ServerFactoryTest.php index bfba696..1a4902f 100644 --- a/test/Factory/OAuth2ServerFactoryTest.php +++ b/test/Factory/OAuth2ServerFactoryTest.php @@ -5,14 +5,14 @@ */ namespace ZFTest\OAuth2\Factory; -use Zend\ServiceManager\ServiceManager; -use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; -use ZF\OAuth2\Factory\OAuth2ServerFactory; use OAuth2\GrantType\AuthorizationCode; use OAuth2\GrantType\ClientCredentials; +use OAuth2\GrantType\JwtBearer; use OAuth2\GrantType\RefreshToken; use OAuth2\GrantType\UserCredentials; -use OAuth2\GrantType\JwtBearer; +use Zend\ServiceManager\ServiceManager; +use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; +use ZF\OAuth2\Factory\OAuth2ServerFactory; class OAuth2ServerFactoryTest extends AbstractHttpControllerTestCase { From 4655d8cbfc8e91c13d484578def028c64dedebd5 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 12:22:00 +0100 Subject: [PATCH 20/25] Update bshaffer/oauth2-server-php to v1.10 which supports PHP 7.2 --- composer.json | 2 +- composer.lock | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index ae016c0..263fb84 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ }, "require": { "php": "^5.6 || ^7.0", - "bshaffer/oauth2-server-php": "^1.8", + "bshaffer/oauth2-server-php": "^1.10", "zendframework/zend-crypt": "^3.3", "zendframework/zend-http": "^2.5.4", "zendframework/zend-mvc": "^2.7.15 || ^3.0.2", diff --git a/composer.lock b/composer.lock index 9d0dae3..f428320 100644 --- a/composer.lock +++ b/composer.lock @@ -4,30 +4,39 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1ab28e62081bd6279784533e27202937", + "content-hash": "bb5fc26e6c705fa515532b56ca7338bd", "packages": [ { "name": "bshaffer/oauth2-server-php", - "version": "v1.8.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/bshaffer/oauth2-server-php.git", - "reference": "058c98f73209f9c49495e1799d32c035196fe8b8" + "reference": "d158878425392fe5a0cc34f15dbaf46315ae0ed9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/058c98f73209f9c49495e1799d32c035196fe8b8", - "reference": "058c98f73209f9c49495e1799d32c035196fe8b8", + "url": "https://api.github.com/repos/bshaffer/oauth2-server-php/zipball/d158878425392fe5a0cc34f15dbaf46315ae0ed9", + "reference": "d158878425392fe5a0cc34f15dbaf46315ae0ed9", "shasum": "" }, "require": { "php": ">=5.3.9" }, + "require-dev": { + "aws/aws-sdk-php": "~2.8", + "firebase/php-jwt": "~2.2", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^4.0", + "predis/predis": "dev-master", + "thobbs/phpcassa": "dev-master" + }, "suggest": { - "aws/aws-sdk-php": "~2.8 is required to use the DynamoDB storage engine", + "aws/aws-sdk-php": "~2.8 is required to use DynamoDB storage", "firebase/php-jwt": "~2.2 is required to use JWT features", - "predis/predis": "Required to use the Redis storage engine", - "thobbs/phpcassa": "Required to use the Cassandra storage engine" + "mongodb/mongodb": "^1.1 is required to use MongoDB storage", + "predis/predis": "Required to use Redis storage", + "thobbs/phpcassa": "Required to use Cassandra storage" }, "type": "library", "autoload": { @@ -53,7 +62,7 @@ "oauth", "oauth2" ], - "time": "2015-09-18T18:05:10+00:00" + "time": "2017-11-15T01:41:02+00:00" }, { "name": "container-interop/container-interop", From f456dc3e4e532601ee4916013d1acb4f9c632c43 Mon Sep 17 00:00:00 2001 From: webimpress Date: Mon, 7 May 2018 13:55:10 +0100 Subject: [PATCH 21/25] Added CHANGELOG for #167 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8db7c55..df4a136 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ All notable changes to this project will be documented in this file, in reverse ### Removed -- Nothing. +- [#167](https://github.com/zfcampus/zf-oauth2/pull/167) removes support for HHVM. ### Fixed @@ -68,6 +68,10 @@ All notable changes to this project will be documented in this file, in reverse ### Added +- [#167](https://github.com/zfcampus/zf-oauth2/pull/167) adds support for PHP 7.1 and 7.2. + +### Changed + - Nothing. ### Deprecated From 5725b0428f87d01b2f99275fcc2498d160cdcf47 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 16:50:19 -0500 Subject: [PATCH 22/25] Fixes CS issue flagged by phpcs --- src/Controller/AuthController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/AuthController.php b/src/Controller/AuthController.php index 078e1d7..0797e9c 100644 --- a/src/Controller/AuthController.php +++ b/src/Controller/AuthController.php @@ -107,7 +107,7 @@ public function tokenAction() $response = $oauth2server->handleTokenRequest($oauth2request); } catch (ProblemExceptionInterface $ex) { $status = $ex->getCode() ?: 401; - $status = $status >=400 && $status < 600 ? $status : 401; + $status = $status >= 400 && $status < 600 ? $status : 401; return new ApiProblemResponse( new ApiProblem($status, $ex) From 95c3812a85eb64c9898d272d915835cf2ea7bad4 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 16:52:02 -0500 Subject: [PATCH 23/25] Moves CHANGELOG entry for #167 from 1.3.3 to 1.5.0 section - Bad rebase? --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df4a136..fb80da8 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. +- [#167](https://github.com/zfcampus/zf-oauth2/pull/167) adds support for PHP 7.1 and 7.2. ### Changed @@ -68,7 +68,7 @@ All notable changes to this project will be documented in this file, in reverse ### Added -- [#167](https://github.com/zfcampus/zf-oauth2/pull/167) adds support for PHP 7.1 and 7.2. +- Nothing. ### Changed From 3864437241f61c4669476c5b7369e2a7a4143a0e Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 16:53:17 -0500 Subject: [PATCH 24/25] Updates branch aliases - dev-master => 1.5.x-dev - dev-develop => 1.6.x-dev --- composer.json | 4 ++-- composer.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 263fb84..0db867f 100644 --- a/composer.json +++ b/composer.json @@ -56,8 +56,8 @@ }, "extra": { "branch-alias": { - "dev-master": "1.4.x-dev", - "dev-develop": "1.5.x-dev" + "dev-master": "1.5.x-dev", + "dev-develop": "1.6.x-dev" } }, "bin": [ diff --git a/composer.lock b/composer.lock index f428320..88f2ada 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": "bb5fc26e6c705fa515532b56ca7338bd", + "content-hash": "04dd00c812745085879bf1adaae0ad86", "packages": [ { "name": "bshaffer/oauth2-server-php", From 9dd80c8308117091d90d41147c7e921d5db891e9 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 7 May 2018 16:53:52 -0500 Subject: [PATCH 25/25] Adds date for 1.5.0 release to CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb80da8..3e9782d 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. -## 1.5.0 - TBD +## 1.5.0 - 2018-05-07 ### Added