0

I started a project with Symfony 4.2.4. I try to integrate HWIOAuthBundle in my project but I have the following error.

Script cache:clear returned with error code 1 !! !! In HWIOAuthExtension.php line 220: !!
!! You must setup php-http/httplug-bundle to use the default http client service.
!!
!! !! Script @auto-scripts was called via post-update-cmd

My composer.json

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "hwi/oauth-bundle": "^0.6.3",
        "php-http/guzzle6-adapter": "1.0",
        "sensio/framework-extra-bundle": "^5.1",
        "symfony/asset": "4.2.*",
        "symfony/console": "4.2.*",
        "symfony/dotenv": "4.2.*",
        "symfony/expression-language": "4.2.*",
        "symfony/flex": "^1.1",
        "symfony/form": "4.2.*",
        "symfony/framework-bundle": "4.2.*",
        "symfony/monolog-bundle": "^3.1",
        "symfony/orm-pack": "*",
        "symfony/process": "4.2.*",
        "symfony/security-bundle": "4.2.*",
        "symfony/serializer-pack": "*",
        "symfony/swiftmailer-bundle": "^3.1",
        "symfony/translation": "4.2.*",
        "symfony/twig-bundle": "4.2.*",
        "symfony/validator": "4.2.*",
        "symfony/web-link": "4.2.*",
        "symfony/yaml": "4.2.*"
    },
    "require-dev": {
        "symfony/debug-pack": "*",
        "symfony/maker-bundle": "^1.0",
        "symfony/profiler-pack": "*",
        "symfony/test-pack": "*",
        "symfony/web-server-bundle": "4.2.*"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "paragonie/random_compat": "2.*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    }
}

Kernel.php

public function registerBundles(): iterable
    {
        $contents = require $this->getProjectDir().'/config/bundles.php';
        foreach ($contents as $class => $envs) {
            if ($envs[$this->environment] ?? $envs['all'] ?? false) {
                yield new $class();
            }
        }
    }

I tried all the solutions I found on the other post, but I still have the problem.

Thanks for your help.

Soltac
  • 1
  • 1
  • Have you tried `composer require php-http/httplug-bundle` ? – Arleigh Hix Apr 10 '19 at 17:49
  • Yes it's one the first thing i tried. I tried with 3 different versions but it don't resolve my problem. – Soltac Apr 11 '19 at 18:09
  • https://stackoverflow.com/questions/46986482/you-must-setup-php-http-httplug-bundle-to-use-the-default-http-client-service – Arleigh Hix Apr 12 '19 at 04:44
  • I already tried the solution but when I try to add HttpPlugBundle to my Kernel i can't find it when I want to import it or at least reach the definition. – Soltac Apr 12 '19 at 12:24

0 Answers0