-
-
Notifications
You must be signed in to change notification settings - Fork 497
Closed
Description
Given the changes made at #491, using config/bootstrap.php
as bootstrap of phpunit is not possible if .env.local.php
exists without variables that closely belongs to the "test" env ("KERNEL_CLASS", "SYMFONY_DEPRECATIONS_HELPER", etc); since the file from where these variables should be loaded (.env.test
) isn't required at all:
recipes/symfony/phpunit-bridge/3.3/.env.test
Lines 2 to 4 in c466e7a
KERNEL_CLASS='App\Kernel' | |
APP_SECRET='s$cretf0rt3st' | |
SYMFONY_DEPRECATIONS_HELPER=999999 |
Since these variables are not common for the local environment, the dumped array at .env.local.php
doesn't contains them, making the test suite unusable without changes:
recipes/symfony/framework-bundle/3.3/config/bootstrap.php
Lines 9 to 13 in c466e7a
if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) { | |
$_ENV += $env; | |
} elseif (!class_exists(Dotenv::class)) { | |
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.'); | |
} else { |
Metadata
Metadata
Assignees
Labels
No labels