[SF8] Fix interface signature changes

This commit is contained in:
TheMilek 2026-02-18 13:25:38 +01:00 committed by Grzegorz Sadowski
parent bff3428026
commit 0dba062dbf
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
9 changed files with 10 additions and 9 deletions

View file

@ -38,7 +38,7 @@ final class OrderAdjustmentsVoter extends Voter
return self::SYLIUS_ORDER_ADJUSTMENT === $attribute;
}
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, mixed $vote = null): bool
{
$user = $token->getUser();

View file

@ -35,7 +35,7 @@ final class ShopUserVoter extends Voter
return self::SYLIUS_SHOP_USER === $attribute;
}
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, mixed $vote = null): bool
{
$user = $token->getUser();

View file

@ -57,7 +57,7 @@ final class Kernel extends BaseKernel
$container->setParameter('container.dumper.inline_class_loader', true);
}
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load($this->getProjectDir() . '/config/config.yaml');

View file

@ -24,7 +24,7 @@ final class UserImpersonatorSubscriber implements EventSubscriberInterface
{
}
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [
LogoutEvent::class => 'unimpersonate',

View file

@ -56,7 +56,7 @@ final class ShopBillingDataType extends AbstractType
;
}
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('data_class', $this->dataClass);
}

View file

@ -30,7 +30,7 @@ class ImpersonationVoter implements CacheableVoterInterface
) {
}
public function vote(TokenInterface $token, mixed $subject, array $attributes): int
public function vote(TokenInterface $token, mixed $subject, array $attributes, mixed $vote = null): int
{
$result = VoterInterface::ACCESS_ABSTAIN;

View file

@ -66,7 +66,7 @@ final class ExchangeRateType extends AbstractResourceType
$resolver->setDefault('rounding_mode', \NumberFormatter::ROUND_HALFEVEN);
}
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'sylius_exchange_rate';
}

View file

@ -38,7 +38,7 @@ class AppKernel extends Kernel
];
}
public function registerContainerConfiguration(LoaderInterface $loader)
public function registerContainerConfiguration(LoaderInterface $loader): void
{
$loader->load(__DIR__ . '/config/config.yml');
}

View file

@ -15,6 +15,7 @@ namespace Sylius\Component\User\Security\Checker;
use Sylius\Component\User\Model\UserInterface;
use Symfony\Component\Security\Core\Exception\DisabledException;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface;
@ -34,7 +35,7 @@ final class EnabledUserChecker implements UserCheckerInterface
}
}
public function checkPostAuth(SymfonyUserInterface $user): void
public function checkPostAuth(SymfonyUserInterface $user, ?TokenInterface $token = null): void
{
}
}