Closed shrimpwagon closed 10 years ago
I went around and around on that Composer autoload thing, but I'm not familiar enough with the space (well, and PHP) to catch that! Thanks for the update! I'm more than happy to update the samples myself :)
Yah, no problem. Composer isn't the easiest to deal with at first. My commits are very solid as far as a Composer solution. You can trust it. I already have it working in a dev environment.
Are you going to merge this in?
Finally, yes!
The integration for Composer wasn't done quite right. I removed AvaTax.php from classes and made the functions there public static. Creating a raw function in global space for libraries may cause name conflicts. Also the autoload register is not needed since Composer takes care of this. I put all the classes in an 'AvaTax' namespace as per psr-0 specs. Had to remove the 'class' word from filenames for Composer to properly autoload the classes. Also updated composer.json accordingly. So to utilize the classes you would need to prepend them with AvaTax. Sorry, I did not update your examples.