1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-04 12:17:35 +02:00

Fix of DynamoDbClient::formatAttributes

Looks like formatAttributes() was removed before v3,
so switching to method existence check instead of version check
This commit is contained in:
Victor Pryazhnikov
2021-04-04 21:34:05 +03:00
parent 2bc1351c1e
commit c7a5ecca6c

View File

@@ -29,10 +29,10 @@ class DynamoDbHandlerTest extends TestCase
$implementedMethods = ['__call']; $implementedMethods = ['__call'];
$absentMethods = []; $absentMethods = [];
if ($this->isV3) { if (method_exists('Aws\DynamoDb\DynamoDbClient', 'formatAttributes')) {
$absentMethods[] = 'formatAttributes';
} else {
$implementedMethods[] = 'formatAttributes'; $implementedMethods[] = 'formatAttributes';
} else {
$absentMethods[] = 'formatAttributes';
} }
$this->client = $this->getMockBuilder('Aws\DynamoDb\DynamoDbClient') $this->client = $this->getMockBuilder('Aws\DynamoDb\DynamoDbClient')