Skip to content

Commit

Permalink
[MenuBundle] fix Pimcore 10.6 compatibility issue - ignore psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed May 24, 2023
1 parent 9fbea27 commit 4c5322f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CoreShop/Bundle/MenuBundle/Guard/PimcoreGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@ public function matchItem(ItemInterface $item): bool
$user = $token->getUser();

if (class_exists(\Pimcore\Security\User\User::class) && $user instanceof \Pimcore\Security\User\User) {
/**
* @psalm-suppress UndefinedClass, UndefinedInterfaceMethod
*/
$user = $user->getUser();
}

if (class_exists(\Pimcore\Bundle\AdminBundle\Security\User\User::class) && $user instanceof \Pimcore\Bundle\AdminBundle\Security\User\User) {
/**
* @psalm-suppress UndefinedClass, UndefinedInterfaceMethod
*/
$user = $user->getUser();
}

Expand Down

0 comments on commit 4c5322f

Please sign in to comment.