Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Tried to install with custom profile first. Then with standard.
$ 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
Comments
Comment #1
VladimirAusComment #2
dawehnerMh, so this would happen in case
core/vendor/composer/autoload_files.php:14
would not be included. This sounds like a drush issue for me. Did you had a look for that already?Comment #3
larowlanCan you run
composer dump-autoload
and try again?Comment #4
larowlanOpcode cache might also be an issue?
Comment #5
larowlanCan't replicate this from the UI - anymore info available?
Tested from https://simplytest.me/project/drupal/8.0.0-beta13 - installer ran fine https://www.dropbox.com/s/n8skzl56sttijav/Screenshot%202015-07-30%2019.4...
Comment #6
dawehnerWell, if this is a problem just reproduceable with drush, its not a Drupal issue.
Comment #7
longwaveUnable to reproduce this. I reinstall with drush all the time, and it works for me in HEAD as well:
Maybe a PHP version issue, or something like that? I am using 5.5.9-1ubuntu4.11.
Comment #8
larowlanOn that basis going to close cannot reproduce - @VladimirAus if you have steps to reproduce that don't involve the custom profile, can you re-open and post them here - thanks!
Comment #9
VladimirAusUpdating drush to the latest master didn't solve the issue...
Thanks everyone. Taking it to drush issue queue. https://github.com/drush-ops/drush/issues/1519
@larowlan:
composer dump-autoload
didn't change anythingOS: Latest MacOS with PHP 5.5.18 on MAMP server.
Comment #10
fgmI think I have to reopen this: I reproduced it on today's HEAD for both Drush and Drupal.
This is on Ubuntu 12.04.3 LTS, with this PHP
PHP 5.6.12-1+deb.sury.org~precise+1 (cli).
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans
with blackfire v1.0.0, https://blackfire.io/, by SensioLabs
Checking the code, undefined function
choose_handler()
/does/ exist, so it's visibly a matter of entering this call before the file defining it was included.Comment #11
fgmI uninstalled opcache, xdebug and blackfire : same error.
Comment #12
fgmMore debugging: this is triggered during the last steps of the install:
install_finished() -> Core\ProxyClass\Cron::run() -> Core\Cron::run() -> Cron::invokeCronHandlers() -> ... -> update_cron() -> update_refresh().
At this point, update_refresh() asks the container for \Drupal::service('update.manager'), in order to invoke refreshUpdateData() on it. This triggers 24 levels of stack within the ContainerBuilder, ending with ContainerBuilder->createService($definition of HandlerStack::create, $id = NULL), which in turns invokes HandlerStack::create(NULL), causing the attempt to choose a service, using the choose_service() function which was never included in the first place.
Comment #13
fgmGot it : this happens because of the drush_iq plugin for the d.o. issue queue : this plugin also includes Guzzle, but in an earlier version.
The current version of Guzzle adds a "smart" autoloader for these helper functions, in
guzzlehttp/guzzle/src/functions_include.php
. This code checks whether namespaces functionGuzzleHttp\uri_template
exists. If it exists, the code assumes thefunctions.php
file containing bothchoose_handler()
andGuzzleHttp\uri_template
has already been included, and skips it to avoid a redefinition error.However, because drush_iq, even in its latest version, includes an earlier version of the package (5.3.0 vs ^6.0), it already contains
GuzzleHttp\uri_template
(from theUtils.php
file, but notchoose_handler()
, causing the error above.~/.drush/
Since actually solving the issue in core or Drush seems unrealistic, and workarounds exist, marking Closed, WAD.
Comment #14
greg.1.anderson CreditAttribution: greg.1.anderson commentedSee also https://github.com/drush-ops/drush/issues/1519