-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSR-0 Autoloading for easier integration #86
base: master
Are you sure you want to change the base?
Conversation
PSR-0 Autoloading and PSR-2 Code formatting
Hey there, thanks for the contribution! Couple of questions/notes:
Sorry, I'm not super familiar with PHP-FIG/PSRs as I don't actively work in PHP these days, so happy to take guidance from the Phirehose community. Cheers! |
Hello,
Let me know if you have any other questions. |
I'm a bit concerned by this patch: changing the file structure is quite radical and is likely to break backwards-compatibility. Phirehose is for relatively short data collection scripts, run from the commandline - they should not really contain any notable processing, so don't particularly need to be part of a larger framework. I've never written a Phirehose script and wished I had auto-loading: there is just one class, you will always use it, and you are unlikely to need to load another class. As you've already done the work, my suggestion would be to set up a "friendly fork" (friendly in that the two projects link to each other, and keep an eye on patches), and see what happens. If we find that the important functionality/security patches are coming in on the fork, that tells us it was desirable. |
+1 On 22 June 2015 at 11:46, Darren Cook [email protected] wrote:
|
What would break backwards compatibility would be the Namespacing and not the file structure. If you bring this package in with composer, a composer update will take care of the new file structure and since the new files are PSR-0 autoloaded, the "inclusion" of the file and its path is pretty much abstracted. I forked this branch and made this patch to actually use it in a Laravel 5.1 project, Which allows you (as other modern frameworks do) to run command line functions that also integrate well with other functionality. There are also microframeworks like Lumen which would make use of a package. At the end of the day its not about using it within a framework or not, because in both cases, its a good idea to follow modern coding practices (PSRs), and having package classes available in the global namespace is just not a good idea. |
Plus I don't see why a 2.0 release with 1 breaking change (adding the |
Namespacing and PSR-0 autoloading for easier integration into frameworks like Laravel.