Skip to content

Commit 7b28a6f

Browse files
wouterjnicolas-grekas
authored andcommitted
Improved error message when no supported user provider is found
1 parent a10ae32 commit 7b28a6f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Firewall/ContextListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ protected function refreshUser(TokenInterface $token)
238238
return null;
239239
}
240240

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

244244
private function safelyUnserialize($serializedToken)

RememberMe/AbstractRememberMeServices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ final protected function getUserProvider($class)
239239
}
240240
}
241241

242-
throw new UnsupportedUserException(sprintf('There is no user provider that supports class "%s".', $class));
242+
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));
243243
}
244244

245245
/**

0 commit comments

Comments
 (0)