patreon-php icon indicating copy to clipboard operation
patreon-php copied to clipboard

Really funny

Open ITEvo opened this issue 2 years ago • 2 comments

It's funny how your class with the simple code:

include '/private/API/OAuth.php';
include '/private/API/API.php';
$patrons = new API(fetch_campaign_details($12346));

doesn't work (of course I can't use composer on my hosting so I had to include it and no matter what it doesn't work). Returning this error:

Fatal error: Uncaught Error: Class 'API\API' not found in /private/Patreon.php:6 Stack trace: #0 {main} thrown in /private/Patreon.php on line 6

But the working php-api that I commissioned to my colleagues are currently working with cURL. Was really composer necessary for this? Really? You should pull out something easy to use and for everyone, adaptable without limits and not this kind of stuff. Few lines for a guide taking people nowhere... God. Lucky you that you've been able to make it work.

ITEvo avatar Dec 12 '21 13:12 ITEvo

This was the first time you were mad at strangers on the internet because they use composer; in the library they wrote; which you have not contributed to... Based on the fact your host does not supply, and you do not understand how to wire the code without their help.

Who is this web-host? Can we put them on blast, so that innocent devs stop taking the fallout? Can you not just use composer in the environment you have, and then upload the vendor folder alongside your code?

You are on GitHub which means it's possible for you to use GitHub actions to build everything using composer remotely and either output an artifact, or upload directly from GitHub; placing your username and passwords in secrets. By doing this you'd be bypassing strange rules a host may have that are holding you back.

Locally you can use composer via docker or VM; or native install on most modern operating systems, with a very short setup per-machine, and even less per-project. The fight to not use composer; you're about 10 years too late for. If your team are not using it, they are holding you back professionally.

So... Be mad at your team for selecting out of date tooling and practices, yourself for your conduct, your web host for not supporting modern PHP tools; but please stop being mad at people doing free work, because you have an awkward way of wanting to use their code. It's on you to suggest pull requests that make the code more like what you'd want to see.

Lewiscowles1986 avatar Jan 02 '22 09:01 Lewiscowles1986

This would most likely work if you used the correct namespace for the class ..

$patrons = new \Patreon\API(fetch_campaign_details($12346));

sinnbeck avatar Jan 03 '22 06:01 sinnbeck