Symfony2Extension
Symfony2Extension copied to clipboard
Environment variable not found: "DATABASE_URL".
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
In EnvVarProcessor.php line 171:
Environment variable not found: "DATABASE_URL".
Have you solved this issue @ahmedtoolapp ?
This error means that the bootstrap file isn't loaded. Indeed, the boostrap.php is responsible to load the Symfony's DotEnv component.
Therefore, have a look at your behat.yml file and make sure that the bootstrap file path is correctly configured.
Eg:
extensions:
Behat\Symfony2Extension:
kernel:
bootstrap: features/bootstrap/bootstrap.php
class: App\Kernel
@ And how to connect Database ? How it looks like in FeatureContext ? function () { new Kernel ....