-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variable not found: "DATABASE_URL". #159
Comments
Have you solved this issue @ahmedtoolapp ? |
This error means that the bootstrap file isn't loaded. Indeed, the Therefore, have a look at your Eg: extensions:
Behat\Symfony2Extension:
kernel:
bootstrap: features/bootstrap/bootstrap.php
class: App\Kernel |
@ And how to connect Database ? How it looks like in FeatureContext ? |
For what it's worth, I've stumbled upon this issue too and using the comment of @mtarld I got it fixed (I was working on a symfony 6.4 to symfony 7 upgrade) The error
The fix FriendsOfBehat\SymfonyExtension:
- path: src/App/Kernel.php
+ path: tests/bootstrap.php contents of bootstrap.php <?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
require dirname(__DIR__).'/config/bootstrap.php';
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
} |
I am using Symfony2Extension with a new installation of Symfony 5.1 with PHP 7.3
I tried to launch vendor/bin/behat
I have my feature displayed but with an error
The text was updated successfully, but these errors were encountered: