From 88ab0a8e8104cdbaca2dbdd19bdb3883453b9076 Mon Sep 17 00:00:00 2001 From: Alexey Chelnakov Date: Wed, 20 Jun 2018 18:45:06 +0300 Subject: [PATCH] fix cache, log --- composer.json | 4 +- composer.lock | 123 ++++++++++++++++++++++++- src/AtolOnlineClient/AtolOnlineApi.php | 11 ++- 3 files changed, 135 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 26811e1..0f60eae 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,9 @@ "ext-curl": "*", "guzzle/guzzle": "~3.7", "jms/serializer": "~0.12 || ~1.4.2", - "symfony/validator": "2.8.*" + "symfony/validator": "2.8.*", + "doctrine/cache": "1.7.*", + "psr/log": "~1.0" }, "require-dev": { "phpunit/phpunit": "7.1." diff --git a/composer.lock b/composer.lock index 906b2d0..3002ec1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "464b4746b38f4b99a1f77d9f83b80d98", + "content-hash": "65e87bbd3abc4686d9a808a71306071a", "packages": [ { "name": "doctrine/annotations", @@ -74,6 +74,80 @@ ], "time": "2017-12-06T07:11:42+00:00" }, + { + "name": "doctrine/cache", + "version": "v1.7.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a", + "reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2017-08-25T07:02:50+00:00" + }, { "name": "doctrine/instantiator", "version": "1.1.0", @@ -537,6 +611,53 @@ ], "time": "2015-07-25T16:39:46+00:00" }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, { "name": "symfony/event-dispatcher", "version": "v2.8.41", diff --git a/src/AtolOnlineClient/AtolOnlineApi.php b/src/AtolOnlineClient/AtolOnlineApi.php index 654d43a..30ae871 100644 --- a/src/AtolOnlineClient/AtolOnlineApi.php +++ b/src/AtolOnlineClient/AtolOnlineApi.php @@ -159,7 +159,16 @@ class AtolOnlineApi } /** - * @return mixed + * @return string + */ + public function getVersion(): string + { + return $this->version; + } + + /** + * @return bool|mixed + * @throws \Exception */ protected function getToken() {