Skip to content

Commit

Permalink
Remove calls to spl_object_ functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Sep 13, 2024
1 parent 88db7a0 commit ca72672
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Core/src/Credentials/CacheProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(CredentialProvider $decorated)

public function getCredentials(Configuration $configuration): ?Credentials
{
$key = spl_object_hash($configuration);
$key = sha1(serialize($configuration));
if (!\array_key_exists($key, $this->cache) || (null !== $this->cache[$key] && $this->cache[$key]->isExpired())) {
$this->cache[$key] = $this->decorated->getCredentials($configuration);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Credentials/ChainProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(iterable $providers)

public function getCredentials(Configuration $configuration): ?Credentials
{
$key = spl_object_hash($configuration);
$key = sha1(serialize($configuration));
if (\array_key_exists($key, $this->lastSuccessfulProvider)) {
if (null === $provider = $this->lastSuccessfulProvider[$key]) {
return null;
Expand Down

0 comments on commit ca72672

Please sign in to comment.