drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

Adds aegir support.

Open ttadegraaff opened this issue 6 years ago • 2 comments

Hi, this code works for me, and I expect it might work for others too. That said, I'm a beginner in object oriented programming and Drupal 8, so there probably is a nicer way to get this issue fixed. The database settings are created in Drupal\Core\Site\Settings, and this is a final class. As I understand it this makes it impossible to extend. I ended up copying code from Drupal core to drupal console, which is not nice.

The database settings are read from drushrc.php which is located in the site directory (same location as settings.php).

This is how the database settings exist in my drusrc.php:

$options['db_type'] = 'mysql'; $options['db_host'] = 'localhost'; $options['db_port'] = '3306'; $options['db_passwd'] = 'averystrongpass'; $options['db_name'] = 'thedbname'; $options['db_user'] = 'thedbusername';

I expect aegir always makes the settings available in this way in drushrc.php, but I'm not sure. I haven't looked into the aegir project to check how drushrc.php is created. So there is a possibility that in other environments the settings are stored differently. Nor do I know if there are situations where aegir sites have more then 1 database connection, and how this works if so.

ttadegraaff avatar Sep 02 '17 20:09 ttadegraaff

Any update on this? @jmolivas

rrooij avatar Apr 09 '18 14:04 rrooij

Shall this be merged?

bserem avatar Oct 24 '19 18:10 bserem