Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal 8 beta 13 drush installation triggers guzzle error #1519

Closed
VladimirAus opened this issue Jul 30, 2015 · 9 comments
Closed

Drupal 8 beta 13 drush installation triggers guzzle error #1519

VladimirAus opened this issue Jul 30, 2015 · 9 comments

Comments

@VladimirAus
Copy link

Tried to install with custom profile first. Then with standard.
Updated to the latest drush master

$ drush si standard --db-url=mysql://login:password@127.0.0.1/d8_b13_db --account-name=admin --account-pass=password --yes
You are about to DROP all tables in your 'd8_b13_db' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the [ok]
--notify global option.
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to undefined function GuzzleHttp\choose_handler() in
/public/core/vendor/guzzlehttp/guzzle/src/HandlerStack.php,
line 40

Issue queue on Drupal.org: https://www.drupal.org/node/2542564
OS: Latest MacOS with PHP 5.5.18 on MAMP server

@weitzman
Copy link
Member

weitzman commented Aug 5, 2015

Can't reproduce this. Seems like wrong version of Guzzle is being used. You might need a debugger to figure out why.

@weitzman weitzman closed this as completed Aug 5, 2015
@fgm
Copy link
Contributor

fgm commented Aug 18, 2015

Same error here with today's HEAD on both Drupal and Drush. PHP 5.6.12-1+deb.sury.org~precise+1 (cli). Checking the code, the function /does/ exist, so it's visibly a matter of entering this call before the file defining it was included.

@weitzman
Copy link
Member

Are you using a global drush? Maybe you have a different version of guzzle in that composer.json? If possible try with a drush thats local to your drupal project - https://github.com/drupal-composer/drupal-project

@weitzman weitzman reopened this Aug 18, 2015
@fgm
Copy link
Contributor

fgm commented Aug 18, 2015

Found it : the problem was drush_iq using Guzzle 5.3 : https://www.drupal.org/node/2542564#comment-10233209 The Drush was local, but it was fetching my plugins from ~/.drush.

@weitzman
Copy link
Member

Ping to @greg-1-anderson for drush_iq update and for #1343. Also, we need to advocate for site local Drush (which implies the morass that is Drupal+Composer).

@greg-1-anderson
Copy link
Member

Yeah, that "dependency hell" PR I submitted would have caught this.

Perhaps we should force --local whenever Drush is local? #1343 will help, but folks could still get in trouble calling a site-local Drush directly if they have composer-using extensions in ~/.drush.

@arknoll
Copy link

arknoll commented Aug 19, 2015

I too have been getting this error starting at Drupal Beta13. The error can be traced back to this commit for Drupal: drupal/drupal@8b83aa0

The underlying issue, however, can be traced back to how Drush incorporates composer dependencies.

Background:
I am using Drush brought in via a composer file from a stand-alone project. This project has many other composer dependencies.

  1. When Drush runs from this vendored directory it pulls in all of the composer dependencies via the autoloader associated with this stand-alone project (https://github.com/drush-ops/drush/blob/7.x/includes/preflight.inc#L28).
  2. Then when a drush command is run (like site-install) Drupal's autoloader is layered on top (https://github.com/drush-ops/drush/blob/7.x/commands/core/drupal/site_install.inc#L8). If any of the dependencies between the two composer files are not compatible, then an error such as the one above occurs.

This appears to limit the way that Drush can be packaged with other dependencies.

@greg-1-anderson
Copy link
Member

I've been putting this off a bit, pending resolution of #1595 & related.

@greg-1-anderson
Copy link
Member

Drush 8 is maintenance only; closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants