Does composer.json need to include require guzzlehttp/guzzle"?
Closed this issue · 3 comments
robertogallea commented
- Testbench Version: 5.0.1
- Laravel Version: 7
- PHP Version: 7.x
Description:
Does composer.json need to include require guzzlehttp/guzzle"?
While testing Laravel Http
Facade, I got
Error : Class 'GuzzleHttp\Client' not found
unless I include guzzle.
Steps To Reproduce:
write any test using Http
facade
/** @test */
public function it_requires_guzzle()
{
Http::get('https://www.google.it');
}
Possible solution
add "guzzlehttp/guzzle": "^6.3",
to composer.json
crynobone commented
If your package depends on guzzlehttp/guzzle
dependency, it would be safer if you explicitly require it. Any requirement from laravel/laravel
are managed by developers and they may remove guzzlehttp/guzzle
at any point of time.
crynobone commented
Added note to the readme: https://github.com/orchestral/testbench#class-guzzlehttpclient-not-found
robertogallea commented
This is probably the best tradeoff, thanks.