Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Validate connection name before resolve queue connection #39751

Merged
merged 2 commits into from Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Illuminate/Queue/QueueManager.php
Expand Up @@ -148,11 +148,17 @@ public function connection($name = null)
*
* @param string $name
* @return \Illuminate\Contracts\Queue\Queue
*
* @throws \InvalidArgumentException
*/
protected function resolve($name)
{
$config = $this->getConfig($name);

if (is_null($config)) {
throw new InvalidArgumentException("The [{$name}] queue connection has not been configured.");
}

return $this->getConnector($config['driver'])
->connect($config)
->setConnectionName($name);
Expand Down