Closed (fixed)
Project:
Mailgun
Version:
8.x-1.0-rc1
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2019 at 13:12 UTC
Updated:
15 Nov 2019 at 10:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nickjvm06 commentedExperiencing the same issue after upgrading to Drupal 8.7.7. Downgrading mailgun/mailgun-php (3.0.0 => 2.8.1) appears to fix things for now.
Comment #3
patrickmichael commented#2 does not seem to solve the issue in my case
Comment #4
patrickmichael commentedI ran the following:
composer require kriswallsmith/buzz nyholm/psr7This removed the PSR-17 message, however I now have:
TypeError: Argument 1 passed to Mailgun\Api\HttpApi::__construct() must implement interface Psr\Http\Client\ClientInterface, instance of Http\Client\Common\PluginClient given, called in /var/www/site.com/vendor/mailgun/mailgun-php/src/Mailgun.php on line 89 in Mailgun\Api\HttpApi->__construct() (line 46 of /var/www/site.com/vendor/mailgun/mailgun-php/src/Api/HttpApi.php).Comment #5
marcoscanoStarted to see these errors too, when running cron, after upgrading core to 8.7.7 and mailgun/mailgun-php to 3.0.0. Downgrading the latter to 2.8.1 solved the issue for us.
Comment #6
patrickmichael commented@marcoscano perhaps I am not downgrading correctly. Could you assist with what the correct procedure is for downgrading mailgun/mailgun-php to 2.8.1 is? I have just tested on a clean install of Drupal 8.7.7 and Mailgun 1.0-rc1 and the error persists.
The below seemed to work:
I added the following "require": to composer.json, deleted /vendor/mailgun which sorted the issue, thanks all
"mailgun/mailgun-php": "2.8.1"Comment #7
marcoscanoIn my case I just ran
composer require mailgun/mailgun-php:2.8.1.After doing this, you can check that the version of this library in composer.lock should be 2.8.1 instead of the latest one.
This will have the side-effect though of adding to your composer.json file a line under the "require" group, specifically for the library mailgun/mailgun-php. Unless you really want to pin this library to this version forever, you can just remove this added line in composer.json, without modifying composer.lock.
Comment #8
patrickmichael commented@marcoscano thanks, I will remember that as well, most appreciated.
Comment #9
jcmartinezPlease note: By the time composer applies the modifications contained in this patch to the module's composer.json file, composer has already read the content of the initial .json file. Therefore; this patch might be useful only to the developer of this module to allow only the versions of mailgun-php beteen 2.3.0 and <3.0.
Since I'm not the developer of the module, I still had to run manually:
composer require mailgun/mailgun-php:"^2.8.1"After doing the above, I'm getting the following error in my logs:
I'm also seeing the following error on /admin/config
Fatal error: require(): Failed opening required '/app/vendor/composer/../mailgun/mailgun-php/src/Mailgun.php' (include_path='/app/vendor/pear/archive_tar:/app/vendor/pear/console_getopt:/app/vendor/pear/pear-core-minimal/src:/app/vendor/pear/pear_exception:.:/usr/local/lib/php') in /app/vendor/symfony/class-loader/ApcClassLoader.php on line 112Drupal is looking for /app/vendor/mailgun/mailgun-php/src/Mailgun.php but it is located one level deeper inside /app/vendor/mailgun/mailgun-php/src/Mailgun/Mailgun.php
Comment #10
sokru commentedBumped this to critical since this problem causes fatal error both when installing Drupal site with Mailgun dependency or on existing sites using this module. I'd suggest committing patch from #9 and creating follow-up issue "Support mailgun-php:3".
Comment #11
jcmartinezI agree that this is critical. People that has mailgun installed may not have realized that it isn't working.
I even tried downgrading the module to 1.0-beta1 and it didn't work either.
Comment #12
joco_sp commented#9 worked for me. I applied the patch and run
composer require mailgun/mailgun-php:"^2.8.1"Comment #13
kuldeep k commentedGetting the same issue, applied the above patch and downgrading "mailgun/mailgun-php": "^2.8.1" did not work for me.
Drupal core 8.7.8
Comment #14
abrammAs a temporary measure, add the following to a project (top-level) composer.json:
And run:
composer update nothingThis should force installing 2.x.
Comment #15
qsoul commentedCan confirm that the solution from #14 works. In my case I also had to uninstall the drupal/mailgun module and reinstall it again after adding the above mentioned "conflict" rule to get 2.x version of mailgun/mailgun-php be installed.
Comment #17
matroskeenThanks everyone for the productive discussion and friendly assistance!
I'm not sure what the hell is going on in Mailgun 3.0+ version, but we'll definitely need to take a look into it.
I would suggest to test PHP SDK apart from the Drupal module and share your solutions on their official github page: https://github.com/mailgun/mailgun-php/issues
In the meantime, I've added a top restriction for the SDK version: https://git.drupalcode.org/project/mailgun/commit/a9df0a0
You are welcome to upgrade Mailgun module to dev version by the following command:
composer require drupal/mailgun:1.x-devPlease let me know if you have any questions.
Thanks!
Comment #18
abrammIs it worth making a new release? The current stable/recommended release is broken right now.
Comment #19
matroskeenI think it worth and I like the idea. Thanks!
8.x-1.0-rc2 released 1 November 2019