-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Labels
Description
- Laravel Version: 9.0.1
- PHP Version: 8.0.15
- Database Driver & Version: php-mysqlnd-8.0.15-1.fc35 connected to mysql:8 (docker) / sqlite3
Description:
command php artisan serve --env=testing seems not to be working since it is still using default .env file instead.
Steps To Reproduce:
With mysql running using default .env file (configured against mysql)

With mysql stopped using custom .env.testing file (configured against sqlite)

With mysql stopped moving .env.testing to .env file

Another easy test is not having a .env file at all and specify custom one:
This time results into a err 500
local.ERROR: No application encryption key has been specified. {"exception":"[object] (Illuminate\\Encryption\\MissingAppKeyException(code: 0): No application encryption key has been specified. at /tmp/laravel-serve-bug/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:79)
Thanks
