Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 2469217

Browse files
Merge branch '3.4' into 4.3
* 3.4: [Validator] fix access to uninitialized property when getting value [HttpKernel] Fix stale-if-error behavior, add tests Improved error message when no supported user provider is found
2 parents d3ddd41 + d82fa1e commit 2469217

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Core/User/ChainUserProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function refreshUser(UserInterface $user)
9191
$e->setUsername($user->getUsername());
9292
throw $e;
9393
} else {
94-
throw new UnsupportedUserException(sprintf('The account "%s" is not supported.', \get_class($user)));
94+
throw new UnsupportedUserException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', \get_class($user)));
9595
}
9696
}
9797

Http/Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function refreshUser(TokenInterface $token)
255255
return null;
256256
}
257257

258-
throw new \RuntimeException(sprintf('There is no user provider for user "%s".', $userClass));
258+
throw new \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));
259259
}
260260

261261
private function safelyUnserialize($serializedToken)

Http/RememberMe/AbstractRememberMeServices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ final protected function getUserProvider($class)
233233
}
234234
}
235235

236-
throw new UnsupportedUserException(sprintf('There is no user provider that supports class "%s".', $class));
236+
throw new UnsupportedUserException(sprintf('There is no user provider for user "%s". Shouldn\'t the "supportsClass()" method of your user provider return true for this classname?', $class));
237237
}
238238

239239
/**

0 commit comments

Comments
 (0)