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
Artisan is unable to config:clear if the database previously configured is unreachable, and a replacement database is added to the .env file (the very reason for invoking config:clear); instead, the command simply hangs indefinitely.
Even a basic php artisan --version gets hung up in the event of an unreachable database.
I'm not very familiar with the internal architecture of Artisan, and without digging I might presume, given the behavior observed here, that it is an all-or-nothing application boot sequence. And this seems unfortunate, for at least the scenario I've just described. I'd think there are a good number of artisan commands that do not really need the application (and database connection) to be fully booted.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Artisan is unable to
config:clear
if the database previously configured is unreachable, and a replacement database is added to the.env
file (the very reason for invokingconfig:clear
); instead, the command simply hangs indefinitely.Even a basic
php artisan --version
gets hung up in the event of an unreachable database.I'm not very familiar with the internal architecture of Artisan, and without digging I might presume, given the behavior observed here, that it is an all-or-nothing application boot sequence. And this seems unfortunate, for at least the scenario I've just described. I'd think there are a good number of artisan commands that do not really need the application (and database connection) to be fully booted.
Beta Was this translation helpful? Give feedback.
All reactions