You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: AccessToken/Cas/Cas2Handler.php
+2-2
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ public function __construct(
33
33
) {
34
34
if (null === $client) {
35
35
if (!class_exists(HttpClient::class)) {
36
-
thrownew \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
36
+
thrownew \LogicException(\sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
37
37
}
38
38
39
39
$this->client = HttpClient::create();
@@ -76,7 +76,7 @@ private function getValidationUrl(string $accessToken): string
Copy file name to clipboardexpand all lines: Authentication/AuthenticatorManager.php
+3-3
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ public function supports(Request $request): ?bool
96
96
$this->logger?->debug('Checking support on authenticator.', ['firewall_name' => $this->firewallName, 'authenticator' => $authenticator::class]);
97
97
98
98
if (!$authenticatorinstanceof AuthenticatorInterface) {
99
-
thrownew \InvalidArgumentException(sprintf('Authenticator "%s" must implement "%s".', get_debug_type($authenticator), AuthenticatorInterface::class));
99
+
thrownew \InvalidArgumentException(\sprintf('Authenticator "%s" must implement "%s".', get_debug_type($authenticator), AuthenticatorInterface::class));
100
100
}
101
101
102
102
if (false !== $supports = $authenticator->supports($request)) {
@@ -174,15 +174,15 @@ private function executeAuthenticator(AuthenticatorInterface $authenticator, Req
174
174
$resolvedBadges = [];
175
175
foreach ($passport->getBadges() as$badge) {
176
176
if (!$badge->isResolved()) {
177
-
thrownewBadCredentialsException(sprintf('Authentication failed: Security badge "%s" is not resolved, did you forget to register the correct listeners?', get_debug_type($badge)));
177
+
thrownewBadCredentialsException(\sprintf('Authentication failed: Security badge "%s" is not resolved, did you forget to register the correct listeners?', get_debug_type($badge)));
thrownewBadCredentialsException(sprintf('Authentication failed; Some badges marked as required by the firewall config are not available on the passport: "%s".', implode('", "', $missingRequiredBadges)));
185
+
thrownewBadCredentialsException(\sprintf('Authentication failed; Some badges marked as required by the firewall config are not available on the passport: "%s".', implode('", "', $missingRequiredBadges)));
Copy file name to clipboardexpand all lines: Authenticator/FormLoginAuthenticator.php
+5-5
Original file line number
Diff line number
Diff line change
@@ -122,27 +122,27 @@ private function getCredentials(Request $request): array
122
122
}
123
123
124
124
if (!\is_string($credentials['username']) && !$credentials['username'] instanceof \Stringable) {
125
-
thrownewBadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($credentials['username'])));
125
+
thrownewBadRequestHttpException(\sprintf('The key "%s" must be a string, "%s" given.', $this->options['username_parameter'], \gettype($credentials['username'])));
if (!\is_string($credentials['password']) && (!\is_object($credentials['password']) || !method_exists($credentials['password'], '__toString'))) {
137
-
thrownewBadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['password_parameter'], \gettype($credentials['password'])));
137
+
thrownewBadRequestHttpException(\sprintf('The key "%s" must be a string, "%s" given.', $this->options['password_parameter'], \gettype($credentials['password'])));
138
138
}
139
139
140
140
if ('' === (string) $credentials['password']) {
141
-
thrownewBadCredentialsException(sprintf('The key "%s" must be a non-empty string.', $this->options['password_parameter']));
141
+
thrownewBadCredentialsException(\sprintf('The key "%s" must be a non-empty string.', $this->options['password_parameter']));
142
142
}
143
143
144
144
if (!\is_string($credentials['csrf_token'] ?? '') && (!\is_object($credentials['csrf_token']) || !method_exists($credentials['csrf_token'], '__toString'))) {
145
-
thrownewBadRequestHttpException(sprintf('The key "%s" must be a string, "%s" given.', $this->options['csrf_parameter'], \gettype($credentials['csrf_token'])));
145
+
thrownewBadRequestHttpException(\sprintf('The key "%s" must be a string, "%s" given.', $this->options['csrf_parameter'], \gettype($credentials['csrf_token'])));
Copy file name to clipboardexpand all lines: Controller/UserValueResolver.php
+2-2
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ public function resolve(Request $request, ArgumentMetadata $argument): array
47
47
}
48
48
49
49
if (!$argument->isNullable()) {
50
-
thrownewAccessDeniedException(sprintf('There is no logged-in user to pass to $%s, make the argument nullable if you want to allow anonymous access to the action.', $argument->getName()));
50
+
thrownewAccessDeniedException(\sprintf('There is no logged-in user to pass to $%s, make the argument nullable if you want to allow anonymous access to the action.', $argument->getName()));
51
51
}
52
52
53
53
return [null];
@@ -57,6 +57,6 @@ public function resolve(Request $request, ArgumentMetadata $argument): array
57
57
return [$user];
58
58
}
59
59
60
-
thrownewAccessDeniedException(sprintf('The logged-in user is an instance of "%s" but a user of type "%s" is expected.', $user::class, $argument->getType()));
60
+
thrownewAccessDeniedException(\sprintf('The logged-in user is an instance of "%s" but a user of type "%s" is expected.', $user::class, $argument->getType()));
Copy file name to clipboardexpand all lines: EventListener/CheckCredentialsListener.php
+1-1
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ public function checkPassport(CheckPassportEvent $event): void
44
44
$user = $passport->getUser();
45
45
46
46
if (!$userinstanceof PasswordAuthenticatedUserInterface) {
47
-
thrownew \LogicException(sprintf('Class "%s" must implement "%s" for using password-based authentication.', get_debug_type($user), PasswordAuthenticatedUserInterface::class));
47
+
thrownew \LogicException(\sprintf('Class "%s" must implement "%s" for using password-based authentication.', get_debug_type($user), PasswordAuthenticatedUserInterface::class));
@@ -92,23 +92,23 @@ private function getIsGrantedSubject(string|Expression $subjectRef, Request $req
92
92
}
93
93
94
94
if (!\array_key_exists($subjectRef, $arguments)) {
95
-
thrownewRuntimeException(sprintf('Could not find the subject "%s" for the #[IsGranted] attribute. Try adding a "$%s" argument to your controller method.', $subjectRef, $subjectRef));
95
+
thrownewRuntimeException(\sprintf('Could not find the subject "%s" for the #[IsGranted] attribute. Try adding a "$%s" argument to your controller method.', $subjectRef, $subjectRef));
Copy file name to clipboardexpand all lines: Firewall/ContextListener.php
+2-2
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface
194
194
195
195
foreach ($this->userProvidersas$provider) {
196
196
if (!$providerinstanceof UserProviderInterface) {
197
-
thrownew \InvalidArgumentException(sprintf('User provider "%s" must implement "%s".', get_debug_type($provider), UserProviderInterface::class));
197
+
thrownew \InvalidArgumentException(\sprintf('User provider "%s" must implement "%s".', get_debug_type($provider), UserProviderInterface::class));
198
198
}
199
199
200
200
if (!$provider->supportsClass($userClass)) {
@@ -246,7 +246,7 @@ protected function refreshUser(TokenInterface $token): ?TokenInterface
246
246
returnnull;
247
247
}
248
248
249
-
thrownew \RuntimeException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $userClass));
249
+
thrownew \RuntimeException(\sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $userClass));
Copy file name to clipboardexpand all lines: Firewall/ExceptionListener.php
+2-2
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ private function startAuthentication(Request $request, AuthenticationException $
201
201
if (!$responseinstanceof Response) {
202
202
$given = get_debug_type($response);
203
203
204
-
thrownew \LogicException(sprintf('The "%s::start()" method must return a Response object ("%s" returned).', get_debug_type($this->authenticationEntryPoint), $given));
204
+
thrownew \LogicException(\sprintf('The "%s::start()" method must return a Response object ("%s" returned).', get_debug_type($this->authenticationEntryPoint), $given));
205
205
}
206
206
207
207
return$response;
@@ -217,7 +217,7 @@ protected function setTargetPath(Request $request): void
217
217
218
218
privatefunctionthrowUnauthorizedException(AuthenticationException$authException): never
219
219
{
220
-
$this->logger?->notice(sprintf('No Authentication entry point configured, returning a %s HTTP response. Configure "entry_point" on the firewall "%s" if you want to modify the response.', Response::HTTP_UNAUTHORIZED, $this->firewallName));
220
+
$this->logger?->notice(\sprintf('No Authentication entry point configured, returning a %s HTTP response. Configure "entry_point" on the firewall "%s" if you want to modify the response.', Response::HTTP_UNAUTHORIZED, $this->firewallName));
0 commit comments