diff --git a/API/Client/JSON.php b/API/Client/JSON.php index e1de5b9..3d89041 100644 --- a/API/Client/JSON.php +++ b/API/Client/JSON.php @@ -3,6 +3,14 @@ use Df\Core\Exception as DFE; // 2017-07-02 final class JSON extends \Dfe\Dynamics365\API\Client { + /** + * 2017-07-06 + * @override + * @see \Df\API\Client::_construct() + * @used-by \Df\API\Client::__construct() + */ + final protected function _construct() {parent::_construct(); $this->addFilterJsonDecode();} + /** * 2017-07-02 * 2017-07-03 @@ -19,16 +27,6 @@ final class JSON extends \Dfe\Dynamics365\API\Client { */ protected function accept() {return 'json';} - /** - * 2017-07-05 - * @override - * @see \Df\API\Client::responseFilterC() - * @used-by \Df\API\Client::p() - * @used-by p() - * @return string - */ - protected function responseFilterC() {return \Df\API\Response\Filter\JSON::class;} - /** * 2017-07-05 * @see \Df\API\Client::responseValidatorC() diff --git a/API/Validator/JSON.php b/API/Validator/JSON.php index ddd7c99..055aa20 100644 --- a/API/Validator/JSON.php +++ b/API/Validator/JSON.php @@ -38,7 +38,7 @@ protected function rs() { $e = dfa($this->r(), 'error'); // 2017-06-30 It correctly works even if the key does not exist in the array. unset($e['innererror']['stacktrace']); - return df_json_encode_pretty($e); + return df_json_encode($e); } /** diff --git a/T/TestCase.php b/T/TestCase.php index a1d56ee..14ab027 100644 --- a/T/TestCase.php +++ b/T/TestCase.php @@ -14,7 +14,7 @@ abstract class TestCase extends \Df\Core\TestCase { * @used-by \Dfe\Dynamics365\T\Price::productpricelevels() * @param array(string => mixed) $r */ - final protected function o(array $r) {echo df_json_encode_pretty($r);} + final protected function o(array $r) {echo df_json_encode($r);} /** * 2017-07-01 diff --git a/composer.json b/composer.json index d8139ae..e932f4d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/dynamics365" - ,"version": "0.2.0" + ,"version": "0.2.1" ,"description": "The «Microsoft Dynamics 365» extension for Magento 2." ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/dynamics365" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=2.7.39"} + ,"require": {"mage2pro/core": ">=2.7.40"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Dynamics365\\": ""}} ,"keywords": [ "CRM"