- Assigned to Charchil Khandelwal
- Status changed to Needs review
almost 2 years ago 11:14am 19 January 2023 - Issue was unassigned.
- First commit to issue fork.
- First commit to issue fork.
- last update
over 1 year ago 5 pass - last update
over 1 year ago Composer require failure - 🇺🇦Ukraine Matroskeen 🇺🇦 Ukraine, Lutsk
MRs are weird, so we'll go with the old-fashioned patch way.
-
Matroskeen →
committed 6732b068 on 2.0.x
Issue #3334802: Drupal 10 compatibility fixes.
-
Matroskeen →
committed 6732b068 on 2.0.x
- 🇺🇦Ukraine Matroskeen 🇺🇦 Ukraine, Lutsk
D10 version is ready to be tested in 2.0.x-dev release. Waiting for confirmation from other people to mark this as "Fixed".
Perhaps this is due to how I installed it, but the 2.0x-dev release fails completely for me. Installing over the top of 1.x appears OK, and removes the guzzle6 adapter:
$ composer require 'drupal/mailgun:2.0.x-dev@dev' ./composer.json has been updated Running composer update drupal/mailgun Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 1 update, 1 removal - Removing php-http/guzzle6-adapter (v2.0.2) - Upgrading drupal/mailgun (dev-1.x 087590a => dev-2.0.x 6732b06) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 1 update, 1 removal - Syncing drupal/mailgun (dev-2.0.x 6732b06) into cache - Removing php-http/guzzle6-adapter (v2.0.2) - Upgrading drupal/mailgun (dev-1.x 087590a => dev-2.0.x 6732b06): Checking out 6732b06857 from cache <snip>
But then trying to configure via
/admin/config/services/mailgun/settings
it appears guzzle is still required:The website encountered an unexpected error. Please try again later. Http\Discovery\Exception\NotFoundException: No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter". in Http\Discovery\Psr18ClientDiscovery::find() (line 27 of /app/vendor/php-http/discovery/src/Psr18ClientDiscovery.php). Http\Discovery\ClassDiscovery::findOneByType('Psr\Http\Client\ClientInterface') (Line: 25) Http\Discovery\Psr18ClientDiscovery::find() (Line: 130) Mailgun\HttpClient\HttpClientConfigurator->getHttpClient() (Line: 82) Mailgun\HttpClient\HttpClientConfigurator->createConfiguredClient() (Line: 83) Mailgun\Mailgun->__construct(Object) (Line: 99) Mailgun\Mailgun::create('myapikey', 'https://api.mailgun.net') (Line: 40) Drupal\mailgun\MailgunFactory->create() call_user_func_array(Array, Array) (Line: 255) Drupal\Component\DependencyInjection\Container->createService(Array, 'mailgun.mailgun_client') (Line: 177) Drupal\Component\DependencyInjection\Container->get('mailgun.mailgun_client', 1) (Line: 434) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 237) Drupal\Component\DependencyInjection\Container->createService(Array, 'mailgun.mail_handler') (Line: 177) Drupal\Component\DependencyInjection\Container->get('mailgun.mail_handler') (Line: 39) Drupal\mailgun\Form\MailgunAdminSettingsForm::create(Object) (Line: 28) Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('\Drupal\mailgun\Form\MailgunAdminSettingsForm') (Line: 48) Drupal\Core\Controller\HtmlFormController->getFormObject(Object, '\Drupal\mailgun\Form\MailgunAdminSettingsForm') (Line: 58) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Looking at
composer.json
I see the comment that guzzle6-adapater is "Required for working with Guzzle 6 e.g. Drupal 9.3.x or earlier", so presumably this should work fine on my 9.5.9 install?- 🇺🇦Ukraine Matroskeen 🇺🇦 Ukraine, Lutsk
@gaddman you should have either Guzzle 7 or Guzzle 6 + guzzle6-adapter.
If your project requires
drupal/core-recommended
, you won't be able to upgrade to Guzzle 7 before you upgrade to Drupal 10. In that case, you should manually requireguzzle6-adapter
.Otherwise, you should be able to upgrade to Guzzle 7 while you still have 9.5.9.
We'll make it clear in the release notes.
Thanks @Matroskeen! I'm requiring
drupal/core-recommended
so reinstalled with guzzle6 manually required, iecomposer require 'drupal/mailgun:2.0.x-dev@dev' php-http/guzzle6-adapter
.
Tested the basic capability I use and all working fine: sending email with inline images and attachments + custom headers (from the reroute_email module).- Status changed to RTBC
over 1 year ago 2:16pm 11 July 2023 - 🇺🇦Ukraine podarok Ukraine
let's have a release, RTBC because of above comment
- Status changed to Fixed
over 1 year ago 5:07pm 12 July 2023 - 🇺🇦Ukraine Matroskeen 🇺🇦 Ukraine, Lutsk
Mailgun 2.0.0 is out: https://www.drupal.org/project/mailgun/releases/2.0.0 →
Thanks! Automatically closed - issue fixed for 2 weeks with no activity.