From 649c378f468792c8cd8bb7c6b12f22ddc208e1ef Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 10:46:25 +0200 Subject: [PATCH 01/18] Require quickbooks php sdk --- composer.json | 5 +- composer.lock | 59 +++++++++++++++++++-- src/DataService/Client.php | 47 ++++++++++++++++ src/DataService/ClientInterface.php | 15 ++++++ src/DataService/OAuth2Client.php | 15 ++++++ src/DataService/OAuth2ClientInterface.php | 15 ++++++ src/DataService/ResourceClient.php | 15 ++++++ src/DataService/ResourceClientInterface.php | 15 ++++++ 8 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 src/DataService/Client.php create mode 100644 src/DataService/ClientInterface.php create mode 100644 src/DataService/OAuth2Client.php create mode 100644 src/DataService/OAuth2ClientInterface.php create mode 100644 src/DataService/ResourceClient.php create mode 100644 src/DataService/ResourceClientInterface.php diff --git a/composer.json b/composer.json index 1aff5d8..c582aaf 100644 --- a/composer.json +++ b/composer.json @@ -3,9 +3,10 @@ "description": "Quickbooks online API wrapper", "license": "MIT", "require": { - "php": ">=5.4.0", + "php": ">=5.6", "league/oauth1-client": "~1.0", - "guzzle/guzzle": "~3.0" + "guzzle/guzzle": "~3.0", + "quickbooks/v3-php-sdk": "^5.0" }, "require-dev": { "phpunit/phpunit": "4.8.*" diff --git a/composer.lock b/composer.lock index b329e70..3b18309 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b5fc7828fc19bb47c69541d23bea6bfd", - "content-hash": "275f1b332ab504ef2bfaa5d8a51c5ac1", + "hash": "a594ff1cd73ef10be182c503e87f08d6", + "content-hash": "a21113118b986506e10d7aa4c5cb07f1", "packages": [ { "name": "guzzle/guzzle", @@ -166,6 +166,59 @@ ], "time": "2015-10-23 04:02:07" }, + { + "name": "quickbooks/v3-php-sdk", + "version": "5.0.4", + "source": { + "type": "git", + "url": "https://github.com/intuit/QuickBooks-V3-PHP-SDK.git", + "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/intuit/QuickBooks-V3-PHP-SDK/zipball/f9d1e768adaba9bda7a1fd374adca04fc119b85c", + "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-curl": "Uses Curl to make HTTP Requests", + "guzzlehttp/guzzle": "Uses Guzzle to make HTTP Requests" + }, + "type": "library", + "autoload": { + "psr-4": { + "QuickBooksOnline\\API\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "hlu2", + "email": "Hao_Lu@intuit.com" + } + ], + "description": "The Official PHP SDK for QuickBooks Online Accounting API", + "homepage": "http://developer.intuit.com", + "keywords": [ + "api", + "http", + "quickbooks", + "rest", + "smallbusiness" + ], + "time": "2019-03-26 08:42:18" + }, { "name": "symfony/event-dispatcher", "version": "v2.7.7", @@ -1186,7 +1239,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.0" + "php": ">=5.6" }, "platform-dev": [] } diff --git a/src/DataService/Client.php b/src/DataService/Client.php new file mode 100644 index 0000000..61e9f3f --- /dev/null +++ b/src/DataService/Client.php @@ -0,0 +1,47 @@ +. All rights reserved. + */ + +declare(strict_types=1); + +namespace ActiveCollab\Quickbooks\DataService; + +class DataService implements DataServiceInterface +{ + private $client_id; + private $client_secret; + + public function __construct(string $client_id, string $client_secret) + { + $this->client_id = $client_id; + $this->client_secret = $client_secret; + } + + protected function getClientId(): string + { + return $this->client_id; + } + + protected function getClientSecret(): string + { + return $this->client_secret; + } + + abstract public function getDataService(): \QuickBooksOnline\API\DataService\DataService +// { +// return DataService::Configure( +// [ +// 'auth_mode' => 'oauth2', +// 'ClientID' => $this->getClientId(), +// 'ClientSecret' => $this->getClientSecret(), +// 'RedirectURI' => $this->redirect_uri, +// 'scope' => 'com.intuit.quickbooks.accounting', +// 'baseUrl' => $this->base_url, // "Development/Production" +// ] +// ); +// } +} \ No newline at end of file diff --git a/src/DataService/ClientInterface.php b/src/DataService/ClientInterface.php new file mode 100644 index 0000000..94e1f2b --- /dev/null +++ b/src/DataService/ClientInterface.php @@ -0,0 +1,15 @@ +. All rights reserved. + */ + +declare(strict_types=1); + +namespace ActiveCollab\Quickbooks\DataService; + +interface DataServiceInterface +{ +} diff --git a/src/DataService/OAuth2Client.php b/src/DataService/OAuth2Client.php new file mode 100644 index 0000000..f0de74d --- /dev/null +++ b/src/DataService/OAuth2Client.php @@ -0,0 +1,15 @@ + Date: Thu, 4 Apr 2019 10:47:12 +0200 Subject: [PATCH 02/18] Require php 7.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c582aaf..6d92731 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Quickbooks online API wrapper", "license": "MIT", "require": { - "php": ">=5.6", + "php": ">=7.1", "league/oauth1-client": "~1.0", "guzzle/guzzle": "~3.0", "quickbooks/v3-php-sdk": "^5.0" From 5878e85e959dd55569d79106afaa5637d8fa2d2c Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 10:49:17 +0200 Subject: [PATCH 03/18] New data service classess --- src/DataService/Client.php | 29 ++++----- src/DataService/ClientInterface.php | 2 +- src/DataService/OAuth2Client.php | 71 +++++++++++++++++++-- src/DataService/OAuth2ClientInterface.php | 22 +++++-- src/DataService/ResourceClient.php | 71 +++++++++++++++++++-- src/DataService/ResourceClientInterface.php | 18 +++--- 6 files changed, 166 insertions(+), 47 deletions(-) diff --git a/src/DataService/Client.php b/src/DataService/Client.php index 61e9f3f..a03a999 100644 --- a/src/DataService/Client.php +++ b/src/DataService/Client.php @@ -10,15 +10,19 @@ namespace ActiveCollab\Quickbooks\DataService; -class DataService implements DataServiceInterface +use QuickBooksOnline\API\DataService\DataService; + +abstract class Client implements ClientInterface { private $client_id; private $client_secret; + private $base_url; - public function __construct(string $client_id, string $client_secret) + public function __construct(string $client_id, string $client_secret, string $base_url) { $this->client_id = $client_id; $this->client_secret = $client_secret; + $this->base_url = $base_url; } protected function getClientId(): string @@ -31,17 +35,10 @@ protected function getClientSecret(): string return $this->client_secret; } - abstract public function getDataService(): \QuickBooksOnline\API\DataService\DataService -// { -// return DataService::Configure( -// [ -// 'auth_mode' => 'oauth2', -// 'ClientID' => $this->getClientId(), -// 'ClientSecret' => $this->getClientSecret(), -// 'RedirectURI' => $this->redirect_uri, -// 'scope' => 'com.intuit.quickbooks.accounting', -// 'baseUrl' => $this->base_url, // "Development/Production" -// ] -// ); -// } -} \ No newline at end of file + protected function getBaseUrl(): string + { + return $this->base_url; + } + + abstract protected function getDataService(): DataService; +} diff --git a/src/DataService/ClientInterface.php b/src/DataService/ClientInterface.php index 94e1f2b..eb57c5e 100644 --- a/src/DataService/ClientInterface.php +++ b/src/DataService/ClientInterface.php @@ -10,6 +10,6 @@ namespace ActiveCollab\Quickbooks\DataService; -interface DataServiceInterface +interface ClientInterface { } diff --git a/src/DataService/OAuth2Client.php b/src/DataService/OAuth2Client.php index f0de74d..f2eabf0 100644 --- a/src/DataService/OAuth2Client.php +++ b/src/DataService/OAuth2Client.php @@ -1,15 +1,72 @@ . All rights reserved. */ +declare(strict_type=1); + namespace ActiveCollab\Quickbooks\DataService; +use QuickBooksOnline\API\Core\OAuth\OAuth2\OAuth2AccessToken; +use QuickBooksOnline\API\DataService\DataService; -class OAuth2Client +class OAuth2Client extends Client implements OAuth2ClientInterface { + private $redirect_uri; + + public function __construct( + string $client_id, + string $client_secret, + string $redirect_uri, + string $base_url + ) + { + parent::__construct($client_id, $client_secret, $base_url); + + $this->redirect_uri = $redirect_uri; + } + + protected function getRedirectUri(): string + { + return $this->redirect_uri; + } + + private $data_service = false; + + protected function getDataService(): DataService + { + if ($this->data_service === false) { + $this->data_service = DataService::Configure( + [ + 'auth_mode' => 'oauth2', + 'ClientID' => $this->getClientId(), + 'ClientSecret' => $this->getClientSecret(), + 'RedirectURI' => $this->getRedirectUri(), + 'scope' => 'com.intuit.quickbooks.accounting', + 'baseUrl' => $this->getBaseUrl(), // "Development/Production" + ] + ); + } + + return $this->data_service; + } + + public function getAuthorizationUrl(): string + { + return $this->getDataService()->getOAuth2LoginHelper()->getAuthorizationCodeURL(); + } -} \ No newline at end of file + public function getAuthorizationToken( + string $authorization_code, + string $realm_id + ): OAuth2AccessToken + { + return $this->getDataService()->getOAuth2LoginHelper()->exchangeAuthorizationCodeForToken( + $authorization_code, + $realm_id + ); + } +} diff --git a/src/DataService/OAuth2ClientInterface.php b/src/DataService/OAuth2ClientInterface.php index 2170dff..1560c1d 100644 --- a/src/DataService/OAuth2ClientInterface.php +++ b/src/DataService/OAuth2ClientInterface.php @@ -1,15 +1,23 @@ . All rights reserved. */ +declare(strict_type=1); + namespace ActiveCollab\Quickbooks\DataService; +use QuickBooksOnline\API\Core\OAuth\OAuth2\OAuth2AccessToken; -interface OAuth2ClientInterface +interface OAuth2ClientInterface extends ClientInterface { + public function getAuthorizationUrl(): string; -} \ No newline at end of file + public function getAuthorizationToken( + string $authorization_code, + string $realm_id + ): OAuth2AccessToken; +} diff --git a/src/DataService/ResourceClient.php b/src/DataService/ResourceClient.php index 2e2eb32..b3beb6b 100644 --- a/src/DataService/ResourceClient.php +++ b/src/DataService/ResourceClient.php @@ -1,15 +1,72 @@ . All rights reserved. */ +declare(strict_types=1); + namespace ActiveCollab\Quickbooks\DataService; +use QuickBooksOnline\API\DataService\DataService; -class ResourceClient +class ResourceClient extends Client implements ResourceClientInterface { + private $access_token; + private $refresh_token; + private $realm_id; + + public function __construct( + string $client_id, + string $client_secret, + string $base_url, + string $access_token, + string $refresh_token, + string $realm_id + ) + { + parent::__construct($client_id, $client_secret, $base_url); + + $this->access_token = $access_token; + $this->refresh_token = $refresh_token; + $this->realm_id = $realm_id; + } + + protected function getAccessToken(): string + { + return $this->access_token; + } + + protected function getRefreshToken(): string + { + return $this->refresh_token; + } + + protected function getRealmId(): string + { + return $this->realm_id; + } + + private $data_service = false; + + protected function getDataService(): DataService + { + if ($this->data_service === false) { + $this->data_service = DataService::Configure( + [ + 'auth_mode' => 'oauth2', + 'ClientID' => $this->getClientId(), + 'ClientSecret' => $this->getClientSecret(), + 'accessTokenKey' => $this->getAccessToken(), + 'refreshTokenKey' => $this->getRefreshToken(), + 'QBORealmID' => $this->getRealmId(), + 'baseUrl' => $this->getBaseUrl(), + ] + ); + } -} \ No newline at end of file + return $this->data_service; + } +} diff --git a/src/DataService/ResourceClientInterface.php b/src/DataService/ResourceClientInterface.php index e738c79..14edee2 100644 --- a/src/DataService/ResourceClientInterface.php +++ b/src/DataService/ResourceClientInterface.php @@ -1,15 +1,15 @@ . All rights reserved. */ -namespace ActiveCollab\Quickbooks\DataService; +declare(strict_types=1); +namespace ActiveCollab\Quickbooks\DataService; -interface ResourceClientInterface +interface ResourceClientInterface extends ClientInterface { - -} \ No newline at end of file +} From 9c8a5bfd0a259834891748f0a4fd91de2369990c Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 11:46:54 +0200 Subject: [PATCH 04/18] Composer update --- composer.lock | 750 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 630 insertions(+), 120 deletions(-) diff --git a/composer.lock b/composer.lock index 3b18309..e8902ad 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a594ff1cd73ef10be182c503e87f08d6", - "content-hash": "a21113118b986506e10d7aa4c5cb07f1", + "hash": "b2f576499dab7e3eaff01b522d88de22", + "content-hash": "94b5c290de753de9f5ecea72ca762539", "packages": [ { "name": "guzzle/guzzle", @@ -103,28 +103,211 @@ "abandoned": "guzzlehttp/guzzle", "time": "2015-03-18 18:23:50" }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22 15:46:56" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20 10:07:11" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2018-12-04 20:46:45" + }, { "name": "league/oauth1-client", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth1-client.git", - "reference": "cef3ceda13c78f89c323e4d5e6301c0eb7cea422" + "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/cef3ceda13c78f89c323e4d5e6301c0eb7cea422", - "reference": "cef3ceda13c78f89c323e4d5e6301c0eb7cea422", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/fca5f160650cb74d23fc11aa570dd61f86dcf647", + "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647", "shasum": "" }, "require": { - "guzzle/guzzle": "3.*", - "php": ">=5.3.0" + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5.0" }, "require-dev": { - "mockery/mockery": "~0.9", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "mockery/mockery": "^0.9", + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.0" }, "type": "library", "extra": { @@ -164,7 +347,57 @@ "tumblr", "twitter" ], - "time": "2015-10-23 04:02:07" + "time": "2016-08-17 00:36:58" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06 14:39:51" }, { "name": "quickbooks/v3-php-sdk", @@ -219,18 +452,58 @@ ], "time": "2019-03-26 08:42:18" }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11 07:05:27" + }, { "name": "symfony/event-dispatcher", - "version": "v2.7.7", + "version": "v2.8.49", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7e2f9c31645680026c2372edf66f863fc7757af5" + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7e2f9c31645680026c2372edf66f863fc7757af5", - "reference": "7e2f9c31645680026c2372edf66f863fc7757af5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", "shasum": "" }, "require": { @@ -238,10 +511,10 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.3" + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" }, "suggest": { "symfony/dependency-injection": "", @@ -250,7 +523,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -277,38 +550,40 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-10-30 20:10:21" + "time": "2018-11-21 14:20:20" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^6.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -328,46 +603,149 @@ } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2019-03-17 17:37:11" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11 18:02:19" }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30 07:14:17" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -379,37 +757,40 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2017-07-14 14:27:02" }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.3|^7.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 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -442,7 +823,7 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2018-08-05 17:53:17" }, { "name": "phpunit/php-code-coverage", @@ -508,16 +889,16 @@ }, { "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": { @@ -551,7 +932,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2017-11-27 13:52:08" }, { "name": "phpunit/php-text-template", @@ -596,22 +977,30 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -633,20 +1022,20 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2017-02-26 11:10:40" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" }, "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/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", "shasum": "" }, "require": { @@ -682,20 +1071,20 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2017-12-04 08:55:13" }, { "name": "phpunit/phpunit", - "version": "4.8.18", + "version": "4.8.36", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fa33d4ad96481b91df343d83e8c8aabed6b1dfd3" + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fa33d4ad96481b91df343d83e8c8aabed6b1dfd3", - "reference": "fa33d4ad96481b91df343d83e8c8aabed6b1dfd3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", "shasum": "" }, "require": { @@ -709,9 +1098,9 @@ "phpunit/php-code-coverage": "~2.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", + "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", + "sebastian/comparator": "~1.2.2", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", @@ -754,7 +1143,7 @@ "testing", "xunit" ], - "time": "2015-11-11 11:32:49" + "time": "2017-06-21 08:07:12" }, { "name": "phpunit/phpunit-mock-objects", @@ -810,26 +1199,27 @@ "mock", "xunit" ], + "abandoned": true, "time": "2015-10-02 06:51:40" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -874,32 +1264,32 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2017-01-29 09:50:25" }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -922,31 +1312,31 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2017-05-22 07:24:03" }, { "name": "sebastian/environment", - "version": "1.3.2", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -976,20 +1366,20 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2016-08-18 05:49:44" }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -997,12 +1387,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1042,7 +1433,7 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-06-17 09:04:28" }, { "name": "sebastian/global-state", @@ -1097,16 +1488,16 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.1", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { @@ -1146,7 +1537,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2016-10-03 07:41:43" }, { "name": "sebastian/version", @@ -1183,27 +1574,95 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2015-06-21 13:59:46" }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "82ebae02209c21113908c229e9883c419720738a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "backendtea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-02-06 07:57:58" + }, { "name": "symfony/yaml", - "version": "v2.7.7", + "version": "v3.4.24", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "4cfcd7a9fceba662b3c036b7d9a91f6197af046c" + "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4cfcd7a9fceba662b3c036b7d9a91f6197af046c", - "reference": "4cfcd7a9fceba662b3c036b7d9a91f6197af046c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996", + "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1230,7 +1689,58 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-11-18 13:41:01" + "time": "2019-03-25 07:48:46" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25 11:19:39" } ], "aliases": [], @@ -1239,7 +1749,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.6" + "php": ">=7.1" }, "platform-dev": [] } From 1e6c6292eea50c5237942d594817db0b599341f0 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 11:59:50 +0200 Subject: [PATCH 05/18] Add minimum stability to dev --- composer.json | 4 +++- composer.lock | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 6d92731..6b0d05e 100644 --- a/composer.json +++ b/composer.json @@ -35,5 +35,7 @@ "psr-4": { "ActiveCollab\\Quickbooks\\Tests\\": "tests/" } - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index e8902ad..6b6afb5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "b2f576499dab7e3eaff01b522d88de22", - "content-hash": "94b5c290de753de9f5ecea72ca762539", + "hash": "aa7821a45c6936ea1578993398ec5482", + "content-hash": "6e6bb18f45770f957a90500f00b2e6f4", "packages": [ { "name": "guzzle/guzzle", @@ -1744,9 +1744,9 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": ">=7.1" From b461e7838167c163a00071050b452d1508435dc0 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 12:15:50 +0200 Subject: [PATCH 06/18] Update phpunit --- composer.json | 4 +- composer.lock | 385 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 296 insertions(+), 93 deletions(-) diff --git a/composer.json b/composer.json index 6b0d05e..0b75231 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "quickbooks/v3-php-sdk": "^5.0" }, "require-dev": { - "phpunit/phpunit": "4.8.*" + "phpunit/phpunit": "^5.0" }, "keywords": [ "oauth", @@ -36,6 +36,6 @@ "ActiveCollab\\Quickbooks\\Tests\\": "tests/" } }, - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 6b6afb5..93fb1de 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "aa7821a45c6936ea1578993398ec5482", - "content-hash": "6e6bb18f45770f957a90500f00b2e6f4", + "hash": "9ad6e5e663e1c78c00e7342a02fcfbd2", + "content-hash": "3b6541a9493fd9eb0708adaccfec7905", "packages": [ { "name": "guzzle/guzzle", @@ -610,6 +610,54 @@ ], "time": "2019-03-17 17:37:11" }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11 23:09:50" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -827,39 +875,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -885,7 +934,7 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2017-04-02 07:44:40" }, { "name": "phpunit/php-file-iterator", @@ -1026,29 +1075,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.12", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1071,44 +1120,54 @@ "keywords": [ "tokenizer" ], - "time": "2017-12-04 08:55:13" + "time": "2017-11-27 05:48:46" }, { "name": "phpunit/phpunit", - "version": "4.8.36", + "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { + "ext-xdebug": "*", "phpunit/php-invoker": "~1.1" }, "bin": [ @@ -1117,7 +1176,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -1143,30 +1202,33 @@ "testing", "xunit" ], - "time": "2017-06-21 08:07:12" + "time": "2018-02-01 05:50:59" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" @@ -1174,7 +1236,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -1200,7 +1262,52 @@ "xunit" ], "abandoned": true, - "time": "2015-10-02 06:51:40" + "time": "2017-06-30 09:13:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04 06:30:41" }, { "name": "sebastian/comparator", @@ -1320,28 +1427,28 @@ }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1366,25 +1473,25 @@ "environment", "hhvm" ], - "time": "2016-08-18 05:49:44" + "time": "2016-11-26 07:53:53" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", "shasum": "" }, "require": { "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "sebastian/recursion-context": "~2.0" }, "require-dev": { "ext-mbstring": "*", @@ -1393,7 +1500,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1433,7 +1540,7 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2016-11-19 08:54:04" }, { "name": "sebastian/global-state", @@ -1486,18 +1593,64 @@ ], "time": "2015-10-12 03:26:01" }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-02-18 15:18:39" + }, { "name": "sebastian/recursion-context", - "version": "1.0.5", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", "shasum": "" }, "require": { @@ -1509,7 +1662,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1537,23 +1690,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03 07:41:43" + "time": "2016-11-19 07:33:16" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" }, { "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/" @@ -1572,7 +1775,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": "2016-10-03 07:35:21" }, { "name": "symfony/polyfill-ctype", @@ -1634,20 +1837,20 @@ }, { "name": "symfony/yaml", - "version": "v3.4.24", + "version": "v4.2.5", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996" + "reference": "6712daf03ee25b53abb14e7e8e0ede1a770efdb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996", - "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996", + "url": "https://api.github.com/repos/symfony/yaml/zipball/6712daf03ee25b53abb14e7e8e0ede1a770efdb1", + "reference": "6712daf03ee25b53abb14e7e8e0ede1a770efdb1", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -1662,7 +1865,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1689,7 +1892,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-03-25 07:48:46" + "time": "2019-03-30 15:58:42" }, { "name": "webmozart/assert", @@ -1744,7 +1947,7 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, From a9dbd9f599668fee3a209859679460be0d8a8285 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 12:21:19 +0200 Subject: [PATCH 07/18] Remove unnessesary packages --- composer.json | 2 - composer.lock | 496 +------------------------------------------------- 2 files changed, 2 insertions(+), 496 deletions(-) diff --git a/composer.json b/composer.json index 0b75231..f567415 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,6 @@ "license": "MIT", "require": { "php": ">=7.1", - "league/oauth1-client": "~1.0", - "guzzle/guzzle": "~3.0", "quickbooks/v3-php-sdk": "^5.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 93fb1de..fb1ed4f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,401 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9ad6e5e663e1c78c00e7342a02fcfbd2", - "content-hash": "3b6541a9493fd9eb0708adaccfec7905", + "hash": "4a8b7d25e3ff0af0e3d2980df73cff91", + "content-hash": "86a026ac723cf0ac551751a00db4ec12", "packages": [ - { - "name": "guzzle/guzzle", - "version": "v3.9.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18 18:23:50" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.3.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.3-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2018-04-22 15:46:56" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20 10:07:11" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.5.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "9f83dded91781a01c63574e387eaa769be769115" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", - "reference": "9f83dded91781a01c63574e387eaa769be769115", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2018-12-04 20:46:45" - }, - { - "name": "league/oauth1-client", - "version": "1.7.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/oauth1-client.git", - "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/fca5f160650cb74d23fc11aa570dd61f86dcf647", - "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0" - }, - "require-dev": { - "mockery/mockery": "^0.9", - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\OAuth1\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Corlett", - "email": "bencorlett@me.com", - "homepage": "http://www.webcomm.com.au", - "role": "Developer" - } - ], - "description": "OAuth 1.0 Client Library", - "keywords": [ - "Authentication", - "SSO", - "authorization", - "bitbucket", - "identity", - "idp", - "oauth", - "oauth1", - "single sign on", - "trello", - "tumblr", - "twitter" - ], - "time": "2016-08-17 00:36:58" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06 14:39:51" - }, { "name": "quickbooks/v3-php-sdk", "version": "5.0.4", @@ -451,106 +59,6 @@ "smallbusiness" ], "time": "2019-03-26 08:42:18" - }, - { - "name": "ralouphie/getallheaders", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "time": "2016-02-11 07:05:27" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.49", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-11-21 14:20:20" } ], "packages-dev": [ From 3d5f599ac11c0ac3ff17579afb0062d2807afaea Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 4 Apr 2019 15:29:29 +0200 Subject: [PATCH 08/18] Improve code and implement new functions --- src/DataService/OAuth2Client.php | 45 ++++++++++++----------- src/DataService/OAuth2ClientInterface.php | 9 +++-- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/DataService/OAuth2Client.php b/src/DataService/OAuth2Client.php index f2eabf0..e5200a1 100644 --- a/src/DataService/OAuth2Client.php +++ b/src/DataService/OAuth2Client.php @@ -6,7 +6,7 @@ * (c) A51 doo . All rights reserved. */ -declare(strict_type=1); +declare(strict_types=1); namespace ActiveCollab\Quickbooks\DataService; @@ -29,29 +29,23 @@ public function __construct( $this->redirect_uri = $redirect_uri; } - protected function getRedirectUri(): string + private function getRedirectUri(): string { return $this->redirect_uri; } - private $data_service = false; - protected function getDataService(): DataService { - if ($this->data_service === false) { - $this->data_service = DataService::Configure( - [ - 'auth_mode' => 'oauth2', - 'ClientID' => $this->getClientId(), - 'ClientSecret' => $this->getClientSecret(), - 'RedirectURI' => $this->getRedirectUri(), - 'scope' => 'com.intuit.quickbooks.accounting', - 'baseUrl' => $this->getBaseUrl(), // "Development/Production" - ] - ); - } - - return $this->data_service; + return DataService::Configure( + [ + 'auth_mode' => 'oauth2', + 'ClientID' => $this->getClientId(), + 'ClientSecret' => $this->getClientSecret(), + 'RedirectURI' => $this->getRedirectUri(), + 'scope' => 'com.intuit.quickbooks.accounting', + 'baseUrl' => $this->getBaseUrl(), + ] + ); } public function getAuthorizationUrl(): string @@ -59,14 +53,21 @@ public function getAuthorizationUrl(): string return $this->getDataService()->getOAuth2LoginHelper()->getAuthorizationCodeURL(); } - public function getAuthorizationToken( - string $authorization_code, - string $realm_id - ): OAuth2AccessToken + public function getAuthorizationToken(string $authorization_code, string $realm_id): OAuth2AccessToken { return $this->getDataService()->getOAuth2LoginHelper()->exchangeAuthorizationCodeForToken( $authorization_code, $realm_id ); } + + public function refreshAccessToken(string $refresh_token): OAuth2AccessToken + { + return $this->getDataService()->getOAuth2LoginHelper()->refreshAccessTokenWithRefreshToken($refresh_token); + } + + public function revokeAccessToken(string $access_token): bool + { + return $this->getDataService()->getOAuth2LoginHelper()->revokeToken($access_token); + } } diff --git a/src/DataService/OAuth2ClientInterface.php b/src/DataService/OAuth2ClientInterface.php index 1560c1d..9c9f64c 100644 --- a/src/DataService/OAuth2ClientInterface.php +++ b/src/DataService/OAuth2ClientInterface.php @@ -16,8 +16,9 @@ interface OAuth2ClientInterface extends ClientInterface { public function getAuthorizationUrl(): string; - public function getAuthorizationToken( - string $authorization_code, - string $realm_id - ): OAuth2AccessToken; + public function getAuthorizationToken(string $authorization_code, string $realm_id): OAuth2AccessToken; + + public function refreshAccessToken(string $refresh_token): OAuth2AccessToken; + + public function revokeAccessToken(string $access_token): bool; } From 387cdcf836cab6c02fd75c95bfd8130263f730c7 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Mon, 8 Apr 2019 12:09:50 +0200 Subject: [PATCH 09/18] Backup packages for oauth1 --- composer.json | 4 +- composer.lock | 496 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 497 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index f567415..f092526 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,9 @@ "license": "MIT", "require": { "php": ">=7.1", - "quickbooks/v3-php-sdk": "^5.0" + "quickbooks/v3-php-sdk": "^5.0", + "league/oauth1-client": "^1.7", + "guzzle/guzzle": "^3.9" }, "require-dev": { "phpunit/phpunit": "^5.0" diff --git a/composer.lock b/composer.lock index fb1ed4f..5ff29b3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,401 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4a8b7d25e3ff0af0e3d2980df73cff91", - "content-hash": "86a026ac723cf0ac551751a00db4ec12", + "hash": "a56700d09e972bb8c14b0e65be523cdb", + "content-hash": "3efc9c01d63a152822eb0a84751d4af3", "packages": [ + { + "name": "guzzle/guzzle", + "version": "v3.9.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "abandoned": "guzzlehttp/guzzle", + "time": "2015-03-18 18:23:50" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22 15:46:56" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20 10:07:11" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2018-12-04 20:46:45" + }, + { + "name": "league/oauth1-client", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth1-client.git", + "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/fca5f160650cb74d23fc11aa570dd61f86dcf647", + "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5.0" + }, + "require-dev": { + "mockery/mockery": "^0.9", + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\OAuth1\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Corlett", + "email": "bencorlett@me.com", + "homepage": "http://www.webcomm.com.au", + "role": "Developer" + } + ], + "description": "OAuth 1.0 Client Library", + "keywords": [ + "Authentication", + "SSO", + "authorization", + "bitbucket", + "identity", + "idp", + "oauth", + "oauth1", + "single sign on", + "trello", + "tumblr", + "twitter" + ], + "time": "2016-08-17 00:36:58" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06 14:39:51" + }, { "name": "quickbooks/v3-php-sdk", "version": "5.0.4", @@ -59,6 +451,106 @@ "smallbusiness" ], "time": "2019-03-26 08:42:18" + }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11 07:05:27" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-11-21 14:20:20" } ], "packages-dev": [ From a654563eb7254310d19a47c2a8a1f9a197f3dcea Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Tue, 9 Apr 2019 12:08:52 +0200 Subject: [PATCH 10/18] Fix composer dependencies --- composer.json | 4 +- composer.lock | 635 +++++++++++++++++++++++++------------------------- 2 files changed, 318 insertions(+), 321 deletions(-) diff --git a/composer.json b/composer.json index f092526..5c36262 100644 --- a/composer.json +++ b/composer.json @@ -5,8 +5,8 @@ "require": { "php": ">=7.1", "quickbooks/v3-php-sdk": "^5.0", - "league/oauth1-client": "^1.7", - "guzzle/guzzle": "^3.9" + "league/oauth1-client": "1.6.*", + "guzzle/guzzle": "3.8.*" }, "require-dev": { "phpunit/phpunit": "^5.0" diff --git a/composer.lock b/composer.lock index 5ff29b3..bd31290 100644 --- a/composer.lock +++ b/composer.lock @@ -4,27 +4,27 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a56700d09e972bb8c14b0e65be523cdb", - "content-hash": "3efc9c01d63a152822eb0a84751d4af3", + "hash": "801112a70bc8fa670e1f8bd4ac907d4f", + "content-hash": "af63757b39b4afdde3cecf710e170bb9", "packages": [ { "name": "guzzle/guzzle", - "version": "v3.9.3", + "version": "v3.8.1", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", "shasum": "" }, "require": { "ext-curl": "*", "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" + "symfony/event-dispatcher": ">=2.1" }, "replace": { "guzzle/batch": "self.version", @@ -51,21 +51,18 @@ "guzzle/stream": "self.version" }, "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", + "doctrine/cache": "*", + "monolog/monolog": "1.*", "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + "psr/log": "1.0.*", + "symfony/class-loader": "*", + "zendframework/zend-cache": "<2.3", + "zendframework/zend-log": "<2.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.9-dev" + "dev-master": "3.8-dev" } }, "autoload": { @@ -89,7 +86,7 @@ "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -101,47 +98,40 @@ "web service" ], "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18 18:23:50" + "time": "2014-01-28 22:29:15" }, { - "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "name": "league/oauth1-client", + "version": "1.6.2", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "url": "https://github.com/thephpleague/oauth1-client.git", + "reference": "e8f1e7e419cbc40ec34a48c7068f5b4d50fa180a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/e8f1e7e419cbc40ec34a48c7068f5b4d50fa180a", + "reference": "e8f1e7e419cbc40ec34a48c7068f5b4d50fa180a", "shasum": "" }, "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" + "guzzle/guzzle": "3.*", + "php": ">=5.3.0" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" + "mockery/mockery": "~0.9", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "1.0-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\": "src/" + "League\\OAuth1\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -150,112 +140,122 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Ben Corlett", + "email": "bencorlett@me.com", + "homepage": "http://www.webcomm.com.au", + "role": "Developer" } ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", + "description": "OAuth 1.0 Client Library", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "Authentication", + "SSO", + "authorization", + "bitbucket", + "identity", + "idp", + "oauth", + "oauth1", + "single sign on", + "trello", + "tumblr", + "twitter" ], - "time": "2018-04-22 15:46:56" + "time": "2016-07-06 03:52:25" }, { - "name": "guzzlehttp/promises", - "version": "v1.3.1", + "name": "quickbooks/v3-php-sdk", + "version": "5.0.4", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "url": "https://github.com/intuit/QuickBooks-V3-PHP-SDK.git", + "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/intuit/QuickBooks-V3-PHP-SDK/zipball/f9d1e768adaba9bda7a1fd374adca04fc119b85c", + "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c", "shasum": "" }, "require": { - "php": ">=5.5.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "phpunit/phpunit": "^5.7" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } + "suggest": { + "ext-curl": "Uses Curl to make HTTP Requests", + "guzzlehttp/guzzle": "Uses Guzzle to make HTTP Requests" }, + "type": "library", "autoload": { "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "QuickBooksOnline\\API\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "hlu2", + "email": "Hao_Lu@intuit.com" } ], - "description": "Guzzle promises library", + "description": "The Official PHP SDK for QuickBooks Online Accounting API", + "homepage": "http://developer.intuit.com", "keywords": [ - "promise" + "api", + "http", + "quickbooks", + "rest", + "smallbusiness" ], - "time": "2016-12-20 10:07:11" + "time": "2019-03-26 08:42:18" }, { - "name": "guzzlehttp/psr7", - "version": "1.5.2", + "name": "symfony/event-dispatcher", + "version": "v2.8.49", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "9f83dded91781a01c63574e387eaa769be769115" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", - "reference": "9f83dded91781a01c63574e387eaa769be769115", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "php": ">=5.3.9" }, "require-dev": { - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" + "Symfony\\Component\\EventDispatcher\\": "" }, - "files": [ - "src/functions_include.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -264,117 +264,55 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2018-12-04 20:46:45" - }, + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-11-21 14:20:20" + } + ], + "packages-dev": [ { - "name": "league/oauth1-client", - "version": "1.7.0", + "name": "doctrine/instantiator", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/thephpleague/oauth1-client.git", - "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/fca5f160650cb74d23fc11aa570dd61f86dcf647", - "reference": "fca5f160650cb74d23fc11aa570dd61f86dcf647", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0" + "php": "^7.1" }, "require-dev": { - "mockery/mockery": "^0.9", - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\OAuth1\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ben Corlett", - "email": "bencorlett@me.com", - "homepage": "http://www.webcomm.com.au", - "role": "Developer" - } - ], - "description": "OAuth 1.0 Client Library", - "keywords": [ - "Authentication", - "SSO", - "authorization", - "bitbucket", - "identity", - "idp", - "oauth", - "oauth1", - "single sign on", - "trello", - "tumblr", - "twitter" - ], - "time": "2016-08-17 00:36:58" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -383,101 +321,59 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06 14:39:51" - }, - { - "name": "quickbooks/v3-php-sdk", - "version": "5.0.4", - "source": { - "type": "git", - "url": "https://github.com/intuit/QuickBooks-V3-PHP-SDK.git", - "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/intuit/QuickBooks-V3-PHP-SDK/zipball/f9d1e768adaba9bda7a1fd374adca04fc119b85c", - "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-mbstring": "*", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-curl": "Uses Curl to make HTTP Requests", - "guzzlehttp/guzzle": "Uses Guzzle to make HTTP Requests" - }, - "type": "library", - "autoload": { - "psr-4": { - "QuickBooksOnline\\API\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "hlu2", - "email": "Hao_Lu@intuit.com" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" } ], - "description": "The Official PHP SDK for QuickBooks Online Accounting API", - "homepage": "http://developer.intuit.com", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "api", - "http", - "quickbooks", - "rest", - "smallbusiness" + "constructor", + "instantiate" ], - "time": "2019-03-26 08:42:18" + "time": "2019-03-17 17:37:11" }, { - "name": "ralouphie/getallheaders", - "version": "2.0.5", + "name": "guzzlehttp/guzzle", + "version": "6.3.3", "source": { "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { - "php": ">=5.3" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, "autoload": { "files": [ - "src/getallheaders.php" - ] + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -485,53 +381,56 @@ ], "authors": [ { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" } ], - "description": "A polyfill for getallheaders.", - "time": "2016-02-11 07:05:27" + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22 15:46:56" }, { - "name": "symfony/event-dispatcher", - "version": "v2.8.49", + "name": "guzzlehttp/promises", + "version": "v1.3.1", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "phpunit/phpunit": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" + "GuzzleHttp\\Promise\\": "src/" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -540,56 +439,55 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" } ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-11-21 14:20:20" - } - ], - "packages-dev": [ + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20 10:07:11" + }, { - "name": "doctrine/instantiator", - "version": "1.2.0", + "name": "guzzlehttp/psr7", + "version": "1.5.2", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.5-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -597,18 +495,27 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ - "constructor", - "instantiate" + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" ], - "time": "2019-03-17 17:37:11" + "time": "2018-12-04 20:46:45" }, { "name": "myclabs/deep-copy", @@ -1264,6 +1171,96 @@ "abandoned": true, "time": "2017-06-30 09:13:00" }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06 14:39:51" + }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11 07:05:27" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", From 4aa91c0939bd4ffc41d7ce6c0bc8c699915e2a5e Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Fri, 18 Oct 2019 14:26:50 +0200 Subject: [PATCH 11/18] Composer require 'ext-json' package --- composer.json | 3 ++- composer.lock | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 5c36262..f17e2e8 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,8 @@ "php": ">=7.1", "quickbooks/v3-php-sdk": "^5.0", "league/oauth1-client": "1.6.*", - "guzzle/guzzle": "3.8.*" + "guzzle/guzzle": "3.8.*", + "ext-json": "^1.5" }, "require-dev": { "phpunit/phpunit": "^5.0" diff --git a/composer.lock b/composer.lock index bd31290..def8601 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "801112a70bc8fa670e1f8bd4ac907d4f", - "content-hash": "af63757b39b4afdde3cecf710e170bb9", + "hash": "5376302dfe8102b7d0d2d3ff514b9d8a", + "content-hash": "1db7554fb44a33dccb65215a76d63e17", "packages": [ { "name": "guzzle/guzzle", @@ -1949,7 +1949,8 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=7.1" + "php": ">=7.1", + "ext-json": "^1.5" }, "platform-dev": [] } From 94a0968cbd7ce6d36e55f67f94a45377c0b4d697 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Fri, 18 Oct 2019 14:27:58 +0200 Subject: [PATCH 12/18] Implement ResourceClient methods --- src/DataService/OAuth2ClientInterface.php | 2 +- src/DataService/ResourceClient.php | 91 +++++++++++++++++++++ src/DataService/ResourceClientInterface.php | 13 +++ 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/src/DataService/OAuth2ClientInterface.php b/src/DataService/OAuth2ClientInterface.php index 9c9f64c..42cd65d 100644 --- a/src/DataService/OAuth2ClientInterface.php +++ b/src/DataService/OAuth2ClientInterface.php @@ -6,7 +6,7 @@ * (c) A51 doo . All rights reserved. */ -declare(strict_type=1); +declare(strict_types=1); namespace ActiveCollab\Quickbooks\DataService; diff --git a/src/DataService/ResourceClient.php b/src/DataService/ResourceClient.php index b3beb6b..50e3484 100644 --- a/src/DataService/ResourceClient.php +++ b/src/DataService/ResourceClient.php @@ -10,7 +10,13 @@ namespace ActiveCollab\Quickbooks\DataService; +use ActiveCollab\Quickbooks\Data\Entity; +use ActiveCollab\Quickbooks\Data\QueryResponse; +use DateTime; +use Exception; +use QuickBooksOnline\API\Core\Http\Serialization\JsonObjectSerializer; use QuickBooksOnline\API\DataService\DataService; +use QuickBooksOnline\API\Facades\FacadeHelper; class ResourceClient extends Client implements ResourceClientInterface { @@ -69,4 +75,89 @@ protected function getDataService(): DataService return $this->data_service; } + + private $entity; + + public function setEntity(string $entity): ResourceClientInterface + { + $this->entity = $entity; + + return $this; + } + + public function query(string $query = null): QueryResponse + { + if ($query === null) { + $query = "SELECT * FROM {$this->entity}"; + } + + $entities = $this->getDataService()->Query($query); + + if ($error = $this->getDataService()->getLastError()) { + throw new Exception($error->getResponseBody()); + } + + if (empty($entities)) { + return new QueryResponse([]); + } + + $result = []; + + foreach ($entities as $entity) { + $result[0][] = $this->objectToArray($entity); + } + + return new QueryResponse($result); + } + + public function cdc(array $entities, DateTime $changed_since): array + { + $cdc_response = $this->getDataService()->CDC($entities, $changed_since->getTimestamp()); + + if ($error = $this->getDataService()->getLastError()) { + throw new Exception($error->getResponseBody()); + } + + $result = []; + + foreach ($cdc_response->entities as $entity_name => $entity) { + if (!isset($result[$entity_name])) { + $result[$entity_name] = []; + } + + $result[$entity_name][] = new Entity($this->objectToArray($entity)); + } + + return $result; + } + + public function read(int $id): Entity + { + $entity = $this->getDataService()->FindById($this->entity, $id); + + return new Entity($this->objectToArray($entity)); + } + + public function create(array $payload): Entity + { + $entity = $this + ->getDataService() + ->Add( + FacadeHelper::reflectArrayToObject($this->entity, $payload) + ); + + return new Entity($this->objectToArray($entity)); + } + + private function objectToArray($entity = null): array + { + if (!$entity) { + return []; + } + + return json_decode( + (new JsonObjectSerializer())->Serialize($entity), + true + ); + } } diff --git a/src/DataService/ResourceClientInterface.php b/src/DataService/ResourceClientInterface.php index 14edee2..aec6939 100644 --- a/src/DataService/ResourceClientInterface.php +++ b/src/DataService/ResourceClientInterface.php @@ -10,6 +10,19 @@ namespace ActiveCollab\Quickbooks\DataService; +use ActiveCollab\Quickbooks\Data\Entity; +use ActiveCollab\Quickbooks\Data\QueryResponse; +use DateTime; + interface ResourceClientInterface extends ClientInterface { + public function setEntity(string $entity): ResourceClientInterface; + + public function query(string $query = null): QueryResponse; + + public function cdc(array $entities, DateTime $changed_since): array; + + public function read(int $id): Entity; + + public function create(array $payload): Entity; } From 1137fc5bc357c5467f4c74017ed37908be0fe62e Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Mon, 21 Oct 2019 15:20:38 +0200 Subject: [PATCH 13/18] Improve resource client --- src/Data/Entity.php | 14 +++++++------- src/DataService/ResourceClient.php | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/Data/Entity.php b/src/Data/Entity.php index 11ca090..2a54973 100644 --- a/src/Data/Entity.php +++ b/src/Data/Entity.php @@ -4,32 +4,32 @@ class Entity implements \JsonSerializable { - protected $data = []; /** * Construct entity - * + * * @param array $data */ public function __construct(array $data) { - $this->data = $data; + $values = array_values($data); + $this->data = isset($values[0]) && is_array($values[0]) ? $values[0] : $data; } /** * Return id - * + * * @return int */ public function getId() { - return isset($this->data['Id']) ? (integer) $this->data['Id'] : null; + return isset($this->data['Id']) ? (int) $this->data['Id'] : null; } /** * Return raw data - * + * * @return array */ public function getRawData() @@ -39,7 +39,7 @@ public function getRawData() /** * Serialize data - * + * * @return array */ public function jsonSerialize() diff --git a/src/DataService/ResourceClient.php b/src/DataService/ResourceClient.php index 50e3484..8d9da42 100644 --- a/src/DataService/ResourceClient.php +++ b/src/DataService/ResourceClient.php @@ -112,7 +112,10 @@ public function query(string $query = null): QueryResponse public function cdc(array $entities, DateTime $changed_since): array { - $cdc_response = $this->getDataService()->CDC($entities, $changed_since->getTimestamp()); + $cdc_response = $this->getDataService()->CDC( + $entities, + $changed_since->getTimestamp() + ); if ($error = $this->getDataService()->getLastError()) { throw new Exception($error->getResponseBody()); @@ -120,12 +123,16 @@ public function cdc(array $entities, DateTime $changed_since): array $result = []; - foreach ($cdc_response->entities as $entity_name => $entity) { + foreach ($cdc_response->entities as $entity_name => $entity_array) { if (!isset($result[$entity_name])) { $result[$entity_name] = []; } - $result[$entity_name][] = new Entity($this->objectToArray($entity)); + if (is_array($entity_array)) { + foreach ($entity_array as $entity) { + $result[$entity_name][] = new Entity($this->objectToArray($entity)); + } + } } return $result; @@ -155,6 +162,8 @@ private function objectToArray($entity = null): array return []; } + $entity = is_array($entity) ? $entity[0] : $entity; + return json_decode( (new JsonObjectSerializer())->Serialize($entity), true From a92abbac3240df0f1f5f4865addce0c836a4a2a4 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Mon, 21 Oct 2019 15:54:51 +0200 Subject: [PATCH 14/18] Url encode sync timestamp before send it to CDC --- src/DataService/ResourceClient.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/DataService/ResourceClient.php b/src/DataService/ResourceClient.php index 8d9da42..39c67df 100644 --- a/src/DataService/ResourceClient.php +++ b/src/DataService/ResourceClient.php @@ -114,7 +114,12 @@ public function cdc(array $entities, DateTime $changed_since): array { $cdc_response = $this->getDataService()->CDC( $entities, - $changed_since->getTimestamp() + urlencode( + date_format( + $changed_since, + DateTime::ATOM + ) + ) ); if ($error = $this->getDataService()->getLastError()) { From f995af60bc96fe312e099e7b0fb44a2783e4e8ec Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Tue, 22 Oct 2019 14:16:35 +0200 Subject: [PATCH 15/18] Add legacy resource client to works with oauth1 credencials --- src/DataService/LegacyResourceClient.php | 35 ++++++++++++++++++++++++ src/DataService/ResourceClient.php | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/DataService/LegacyResourceClient.php diff --git a/src/DataService/LegacyResourceClient.php b/src/DataService/LegacyResourceClient.php new file mode 100644 index 0000000..ac75040 --- /dev/null +++ b/src/DataService/LegacyResourceClient.php @@ -0,0 +1,35 @@ +. All rights reserved. + */ + +declare(strict_types=1); + +namespace ActiveCollab\Quickbooks\DataService; + +use QuickBooksOnline\API\DataService\DataService; + +class LegacyResourceClient extends ResourceClient +{ + protected function getDataService(): DataService + { + if ($this->data_service === false) { + $this->data_service = DataService::Configure( + [ + 'auth_mode' => 'oauth1', + 'consumerKey' => $this->getClientId(), + 'consumerSecret' => $this->getClientSecret(), + 'accessTokenKey' => $this->getAccessToken(), + 'accessTokenSecret' => $this->getRefreshToken(), + 'QBORealmID' => $this->getRealmId(), + 'baseUrl' => $this->getBaseUrl(), + ] + ); + } + + return $this->data_service; + } +} diff --git a/src/DataService/ResourceClient.php b/src/DataService/ResourceClient.php index 39c67df..0b4f4ef 100644 --- a/src/DataService/ResourceClient.php +++ b/src/DataService/ResourceClient.php @@ -55,7 +55,7 @@ protected function getRealmId(): string return $this->realm_id; } - private $data_service = false; + protected $data_service = false; protected function getDataService(): DataService { From 26f6449a41662e2f499e787d649654a503b4d5e4 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Wed, 23 Oct 2019 12:44:37 +0200 Subject: [PATCH 16/18] Update sdk and implement migrate method --- composer.lock | 10 +++++----- src/DataService/OAuth2Client.php | 22 ++++++++++++++++++++++ src/DataService/OAuth2ClientInterface.php | 8 ++++++++ 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index def8601..8972e27 100644 --- a/composer.lock +++ b/composer.lock @@ -165,16 +165,16 @@ }, { "name": "quickbooks/v3-php-sdk", - "version": "5.0.4", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/intuit/QuickBooks-V3-PHP-SDK.git", - "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c" + "reference": "670e0201518fbaad1e9339d76ab30eaf17078e62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/intuit/QuickBooks-V3-PHP-SDK/zipball/f9d1e768adaba9bda7a1fd374adca04fc119b85c", - "reference": "f9d1e768adaba9bda7a1fd374adca04fc119b85c", + "url": "https://api.github.com/repos/intuit/QuickBooks-V3-PHP-SDK/zipball/670e0201518fbaad1e9339d76ab30eaf17078e62", + "reference": "670e0201518fbaad1e9339d76ab30eaf17078e62", "shasum": "" }, "require": { @@ -214,7 +214,7 @@ "rest", "smallbusiness" ], - "time": "2019-03-26 08:42:18" + "time": "2019-10-03 20:20:06" }, { "name": "symfony/event-dispatcher", diff --git a/src/DataService/OAuth2Client.php b/src/DataService/OAuth2Client.php index e5200a1..c9291dc 100644 --- a/src/DataService/OAuth2Client.php +++ b/src/DataService/OAuth2Client.php @@ -70,4 +70,26 @@ public function revokeAccessToken(string $access_token): bool { return $this->getDataService()->getOAuth2LoginHelper()->revokeToken($access_token); } + + public function migrateOAuth1ToOAuth2( + string $consumer_key, + string $consumer_secret, + string $access_token, + string $access_token_secret, + string $environment + ): OAuth2AccessToken + { + return $this + ->getDataService() + ->getOAuth2LoginHelper() + ->OAuth1ToOAuth2Migration( + $consumer_key, + $consumer_secret, + $access_token, + $access_token_secret, + 'com.intuit.quickbooks.accounting', + null, + $environment + ); + } } diff --git a/src/DataService/OAuth2ClientInterface.php b/src/DataService/OAuth2ClientInterface.php index 42cd65d..676d525 100644 --- a/src/DataService/OAuth2ClientInterface.php +++ b/src/DataService/OAuth2ClientInterface.php @@ -21,4 +21,12 @@ public function getAuthorizationToken(string $authorization_code, string $realm_ public function refreshAccessToken(string $refresh_token): OAuth2AccessToken; public function revokeAccessToken(string $access_token): bool; + + public function migrateOAuth1ToOAuth2( + string $consumer_key, + string $consumer_secret, + string $access_token, + string $access_token_secret, + string $environment + ): OAuth2AccessToken; } From 83705a1a3ad8c861db655af21ce38bc03ccfa177 Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 24 Oct 2019 10:26:54 +0200 Subject: [PATCH 17/18] Update php version into travis yml --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 048df16..b09a20e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,7 @@ language: php php: - - 5.4 - - 5.5 - - 5.6 + - 7.1 before_script: - composer self-update From 490ad670b42f9e04c7ef5b4c17f58605af96cfac Mon Sep 17 00:00:00 2001 From: Marko Dobric Date: Thu, 24 Oct 2019 10:31:58 +0200 Subject: [PATCH 18/18] Use php 7.2 version into travis yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b09a20e..d6ea1a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: php php: - - 7.1 + - 7.2 before_script: - composer self-update