File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 5
5
### Changed
6
6
7
7
- Enable compiler optimization for the ` sprintf ` function.
8
+ - Avoid calls to spl_object_ methods when computing cache key.
8
9
9
10
## 1.22.0
10
11
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public function __construct(CredentialProvider $decorated)
33
33
34
34
public function getCredentials (Configuration $ configuration ): ?Credentials
35
35
{
36
- $ key = spl_object_hash ( $ configuration );
36
+ $ key = sha1 ( serialize ( $ configuration) );
37
37
if (!\array_key_exists ($ key , $ this ->cache ) || (null !== $ this ->cache [$ key ] && $ this ->cache [$ key ]->isExpired ())) {
38
38
$ this ->cache [$ key ] = $ this ->decorated ->getCredentials ($ configuration );
39
39
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public function __construct(iterable $providers)
41
41
42
42
public function getCredentials (Configuration $ configuration ): ?Credentials
43
43
{
44
- $ key = spl_object_hash ( $ configuration );
44
+ $ key = sha1 ( serialize ( $ configuration) );
45
45
if (\array_key_exists ($ key , $ this ->lastSuccessfulProvider )) {
46
46
if (null === $ provider = $ this ->lastSuccessfulProvider [$ key ]) {
47
47
return null ;
You can’t perform that action at this time.
0 commit comments