Skip to content

Commit 605b196

Browse files
jderusseNyholm
andauthored
Deprecate client's abstract methods (#613)
* Deprecate client's abstract methods * Add changelog * Delete deprecated methods on not-released client Co-authored-by: Tobias Nyholm <[email protected]>
1 parent 4fa15e0 commit 605b196

File tree

3 files changed

+22
-59
lines changed

3 files changed

+22
-59
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Added operation `UpdateTimeToLiveInput`
88

9+
### Deprecation
10+
11+
- Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client.
12+
913
## 0.2.1
1014

1115
### Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"php": "^7.2.5",
1515
"ext-filter": "*",
1616
"ext-json": "*",
17-
"async-aws/core": "^1.0"
17+
"async-aws/core": "^1.2"
1818
},
1919
"extra": {
2020
"branch-alias": {

src/DynamoDbClient.php

Lines changed: 17 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -428,140 +428,99 @@ protected function getEndpointMetadata(?string $region): array
428428
case 'us-west-1':
429429
case 'us-west-2':
430430
return [
431-
'endpoint' => 'https://dynamodb.%region%.amazonaws.com',
431+
'endpoint' => "https://dynamodb.$region.amazonaws.com",
432432
'signRegion' => $region,
433433
'signService' => 'dynamodb',
434-
'signVersions' => [
435-
0 => 'v4',
436-
],
434+
'signVersions' => ['v4'],
437435
];
438436
case 'cn-north-1':
439437
case 'cn-northwest-1':
440438
return [
441-
'endpoint' => 'https://dynamodb.%region%.amazonaws.com.cn',
439+
'endpoint' => "https://dynamodb.$region.amazonaws.com.cn",
442440
'signRegion' => $region,
443441
'signService' => 'dynamodb',
444-
'signVersions' => [
445-
0 => 'v4',
446-
],
442+
'signVersions' => ['v4'],
447443
];
448444
case 'us-gov-east-1':
449445
case 'us-gov-west-1':
450446
return [
451-
'endpoint' => 'https://dynamodb.%region%.amazonaws.com',
447+
'endpoint' => "https://dynamodb.$region.amazonaws.com",
452448
'signRegion' => $region,
453449
'signService' => 'dynamodb',
454-
'signVersions' => [
455-
0 => 'v4',
456-
],
450+
'signVersions' => ['v4'],
457451
];
458452
case 'us-isob-east-1':
459453
return [
460-
'endpoint' => 'https://dynamodb.%region%.sc2s.sgov.gov',
454+
'endpoint' => "https://dynamodb.$region.sc2s.sgov.gov",
461455
'signRegion' => $region,
462456
'signService' => 'dynamodb',
463-
'signVersions' => [
464-
0 => 'v4',
465-
],
457+
'signVersions' => ['v4'],
466458
];
467459
case 'ca-central-1-fips':
468460
return [
469461
'endpoint' => 'https://dynamodb-fips.ca-central-1.amazonaws.com',
470462
'signRegion' => 'ca-central-1',
471463
'signService' => 'dynamodb',
472-
'signVersions' => [
473-
0 => 'v4',
474-
],
464+
'signVersions' => ['v4'],
475465
];
476466
case 'local':
477467
return [
478468
'endpoint' => 'http://localhost:8000',
479469
'signRegion' => 'us-east-1',
480470
'signService' => 'dynamodb',
481-
'signVersions' => [
482-
0 => 'v4',
483-
],
471+
'signVersions' => ['v4'],
484472
];
485473
case 'us-east-1-fips':
486474
return [
487475
'endpoint' => 'https://dynamodb-fips.us-east-1.amazonaws.com',
488476
'signRegion' => 'us-east-1',
489477
'signService' => 'dynamodb',
490-
'signVersions' => [
491-
0 => 'v4',
492-
],
478+
'signVersions' => ['v4'],
493479
];
494480
case 'us-east-2-fips':
495481
return [
496482
'endpoint' => 'https://dynamodb-fips.us-east-2.amazonaws.com',
497483
'signRegion' => 'us-east-2',
498484
'signService' => 'dynamodb',
499-
'signVersions' => [
500-
0 => 'v4',
501-
],
485+
'signVersions' => ['v4'],
502486
];
503487
case 'us-gov-east-1-fips':
504488
return [
505489
'endpoint' => 'https://dynamodb.us-gov-east-1.amazonaws.com',
506490
'signRegion' => 'us-gov-east-1',
507491
'signService' => 'dynamodb',
508-
'signVersions' => [
509-
0 => 'v4',
510-
],
492+
'signVersions' => ['v4'],
511493
];
512494
case 'us-gov-west-1-fips':
513495
return [
514496
'endpoint' => 'https://dynamodb.us-gov-west-1.amazonaws.com',
515497
'signRegion' => 'us-gov-west-1',
516498
'signService' => 'dynamodb',
517-
'signVersions' => [
518-
0 => 'v4',
519-
],
499+
'signVersions' => ['v4'],
520500
];
521501
case 'us-iso-east-1':
522502
return [
523503
'endpoint' => 'https://dynamodb.us-iso-east-1.c2s.ic.gov',
524504
'signRegion' => 'us-iso-east-1',
525505
'signService' => 'dynamodb',
526-
'signVersions' => [
527-
0 => 'v4',
528-
],
506+
'signVersions' => ['v4'],
529507
];
530508
case 'us-west-1-fips':
531509
return [
532510
'endpoint' => 'https://dynamodb-fips.us-west-1.amazonaws.com',
533511
'signRegion' => 'us-west-1',
534512
'signService' => 'dynamodb',
535-
'signVersions' => [
536-
0 => 'v4',
537-
],
513+
'signVersions' => ['v4'],
538514
];
539515
case 'us-west-2-fips':
540516
return [
541517
'endpoint' => 'https://dynamodb-fips.us-west-2.amazonaws.com',
542518
'signRegion' => 'us-west-2',
543519
'signService' => 'dynamodb',
544-
'signVersions' => [
545-
0 => 'v4',
546-
],
520+
'signVersions' => ['v4'],
547521
];
548522
}
549523

550524
throw new UnsupportedRegion(sprintf('The region "%s" is not supported by "DynamoDb".', $region));
551525
}
552-
553-
protected function getServiceCode(): string
554-
{
555-
return 'dynamodb';
556-
}
557-
558-
protected function getSignatureScopeName(): string
559-
{
560-
return 'dynamodb';
561-
}
562-
563-
protected function getSignatureVersion(): string
564-
{
565-
return 'v4';
566-
}
567526
}

0 commit comments

Comments
 (0)