Closed bogdankharchenko closed 2 years ago
The tests are failing for this one, could you take a look at that?
The tests are failing for this one, could you take a look at that?
Looking at it today -- didn't have time yesterday!
@freekmurze so I took another stab at it
and the real issue is that -- the db connection is just not properly setup during composer install.
Steps to reproduce:
Install Fresh Laravel + Laravel-Ray without having a "forge" database as specified. And this will fail during composer autoload.
So I figured, perhaps we just check if we even have a connection in the first place, rather than looking at the config. Seems to be a solution, but I'll be interested to know a better approach from your angle.
Thanks!
This PR is marked as draft. et me know when it is ready to be reviewed.
@freekmurze I removed the draft -- go ahead and take a look
Hi @bogdankharchenko, how can I reproduce this issue? I'm not having any issues running composer dump-autoload
with an invalid database name in the .env file. And can you share your exception?
@Nielsvanpach hey just do, fresh install and set
DB_CONNECTION=invalid_connection
https://docs.vapor.build/1.0/projects/environments.html#environment-variables
Problem: Vapor injects DB* -- when deploying to Vapor, DB* is not set from .env pull thus this fails during composer autoload.