Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/Illuminate/Foundation/Console/AboutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,21 @@ protected function gatherApplicationInformation()
},
'Mail' => config('mail.default'),
'Octane' => config('octane.server'),
'Queue' => config('queue.default'),
'Queue' => function ($json) {
$queueConnection = config('queue.default');

if (config('queue.connections.'.$queueConnection.'.driver') === 'failover') {
$secondary = new Collection(config('queue.connections.'.$queueConnection.'.connections'));

return value(static::format(
value: $queueConnection,
console: fn ($value) => '<fg=yellow;options=bold>'.$value.'</> <fg=gray;options=bold>/</> '.$secondary->implode(', '),
json: fn () => $secondary->all(),
), $json);
}

return $queueConnection;
},
Comment on lines +226 to +240
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, we could extract this logic into a separate method, so that we can reuse it here as well as for the 'Cache' and the 'Logs' case above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we let this go for now and we can consider the whole refactor later, because I intend to make a similar PR for mail as well, the internal key structure is not very symetrical and we will need to pass each wrapper key in that.

This will be for logging, cache, queue (current PR) and mail (future PR).

'Scout' => config('scout.driver'),
'Session' => config('session.driver'),
]));
Expand Down