From c7a5ecca6cf4edd993badc49d54555a6ae9bf888 Mon Sep 17 00:00:00 2001 From: Victor Pryazhnikov Date: Sun, 4 Apr 2021 21:34:05 +0300 Subject: [PATCH] Fix of DynamoDbClient::formatAttributes Looks like formatAttributes() was removed before v3, so switching to method existence check instead of version check --- tests/Monolog/Handler/DynamoDbHandlerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Monolog/Handler/DynamoDbHandlerTest.php b/tests/Monolog/Handler/DynamoDbHandlerTest.php index b6df9bae..bd11abf4 100644 --- a/tests/Monolog/Handler/DynamoDbHandlerTest.php +++ b/tests/Monolog/Handler/DynamoDbHandlerTest.php @@ -29,10 +29,10 @@ class DynamoDbHandlerTest extends TestCase $implementedMethods = ['__call']; $absentMethods = []; - if ($this->isV3) { - $absentMethods[] = 'formatAttributes'; - } else { + if (method_exists('Aws\DynamoDb\DynamoDbClient', 'formatAttributes')) { $implementedMethods[] = 'formatAttributes'; + } else { + $absentMethods[] = 'formatAttributes'; } $this->client = $this->getMockBuilder('Aws\DynamoDb\DynamoDbClient')