Page MenuHomePhabricator

MailGun extension needs php-http/guzzle6-adapter in require not require-dev
Closed, ResolvedPublic

Description

The guzzle 6 adapter is listed as a require-dev package in composer.json: https://gerrit.wikimedia.org/g/mediawiki/extensions/Mailgun/+/9ba8e0d5a86936473c804fe93997bea8048ae506/composer.json#11

But it is used in "production" code.
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Mailgun/+/master/MailgunHooks.php#46

This results in the following error when creating accounts with the extension enabled.

[803b5fd8f6b4fed2c4ed6c32] /w/index.php?title=Special:CreateAccount&returnto=Special:SpecialPages Error from line 46 of /var/www/html/extensions/Mailgun/MailgunHooks.php: Class 'Http\Adapter\Guzzle6\Client' not found

The fix is to move php-http/guzzle6-adapter from require-dev to require in the composer.json file.

Event Timeline

@Daimona: What would be the fix? Move from require-dev to require? Asking as it's not clear for me if I was a new contributor... Also see the tag description at https://phabricator.wikimedia.org/tag/good_first_bug/
Plus I think links to Github will make people think that they need to do something on Github instead of Gerrit?

@Daimona: What would be the fix? Move from require-dev to require?

Yes.

Plus I think links to Github will make people think that they need to do something on Github instead of Gerrit?

Let me change the task description a little bit.

Thank you a lot! :) Let's leave this task open for a Google Code-in student? Happy to mentor.

Change 554917 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/extensions/Mailgun@master] Move php-http/guzzle6-adapter in require

https://gerrit.wikimedia.org/r/554917

Change 554917 merged by jenkins-bot:
[mediawiki/extensions/Mailgun@master] Move php-http/guzzle6-adapter in require

https://gerrit.wikimedia.org/r/554917