Skip to content

Releases: intercom/intercom-php

Enable compatibility with HTTPlug version 2

29 Jul 12:48
Compare
Choose a tag to compare

This release adds compatibility with php-http/client-common version 2, which also allows this library to be used with HTTPlug 2.

Fix incorrectly named variables in IntercomClient

11 Mar 11:02
Compare
Choose a tag to compare

#274 fixes two variables with incorrect names, which might lead to some warnings or errors, for example, if PHP strict mode is enabled.

Use ErrorPlugin to raise 4xx and 5xx exceptions

18 Jan 10:42
Compare
Choose a tag to compare

#272 After the previous upgrade we discovered that no errors were being thrown. To address this we used ErrorPlugin to raise 4xx and 5xx exceptions

[BREAKING CHANGE] Upgrading to 7.1 and using HTTPlug

15 Jan 11:20
Compare
Choose a tag to compare
  • Upgrade to PHP 7.1+ #271
    PHP 5.6 and 7.0 are no longer supported. We should only support active versions (7.1, 7.2 and 7.3 at the time of writing)

  • Abstract the HTTP client using HTTPPlug #270

This version introduces HTTPPlug as the HTTP Client. HTTPPlug allows this library to use any HTTP Library as long as there is a HTTPPlug adaptor for it. All major libraries are available (Guzzle5/6, CURL, Buzz and many more).

Upgrade instructions:

  1. Check if any change from the list below affects your code and update it if required.
  2. Choose a client implementation and include it to your dependencies (ie composer require php-http/curl-client). We recommend that you choose the adapter for the library you already use in your project. If you don't use any, php-http/curl-client is the most lightweight.
  3. Upgrade your intercom/intercom-php dependency: composer update intercom/intercom-php.

Changes in this version:

  • IntercomClient constructor third parameter now only accepts a key-value array of request headers, that will be included in every request, eg: new IntercomClient('token', null, ['Custom-Header' => 'value']);. If you were passing any other options to the client (apart from headers), you will need to instantiate your own client and pass it using the setHttpClient method. Example:

    $httpClient = new Http\Adapter\Guzzle6\Client(
        new GuzzleHttp\Client(['connect_timeout' => 5]);
    );
    $client = new IntercomClient('token');
    $client->setHttpClient($httpClient); 
  • IntercomClient method setClient has been renamed to setHttpClient. Its first argument must be a Psr\Http\Client\ClientInterface. If you were using this method before upgrading, you can use the Guzzle6 adapter like in the example above. For example, $client->setClient($guzzleClient) would need to be changed to $client->setHttpClient(new Http\Adapter\Guzzle6\Client($guzzleClient)).

  • IntercomClient no longer exposes the methods getGuzzleRequestOptions and getAuth.

  • IntercomClient now provides the methods setRequestFactory and setUriFactory so you can customize the generation of requests and URIs if needed.

  • From now on, all the exceptions thrown by the SDK will implement Http\Client\Exception. See the different exceptions that can be thrown in the HTTPPlug documentation

Add ability to permanently delete a user

07 Jun 19:08
Compare
Choose a tag to compare

#251 introduces the ability to permanently delete a user

  • it also introduces an archive function to enable soft delete of users (previously delete)
  • creates a wrapper for delete to archive users
    For more info on the API related change please see here

Adding Scroll option for leads and more PSR2 updates

24 Oct 10:03
Compare
Choose a tag to compare

More PSR2 fixes #236
Added scroll for leads #238

Refactoring for PSR2

12 Oct 10:14
Compare
Choose a tag to compare

This is related to PR #233 by @kmossco and #218 to refactor the code for PSR2 styling

Adding option to set Guzzle requests timeout

14 Sep 14:47
Compare
Choose a tag to compare

Related to #205 added option to set Guzzle requests if needed.
Also, includes fix to remove use of 'function' keyword for compatibility with symfony 2.7 and fix issue with rate limit header unit test failing

Adding rate limit header info

29 Aug 09:50
Compare
Choose a tag to compare

This allows users to access rate limit info contained in the rate limit headers in the response.

v3.1.4: Merge pull request #229 from intercom/readme_update

28 Aug 15:59
Compare
Choose a tag to compare