From c20dde64c94ecc19435aa7401df35b18ad48540e Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Fri, 17 Nov 2017 17:48:02 +0300 Subject: [PATCH] 1.0.4 --- Result.php | 17 +++++++++-------- composer.json | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Result.php b/Result.php index 351490b..b942753 100644 --- a/Result.php +++ b/Result.php @@ -3,8 +3,8 @@ use Df\PaypalClone\W\Exception\InvalidSignature; use Df\Xml\G; use Dfe\YandexKassa\W\Event as Ev; -use Magento\Framework\App\Response\Http; -use Magento\Framework\App\Response\HttpInterface as IHttp; +use Magento\Framework\App\Response\Http as HttpResponse; +use Magento\Framework\App\Response\HttpInterface as IHttpResponse; use Zend_Date as ZD; use \Exception as Ex; @@ -55,6 +55,9 @@ class Result extends \Df\Framework\W\Result { /** * 2017-10-02 + * 2017-11-17 + * We can use the PHP «final» keyword here, + * because the method is absent in @see \Magento\Framework\Controller\ResultInterface * @override * @see \Df\Framework\W\Result::__toString() * @used-by render() @@ -182,11 +185,10 @@ final function __toString() {return df_xml_g("{$this->_ev->t()}Response", [], [G * @override * @see \Magento\Framework\Controller\AbstractResult::render() * https://github.com/magento/magento2/blob/2.1.0/lib/internal/Magento/Framework/Controller/AbstractResult.php#L109-L113 - * @param IHttp|Http $res - * @return $this + * @param IHttpResponse|HttpResponse $r */ - final protected function render(IHttp $res) { - $res->setBody($this->__toString()); + final protected function render(IHttpResponse $r) { + $r->setBody($this->__toString()); /** * 2017-10-02 * In English: «MIME type: application/xml». @@ -194,8 +196,7 @@ final protected function render(IHttp $res) { * In Russian: «MIME-тип: application/xml». * https://tech.yandex.ru/money/doc/payment-solution/payment-notifications/payment-notifications-http-docpage/ */ - df_response_content_type('application/xml', $res); - return $this; + df_response_content_type('application/xml', $r); } /** diff --git a/composer.json b/composer.json index 004af88..754a8dd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/yandex-kassa" - ,"version": "1.0.3" + ,"version": "1.0.4" ,"description": "Yandex.Kassa (Яндекс.Касса, Yandex.Checkout) integration with Magento 2" ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/yandex-kassa" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=3.3.18"} + ,"require": {"mage2pro/core": ">=3.3.20"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\YandexKassa\\": ""}} ,"keywords": [ "API"