Score:0

Drush fails with PHP 8 due to padraic/humbug_get_contents requirements

cn flag

I'm sure there is a simple fix, but I can't figure it out. This is my error every time I try to run drush updatedb

$ drush updatedb

Box Requirements Checker
========================

> Using PHP 8.0.9
> PHP is using the following php.ini file:
  /etc/php/php.ini

> Checking Box requirements:
  ..E.........

                                                                                
 [ERROR] Your system is not ready to run the application.                       
                                                                                

Fix the following mandatory requirements:
=========================================

 * The package "padraic/humbug_get_contents" requires the version "^5.3 || ^7.0
   || ^7.1 || ^7.2" or greater.

So far, the only way I have been able to bypass this is by forcing drupal/drush to use php7.4, but that doesn't seem like it's a good long-term solution.

If I could figure out where the requirement for padraic/humbug_get_contents comes from, I would try to modify it to add || ^8.0 or something like that, but I can't determine which package requires that package using composer show --tree or composer depends padraic\humbug_get_contents

I can't seem to find other people having the same issue despite searching. It may also be worth noting that the issue occurs across multiple sites on the same machine, so it is not likely to be some kind of mis-configuration of that site or installation. Other commands work fine on the install, as does running update.php through the web browser, it seems like it's just drush that doesn't work.

Does anyone have any suggestions that I may be able to use to solve this issue without rolling back to a previous version of php?

Score:2
fr flag

This was simple to find an answer for, by searching on "padraic/humbug_get_contents drush".

See https://github.com/drush-ops/drush-launcher/issues/84, where your exact problem is described.

This appears to be fixed in the current version of drush launcher.

cn flag
Wow, thanks. I had even found that link but thought it didn't apply to my situation. I didn't realize I had an outdated version of drush launcher because I thought I had drush installed locally as a dependency of each project.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.