Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0 #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

4.0 #5

wants to merge 3 commits into from

Conversation

slaughter550
Copy link
Owner

@slaughter550 slaughter550 commented Mar 31, 2019

Resolves #4

@slaughter550
Copy link
Owner Author

@jackwh is there anything else you think should be added to V4?

@jackwh
Copy link

jackwh commented Apr 15, 2019

@slaughter550 Thanks for the update, and apologies for my slow response! Some suggestions below... First two would be great, second two are just nice-to-haves:

  1. The current composer.json file locks the Intercom API version to a specific release ("intercom/intercom-php": "3.2.0"). It would be best to use semantic version ranges, so we can always benefit from any minor-version improvements as soon as they are released by Intercom. This issue prevented me from being able to use the delete user API calls added v3.2.0 of the API in June, until the dependency version was bumped in this library in September.

  2. PhpStorm doesn't support autocomplete when using the Intercom facade, as shown in the screenshot below. I'm using Laravel IDE Helper to add PhpStorm autocomplete for everything else, and I know other package facades are able to support autocomplete too, but I'm not sure specifically how to add it. Might be as easy as a @mixin docblock tag? Or maybe more involved, I'm not sure...

Screenshot 2019-04-15 at 12 53 20

  1. Update the package requirements to support PHP 7.1+ only (required as per Intercom API v4 requirements), and therefore upgrade codebase to take advantage of 7.1 features and syntax.

  2. Native support for queueing or retrying Intercom API requests would be useful. In my application, I'm recording user events in numerous places. If the Intercom API goes down (which seems to happen far more often than I'd like), the requests fail. To save littering my code with try catch statements, I ended up creating a wrapper for a Laravel queued job to make the API request, when it can be asynchronous. This way if the API goes down, it will automatically re-try later. Native support for this would be neat.

Hope that helps!

@jackwh
Copy link

jackwh commented Apr 15, 2019

@slaughter550 Sorry, wrote those comments before I'd checked what had changed on this PR!

Point 1 still applies (though against v4 instead of v3). Point 3 might need to be revised to PHP v7.1 instead of v7.0 which it is now, as Intercom API v4 only supports v7.1 and above.

@slaughter550
Copy link
Owner Author

@jackwh

  1. Addressed
  2. Can you tell me which package facades do it and I'll see if I can find what makes them tick?
  3. Addressed.
  4. I agree it fails very often. I will look into a config option for failures. Whether to queue or throw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intercom PHP API — v4.0.0 upgrade
2 participants