Skip to content

Commit d4d72ea

Browse files
committed
throw TypeErrors to prepare for type hints in 5.0
1 parent 28fb0f4 commit d4d72ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authorization/Voter/ExpressionVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(ExpressionLanguage $expressionLanguage, Authenticati
4444
} elseif (null === $authChecker) {
4545
@trigger_error(sprintf('Argument 3 passed to "%s()" should be an instance of AuthorizationCheckerInterface, not passing it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
4646
} elseif (!$authChecker instanceof AuthorizationCheckerInterface) {
47-
throw new \InvalidArgumentException(sprintf('Argument 3 passed to %s() must be an instance of %s or null, %s given.', __METHOD__, AuthorizationCheckerInterface::class, \is_object($authChecker) ? \get_class($authChecker) : \gettype($authChecker)));
47+
throw new \TypeError(sprintf('Argument 3 passed to %s() must be an instance of %s or null, %s given.', __METHOD__, AuthorizationCheckerInterface::class, \is_object($authChecker) ? \get_class($authChecker) : \gettype($authChecker)));
4848
}
4949

5050
$this->expressionLanguage = $expressionLanguage;

0 commit comments

Comments
 (0)