Skip to content

Commit

Permalink
Merge pull request #580 from Slamdunk/clone_configs
Browse files Browse the repository at this point in the history
Configuration: lets clone third-party config objects
  • Loading branch information
Slamdunk authored Jul 26, 2023
2 parents 3ce8459 + 06cc1a3 commit eb78151
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Storageless/Http/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getClientFingerprintConfiguration(): FingerprintConfig
public function withJwtConfiguration(JwtConfig $jwtConfiguration): self
{
$new = clone $this;
$new->jwtConfiguration = $jwtConfiguration;
$new->jwtConfiguration = clone $jwtConfiguration;

return $new;
}
Expand Down
2 changes: 1 addition & 1 deletion test/StoragelessTest/Http/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function testImmutability(): void
$jwtConfig = clone $this->jwtConfig;
$rightConfig = $leftConfig->withJwtConfiguration($jwtConfig);
self::assertNotSame($leftConfig, $rightConfig);
self::assertSame($jwtConfig, $rightConfig->getJwtConfiguration());
self::assertNotSame($jwtConfig, $rightConfig->getJwtConfiguration());

$clock = FrozenClock::fromUTC();
$leftConfig = $rightConfig->withClock($clock);
Expand Down

0 comments on commit eb78151

Please sign in to comment.