platformsh / symfonyflex-bridge

Bridge library for running Symfony Flex on Platform.sh
MIT License
30 stars 15 forks source link

Local command-line not working when symfonyflex-bridge is enabled #3

Closed cirdan closed 6 years ago

cirdan commented 6 years ago

Context:

Symptom: Try to run php bin/console doctrine:database:drop The symfony console complains about An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) on my local environment, after having updated composer with symfonyflex-bridge

If I set the environment variable in the line executing the console, it's OK : DATABASE_URL=mysql://MYUSER:MYPASSWORD@127.0.0.1:3306/MYDATABASE php bin/console doctrine:database:drop

If I bypass the symfonyflex-bridge (modifying its code), it's OK.

As I understand, the function mapPlatformShEnvironment should check that we are on platform.sh before doing anything ? (maybe by looking at $_ENV['PLATFORM_RELATIONSHIPS'] ?)

Crell commented 6 years ago

Addressed in #5

cirdan commented 6 years ago

Sorry, I hadn't the time to give a feedback on this. Perfect for me, thank you !