hechoendrupal / drupal-console-launcher

DrupalConsole global executable aka Launcher.
GNU General Public License v2.0
22 stars 27 forks source link

Question about installation instructions #120

Open Narretz opened 7 years ago

Narretz commented 7 years ago

The readme only gives these installation instructions:

curl https://drupalconsole.com/installer -L -o drupal.phar
mv drupal.phar /usr/local/bin/drupal
chmod +x /usr/local/bin/drupal

Why doesn't it mention the following?

composer global require drupal/console-launcher

This is much more "composer-style" and it also works much easier for Windows installation.

gapple commented 7 years ago

I started looking into this, resulting in the above-linked pull request, but it doesn't solve the problems when installed globally via composer due to some assumptions within drupal/console-core about paths that launcher relies on to get its services.yml definition loaded.

jmolivas commented 7 years ago

Is this the PR https://github.com/hechoendrupal/drupal-console-launcher/pull/127 to fix the issue @gapple ?

jmolivas commented 7 years ago

@gapple tested your patch and found the issue you mentioned about loading services.

~/.composer/vendor/bin/drupal --root=/Users/jmolivas/develop/drupal/sites/drupal.dev list

Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "console.launcher". in /Users/jmolivas/.composer/vendor/symfony/dependency-injection/ContainerBuilder.php:994 Stack trace:

0 /Users/jmolivas/.composer/vendor/symfony/dependency-injection/ContainerBuilder.php(577): Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('console.launche...')

1 /Users/jmolivas/.composer/vendor/drupal/console-launcher/bin/drupal.php(113): Symfony\Component\DependencyInjection\ContainerBuilder->get('console.launche...')

2 /Users/jmolivas/.composer/vendor/drupal/console-launcher/bin/drupal(4): require('/Users/jmolivas...')

3 {main}

thrown in /Users/jmolivas/.composer/vendor/symfony/dependency-injection/ContainerBuilder.php on line 994