First of all I would like to introduce myself and say that I am newbie in prismic.
I have integrated prismic with an existing laravel project, following the documentation (01-getting-started/02-integrating-with-existing-project.md).
When I am trying to query my prismic's repository (Open API Licensed under ....), I got a fatal error (Symfony\Component\DebugException\FatalThrowableError: Call to undefined method Ivory\HttpAdapter\Configuration::getEventDispatcher() in file vendor/prismic/php-sdk/src/Prismic/
Api.php on line 361) when calling Api::get('https://my-repo.prismic.io/api');
Digging in the code, I can see that the origin of the problem is becase of:
$httpAdapter = is_null($httpAdapter) ? self::defaultHttpAdapter() : $httpAdapter;
Which is a public function inside the same file.
public static function defaultHttpAdapter()
{
$configuration = new Configuration();$configuration->getUserAgent('Prismic-php-kit/' . self::VERSION . ' PHP/' . phpversion()); // We need to add the subscriber to have errors on 4.x.x and 5.x.x. $statusCodeSubscriber = new StatusCodeSubscriber(); $configuration->getEventDispatcher()->addSubscriber($statusCodeSubscriber); return new CurlHttpAdapter($configuration); }
I have tried with different repositories and I got always the same problem.
As my repository is Open under license I do no pass any token, can be that the problem?
Anyone can point me to the right direction?
Thank you