How to use Goutte with Laravel 8 + Guzzle?
So I want to use Goutte to scrape some content from a website, but a lot of the public information on this is outdated. For whatever, reason, the person who maintains it decided to just completely pull Guzzle support and use the Symfony HTTP client instead. No idea why this was decided really, since it seems a lot of people are upset in issues about Guzzle support being randomly deprecated...
Anyway, the main issue with this is that you can no longer use any of the nice Laravel HTTP mocking functionality, which is a pretty big bummer for me, and in previous Goutte versions you could call a function setClient() to pass in a fake/mocked client. However, with the Symfony HTTP client, this function was completely removed.
I tried to pull in v3 (the version before Guzzle was removed), but due to how old the guzzle version itself is on that version, it's not compatible with Laravel 8 and the Guzzle constraint that ships with it.
I was wondering if anyone had figured out a way to get this to work? Pulling my hair out since last year I was able to get this working no problem with Guzzle + setClient since Laravel didn't have the Guzzle constraint at the time, but now that it's been changed it seems no longer possible?
Please or to participate in this conversation.