Closed Rockstar04 closed 10 years ago
I already notice my diffs contain some extra noise (new line at end of file and some trailing whitespace that was trimmed). I WILL be restoring these before this PR is "ready" so we have some nice clean diffs to look at.
Two things, based on a preliminary glance at the changes. First, your issue title/description say PSR-4, but the commit says PSR-0. Which are we looking at, here? Second, namespaces are a change that destroys backward compatibility, requiring a major version number change, and IMO, a major degree of investigation and justification to implement. Mostly just testing that things still function. Since the underscore-based psuedo-namespacing is PSR-0 compliant, I don't see that we need this particular change yet. I'm more concerned about things that are actually broken than testing whether we can end support for PHP<5.3.
Sorry for the discrepancy in the title and commit message, I started with PSR-0, but remember it was superseded by PSR-4. I agree that this will be a HUGE change, but I believe its something that should be done.
I plan on cleaning up everything into one clean, concise commit and PR once I have everything in line.
Sent from my Droid 4
Having just looked at PSR-4, it doesn't actually supercede 0, but I'm not against 4 if we decide to drop support for 5.2. Thing is, PSRs 1 and 2 won't include anything that breaks backward compatibility, so not only should we implement them first, but they'll also require less evaluation to get accepted.
As near as I can tell, PHP-Resque is PSR-0 compliant already... Am I missing something?
I'm going to close this and work in @danhunsaker suggested order of PSR-1 > PSR-2 > PSR-(0,4)
Then tackle the more sensitive issue of refactoring for namespaces.
The email reply is fine if you don't include the email to which you're replying. :-)
PSR-0 does allow underscore-separated instead of 5.3-namespaced class names, for Horde/PEAR compatibility, as well as support for earlier PHP 5s. It's intended to be transitional until 5.3 is the minimum version in widespread use. Which, sadly, still isn't the case. Too many sysadmins who still think ten years old means stable and secure. (Seriously. I've spoken to one sysadmin who was still running Apache 1.3 on his servers, unless clients specifically requested 2.x, because it was "stable" and "secure". Stable because there were no updates any more. Secure because no regressions had been introduced. Never mind the security holes that weren't discovered until after updates stopped flowing.)
This will be the first in successive PR's that aim to bring the entire library in line with PSR-4 -> PSR-1 -> PSR-2.
This is a work in progress, and I am only submitting the PR so I can check the build status and I'm too lazy to add it to my own travis.
There have been several patches that have either included or proposed PSR compliance, but have been mixed with other changes. My series or PRs will over them all, in steps, so they are easier to follow and we can argue about each set of changes as the come. (Looking at you PSR-2 spaces)