Hi guys, I'm a new developer who just tried to imp...
# ask-questions
b
Hi guys, I'm a new developer who just tried to implement the GrowthBook for A/B test purposes. I'm using PHP SDK. This is my composer setup and code implementation. However, I got the error from the first run "*Fatal error: Uncaught Exception: Must set an HTTP Client before loading features*". Saw from the docs "To load features, we require a PSR-17 (HttpClient) and PSR-18 (RequestFactoryInterface) compatible library like Guzzle to be installed.", I have the guzzlehttp installed but still got the error
Copy code
"guzzlehttp/guzzle": "6.5.8",
Could you please help take a look, thank you !
r
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
Hi, I believe you are missing a few things in the PHP code. This might be the HTTPClient resource that you need:
Copy code
$growthbook = Growthbook\Growthbook::create()
  ->withHttpClient($client, $requestFactory);
And these interfaces:
Copy code
\Psr\Http\Client\ClientInterface $client
\Psr\Http\Message\RequestFactoryInterface $requestFactory