intercom / intercom-php

PHP bindings for the Intercom API
https://developers.intercom.io/reference
Other
296 stars 141 forks source link

Missing Message Factory because of latest php-http/message version #361

Open ABouchard55 opened 1 year ago

ABouchard55 commented 1 year ago

With this recent commit : https://github.com/php-http/message/commit/47a14338bf4ebd67d317bf1144253d7db4ab55fd

php-http/message stopped requiring php-http/message-factory, which is needed by IntercomClient, and thus throws a DiscoveryFailedException exception.

Can be fixed by requiring php-http/message-factory manually.

mayanksdudakiya commented 1 year ago

Faced same issue, is there any official fix available instead of installing other packages?

No php-http message factories found. Note that the php-http message factories are deprecated in favor of the PSR-17 message factories. To use the legacy Guzzle, Diactoros or Slim Framework factories of php-http, install php-http/message and php-http/message-factory and the chosen message implementation.

andyg5000 commented 1 year ago

Edit: disregard. I thought my answer was correct, but turns out that the php-http/message-factory was required and psr/http-factory is just a set of interfaces.

psr/http-factory looks to fix this issue and is the supported update to php-http/message-factory

However, It looks like we should all be coming up with a different solution anyway. https://community.intercom.com/api-webhooks-23/intercom-php-sdk-is-incredibly-outdated-475

patrickomeara commented 1 year ago

I recently implemented https://docs.saloon.dev/ to combat this SDK being so far behind. I highly recommend this library. It handles rate limiting and error handling really well.