Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Controller/Component/AuthenticationComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ public function getIdentityData(string $path): mixed
* is cleared and then set to ensure that privilege escalation
* and de-escalation include side effects like session rotation.
*
* @param \ArrayAccess $identity Identity data to persist.
* @param \ArrayAccess|array $identity Identity data to persist.
* @return $this
*/
public function setIdentity(ArrayAccess $identity)
public function setIdentity(ArrayAccess|array $identity)
{
$controller = $this->getController();
$service = $this->getAuthenticationService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ public function testSetIdentity()
$component->setIdentity($this->identityData);
$result = $component->getIdentity();
$this->assertSame($this->identityData, $result->getOriginalData());

$identityData = ['id' => 99];
$component->setIdentity($identityData);
$result = $component->getIdentity();
$this->assertSame($identityData, $result->getOriginalData());
}

/**
Expand Down