JacobBennett / SendyPHP

A PHP class built to interface with the Sendy API
MIT License
133 stars 38 forks source link

change the path to require to current file path #25

Closed x5engine closed 9 years ago

x5engine commented 9 years ago

change the path to require to current file path so it doesn't throw file not found when run

Thanks for the code!

JacobBennett commented 9 years ago

Thanks for your PR! The path you specified would be the path for people downloading the entire contents of this repo and throwing it into their project. I'm not sure thats the typical use case for people that are including this library without using composer to install it. I probably do need to make this more clear however. If you have a better way of explaining how to install SendyPHP into a project without using composer, I would be interested in seeing your explanation written out in the readme.

This has been a sticking point for other folks in the past so any experience you bring to the table involving a non-composer install would be very valued. Thanks for your time and the PR!

Feel free to continue the discussion on this below.

x5engine commented 9 years ago

You're welcome :)

If you have a better way of explaining how to install SendyPHP into a project without using composer,

I think the most people who are using old school PHP (and they are many) will download or clone the repo then use that line require('SendyPHP\SendyPHP.php'); and it will throw them an error and they will try debugging it ...

So why not just chaneg the path in the code or move the SendyPHP.php to the parent folder?

Thank you :)

PS: Is there any NodeJS API for Sendy ?

JacobBennett commented 9 years ago

So why not just change the path in the code or move the SendyPHP.php to the parent folder?

For those using composer (which I would highly suggest you check out, its awesome and easy to set up), I have to keep SendyPHP.php in the location it is in. I updated the readme. Take a look at it and see if the new directions make more sense.

PS: Is there any NodeJS API for Sendy ?

Yes: https://www.npmjs.com/package/sendy-api