Skip to content

Commit

Permalink
Drops PHP 7.4 to favor attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeven committed Mar 20, 2024
1 parent 52da59a commit 077af52
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bundle/Spec/CirclicalUser/Objects/SampleUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getName(): string
return $this->name;
}

public function getId(): int|string
public function getId(): int|string|null
{
return $this->id;
}
Expand Down
2 changes: 1 addition & 1 deletion bundle/Spec/CirclicalUser/Service/AccessServiceSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ function it_accepts_a_user_with_an_id(User $testUser)

function it_rejects_users_with_no_id(User $noUser)
{
$noUser->getId()->willReturn(null);
$noUser->getId()->willReturn();
$this->shouldThrow(UserRequiredException::class)->during('setUser', [$noUser]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Provider/UserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

interface UserInterface
{
public function getId(): int|string;
public function getId(): int|string|null;

public function getRoles(): array;

Expand Down
2 changes: 1 addition & 1 deletion src/Service/AuthenticationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ private function setCookie(string $name, string $value, int $expiry, bool $httpO
* - COOKIE_USER has its contents encrypted by the system key
* - the random-named-cookie has its contents encrypted by the user key
*
* @throws InvalidKey
* @see self::setSessionCookies
*
* @throws InvalidKey
*/
public function getIdentity(): ?User
{
Expand Down

0 comments on commit 077af52

Please sign in to comment.