PHP 7+ Fork of the Official Patreon-PHP Library

The official PHP library has some issues:

  1. The minimum supported version is PHP 5.3, when the minimum you should be targeting is 7.2 (until December, then it should be 7.3).
  2. There are no unit tests.
  3. There is a lot of redundant code that could be refactored.
  4. There is a lot of unneeded manual work that could be replaced with http_build_query().
  5. The API is not type-safe.

I decided to fix all these issues and add a helper class that builds a full-featured authorization URL without having to manually URL encode anything.

Check it out here: soatok/patreon.

Note: In addition to the code quality improvements, I’m also actively maintaining my fork. If you encounter any issues or would like to request an integration, feel free to open an issue.

Quoting my reply at github for reference,

We are aiming to have this lib cover the maximum amount of different PHP versions, web hosts, different hosting infrastructures and development environments possible. The neat changes you have made may effect the amount of environments we are able to cover with this lib.

As discussed in github, we will link to your fork for those who may want to use it.