Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You must setup php-http/httplug-bundle to use the default http client service

Tags:

php

symfony

I don't understand the following problem:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] You must setup php-http/httplug-bundle to use the default http client service.

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception [RuntimeException] An error occurred when executing the "'cache:clear --no-warmup'" > command:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurati
onException]
You must setup php-http/httplug-bundle to use the default http client service.

Below is my file composer.json

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
    "psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.8.*",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "dev-master",
    "doctrine/doctrine-fixtures-bundle": "dev-master",
    "twig/extensions": "~1.0",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~3.0",
    "sensio/framework-extra-bundle": "~3.0",
    "incenteev/composer-parameter-handler": "~2.0",
    "sonata-project/admin-bundle": "~2.3@dev",
    "sonata-project/doctrine-orm-admin-bundle": "2.3.4",
    "knplabs/knp-disqus-bundle": "dev-master",
    "hwi/oauth-bundle": "dev-master",
    "kartik-v/bootstrap-star-rating": "dev-master",
    "azine/socialbar-bundle": "dev-master",
    "gregwar/captcha-bundle": "dev-master",
    "knplabs/knp-paginator-bundle": "~2.4",
    "php-http/guzzle6-adapter": "1.1.1",
    "php-http/httplug-bundle": "1.7.1"
},
    "require-dev": {
    "sensio/generator-bundle": "~2.3",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/user-bundle":" ~2.0@dev"
},
"scripts": {
    "post-root-package-install": [
        "SymfonyStandard\\Composer::hookRootPackageInstall"
    ],
    "post-install-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
    ],
    "post-update-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
    ]
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-bin-dir": "bin",
    "symfony-var-dir": "var",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.5-dev"
    }
}

}

like image 397
screem Avatar asked Oct 28 '17 05:10

screem


2 Answers

The error comes from HWI Oauth Bundle: https://github.com/hwi/HWIOAuthBundle/blob/master/DependencyInjection/HWIOAuthExtension.php

And judging by that code, your HTTPlug Bundle is not activated in your kernel, while HWI Oauth Bundle needs it to be activated for HWI bundle to work.

Follow the instructions and add the bundle to your kernel:

new Http\HttplugBundle\HttplugBundle(),
like image 142
Edi Modrić Avatar answered Oct 16 '22 10:10

Edi Modrić


Many thancks, Just i've add following line

    class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
        ...
        new Http\HttplugBundle\HttplugBundle(),
    );
like image 42
screem Avatar answered Oct 16 '22 08:10

screem