I have an existing PHP class library on GitHub
that consists of a parent class and a few child classes. I'm just learning about Composer and I'm trying to convert this to a package.
From what I've read, it looks like the first step is going to involve restructuring my directories to follow the PSR-0 standard
. Is that accurate?
If so, that's going to be quite a drastic change to my class, so I'm wondering if I should update my existing GitHub repo or create a separate one altogether..?? Seems like such a drastic change could cause issues for people using my current class if they pull from GitHub not realizing so much was different.
On that note, how far do I need to go with it? Right now my structure is old, basic structure where my config file and my class files are in /includes. Then the classes are named things like paypal.class.php, paypal.adaptive.class.php,
Well, it looks like this PSR-0 standard is wanting something more like /angelleye/PayPal/PayPal.p
hp, where my class name would just be PayPal instead of paypal.class.php. And then it looks like I should go with PayPal_Adaptive.php as my adaptive class name, which would then turn into something like /angelleye/PayPal/PayPal/A
I'm just not sure I'm following that entirely right, and again, if I am, it seems like maybe this needs to be an entirely separate GitHub repo..??
Also, once I do this, will people that are not using composer still be able to use the class library, or does this make it a composer only type of thing so I'd still have to maintain two separate versions of my class? I know I have lots of people using my class that are novice and intermediate developers and may not know about or want to use Composer, but would rather just download and include themselves like they always have.
Any information on if I'm headed down the right track or not would be greatly appreciated. Thanks!