Skip to content

Can't install this bundle in Symfony 4.2 or 4.3 #34

@walva

Description

@walva

Hi there!

I am very interested in using this bundle for our project but we couldn't achieve to install it and make it work.

So I tried to reproduce our error in a brand new project.
Here are the step I followed:

  • symfony new httpclient
  • composer require symfony/maker-bundle
  • composer require template
  • composer require annotations
  • php bin\console make:controller
  • composer require happyr/google-analytics-bundle
  • composer require php-http/curl-client guzzlehttp/psr7 php-http/message

-> didn't work because of the error message:

Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors

  • composer require php-http/httplug-bundle php-http/curl-client guzzlehttp/psr7
  • composer require php-http/guzzle6-adapter

at this point, the kernel is compiling correctly and we created the branch master of our test project

Here is the error I have:

Argument 2 passed to Happyr\GoogleAnalyticsBundle\Http\HttpClient::__construct() must be an instance of Psr\Http\Message\RequestFactoryInterface, instance of Nyholm\Psr7\Factory\HttplugFactory given, called in C:\www\sportfinder\httpclient\var\cache\dev\ContainerIewfoAf\getTrackerService.php on line 14

Because the bundle still wasn't working, I tried to use Symfony HttpClient in the other branch use-symfony-client

  • git checkout use-symfony-client
  • composer require symfony/http-client
  • composer require psr/http-client
  • composer require nyholm/psr7

Here is the error:

Argument 2 passed to Happyr\GoogleAnalyticsBundle\Http\HttpClient::__construct() must be an instance of Psr\Http\Message\RequestFactoryInterface, instance of Nyholm\Psr7\Factory\HttplugFactory given, called in C:\www\sportfinder\httpclient\var\cache\dev\ContainerD52DYTq\getTrackerService.php on line 14

At this point, I honestly don't know what to do :s
I'm here to help with my limited knowledge of php http client ecosystem.

Best regards,
Benjamin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions