PSR-4 "Autoloader" Has Passed

By | December 3, 2013

I wrote up the initial “Towards A Package-Oriented Autoloader” essay on 26 Mar, and the first formal proposal document on 03 Apr. Counting from the date of that first formal proposal, it has taken exactly 8 months of discussions, one botched vote, one rescinded vote, an entirely new FIG workflow, and four or five rewrites to get PSR-4 passed. Maybe 8 months doesn’t sound so long when you look back on it, but while you’re in the middle of it, it’s interminable.

The core concept has not changed since the initial essay: provide a way to map the “namespace prefix” of a class to an arbitrary directory, to make directory structures shallower than they are under PSR-0. This means no more empty directories in Composer (etc) packages just to suit the strict class-to-file rule of PSR-0, which itself is descended from the Horde and PEAR standards by way of Solar, Symfony, Zend, and others.

The initial implementation of the ruleset has not changed in any major way in that entire time, although the language describing the ruleset has gone through several major variations.

For what it’s worth, the existing Aura v2 libraries are already structured according to the PSR-4 rules, and work with Composer through their own package-specific autoloader files:

Many thanks to everyone who helped bring the initial proposal to its completed state. In particular, thanks to Beau Simensen who (on what turned out to be the final major rewrite) came up with the idea of mimicking the PSR-0 language style. Also, thanks to Phil Sturgeon, who (as sponsor and vote coordinator) finally saw fit to let a vote actually go through. ;-)

52 thoughts on “PSR-4 "Autoloader" Has Passed

  1. Phil Sturgeon

    You’re welcome! I really glad to see a new version go through that had such a massive majority of happy and content members, instead of a bunch of people aaying… “I guess… +1″ like the last vote.

    It was a mission, but we now have an excellent document.

    Reply
  2. Pingback: PHPDeveloper.org: Paul Jones: PSR-4 "Autoloader" Has Passed

  3. Pingback: Paul Jones: PSR-4 "Autoloader" Has Passed | facebooklikes

Leave a Reply

Your email address will not be published. Required fields are marked *