Symfony2Extension icon indicating copy to clipboard operation
Symfony2Extension copied to clipboard

Environment variable not found: "DATABASE_URL".

Open ahmedtoolapp opened this issue 5 years ago • 4 comments

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".

ahmedtoolapp avatar Jul 10 '20 09:07 ahmedtoolapp

Have you solved this issue @ahmedtoolapp ?

kadzany avatar Sep 08 '20 01:09 kadzany

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

mtarld avatar Oct 11 '20 14:10 mtarld

@ And how to connect Database ? How it looks like in FeatureContext ? function () { new Kernel ....

denys999 avatar Dec 08 '20 20:12 denys999