Skip to content

Commit

Permalink
fix: Variable hint
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Dec 17, 2023
1 parent df7ba11 commit 8057bc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Models/Stateful/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

class User extends \Auth0\Symfony\Models\User implements UserInterface
{
protected $roleAuthenticatedUsing = 'ROLE_USING_SESSION';
protected array $roleAuthenticatedUsing = ['ROLE_USING_SESSION'];

This comment has been minimized.

Copy link
@JanMikes

JanMikes Dec 18, 2023

This change is causing Warning: Array to string conversion which leads to ErrorException, due to $response in Models\User::getRoles() is no longer array of strings but contains array.

Screenshot 2023-12-18 at 14 24 23

This comment has been minimized.

Copy link
@JanMikes

JanMikes Dec 18, 2023

$response = array_merge($response, $this->roleAuthenticatedUsing); solves the problem

}
2 changes: 1 addition & 1 deletion src/Models/Stateless/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

class User extends \Auth0\Symfony\Models\User implements UserInterface
{
protected $roleAuthenticatedUsing = 'ROLE_USING_TOKEN';
protected array $roleAuthenticatedUsing = ['ROLE_USING_TOKEN'];

This comment has been minimized.

Copy link
@JanMikes

JanMikes Dec 18, 2023

I am sure here will be the same problem as above - array to string conversion in Models\User::getRoles()

}

0 comments on commit 8057bc4

Please sign in to comment.