Repository navigation
Description
After some tries we managed to have everything working (locally and in production) smoothly with Symfony version 3.1.10 + swiftmailer + MailgunBundle + httplug-bundle + Guzzle 6 Adapter.
But if we try to make a composer update or composer install then we get this error:
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] You have requested a non-existent service "httplug.client".
Here is our require statement of the composer.json file:
"require":
{
"php": ">=5.5.9",
"symfony/symfony": "3.1.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"symfony/polyfill-apcu": "^1.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"friendsofsymfony/user-bundle": "~2.0@dev",
"hwi/oauth-bundle": "^0.5.1",
"illuminate/database": "^5.4",
"knplabs/knp-paginator-bundle": "^2.5",
"yceruto/breadcrumbs-bundle": "^1.0",
"cspoo/swiftmailer-mailgun-bundle": "0.4.0",
"php-http/guzzle6-adapter": "^1.1.1",
"php-http/httplug-bundle": "^1.6"
},
Here is a part of the conposer.lock generated after a brand new installation:
{
"name": "cspoo/swiftmailer-mailgun-bundle",
"version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/tehplague/swiftmailer-mailgun-bundle.git",
"reference": "1d592cc1e7ae011381f2dbbb6892a6c991517f7c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tehplague/swiftmailer-mailgun-bundle/zipball/1d592cc1e7ae011381f2dbbb6892a6c991517f7c",
"reference": "1d592cc1e7ae011381f2dbbb6892a6c991517f7c",
"shasum": ""
},
"require": {
"mailgun/mailgun-php": "^2.3",
"php": "^5.5 || ^7.0",
"swiftmailer/swiftmailer": "^5.0",
"symfony/dependency-injection": "^2.7 || ^3.0"
},
"require-dev": {
"guzzlehttp/psr7": "^1.4",
"matthiasnoback/symfony-dependency-injection-test": "^1.0",
"nyholm/symfony-bundle-test": "^1.0",
"php-http/guzzle6-adapter": "^1.0",
"phpunit/phpunit": "^4.8 || ^5.7",
"symfony/swiftmailer-bundle": "^2.5.1",
"symfony/symfony": "^2.7 || ^3.0"
},
"suggest": {
"azine/mailgunwebhooks-bundle": "Allows to handle Mailgun event webhooks",
"php-http/httplug-bundle": "To manage your http clients"
},
"type": "symfony-bundle",
"autoload": {
"psr-4": {
"cspoo\Swiftmailer\MailgunBundle\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
],
"authors": [
{
"name": "Christian Spoo",
"email": "mail@christian-spoo.info",
"homepage": "http://www.christian-spoo.info/",
"role": "Developer"
}
],
"description": "Swiftmailer Mailgun bundle",
"homepage": "https://github.com/tehplague/swiftmailer-mailgun-bundle",
"keywords": [
"e-mail",
"mailgun",
"swiftmailer"
],
"time": "2017-05-29 10:51:57"
},
And here is a part of the config.yml:
httplug:
plugins:
logger: ~
clients:
acme:
factory: 'httplug.factory.guzzle6'
plugins: ['httplug.plugin.logger']
config:
verify: false
timeout: 2
cspoo_swiftmailer_mailgun:
key: "key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
domain: "mydomain.net"
http_client: 'httplug.client' # Optional. Defaults to null and uses dicovery to find client.
# Swiftmailer Configuration
swiftmailer:
transport: "mailgun"
spool: { type: memory } # This will start sending emails on kernel.terminate event# Swiftmailer Configuration
#host: "%mailer_host%"
#username: "%mailer_user%"
#password: "%mailer_password%"
#spool: { type: memory }
#encryption: "%mailer_encryption%"
I understand that httplug is installed but somehow cspoo_swiftmailer_mailgun is not able to identify the service. Maybe is just a typo in the config file or maybe the exception raises because a problem with versions and dependencies.
We have been stuck with this problem and I will really appreciate any guidance on how to solve it.
Activity
ScorpioT1000 commentedon Nov 24, 2017
same problem
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException] The service "mailgun.library" has a dependency on a non-existent service "httplug.client".ScorpioT1000 commentedon Nov 24, 2017
Solved changing to "httplug.client.default"
acjbizar commentedon Mar 25, 2018
I had the same problem. Adding the HTTPlug Bundle did the trick for me.