{
    "href": "/post/2013/12/03/psr-4-autoloader-has-passed/",
    "relId": "2013/12/03/psr-4-autoloader-has-passed",
    "title": "PSR-4 \"Autoloader\" Has Passed",
    "author": "pmjones",
    "markup": "html",
    "tags": [
        {
            "href": "/tag/aura/",
            "relId": "aura",
            "title": "Aura",
            "author": null,
            "created": "2020-09-14 21:51:57 UTC",
            "updated": [
                "2020-09-14 21:51:57 UTC"
            ],
            "markup": "markdown"
        },
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/programming/",
            "relId": "programming",
            "title": "Programming",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        }
    ],
    "created": "2013-12-03 17:51:04 UTC",
    "updated": [
        "2013-12-03 17:51:04 UTC"
    ],
    "html": "<p>I wrote up the initial <a href=\"https://groups.google.com/forum/#!searchin/php-fig/package%2420oriented%2420autoloader/php-fig/JdR-g8ZxKa8/jJr80ard-ekJ\">\u201cTowards A Package-Oriented Autoloader\u201d</a> essay on 26 Mar, and the <a href=\"https://groups.google.com/forum/#!topicsearchin/php-fig/autoload/php-fig/qT7mEy0RIuI\">first formal proposal</a> 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 <a href=\"https://github.com/php-fig/fig-standards/tree/master/accepted/PSR-4-autoloader.md\">PSR-4</a> passed.  Maybe 8 months doesn\u2019t sound so long when you look back on it, but while you\u2019re in the middle of it, it\u2019s <em>interminable</em>.</p>\n<p>The core concept has not changed since the initial essay: provide a way to map the \u201cnamespace prefix\u201d of a class to an arbitrary directory, to make directory structures shallower than they are under <a href=\"https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md\">PSR-0</a>.  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 <a href=\"http://horde.org\">Horde</a> and <a href=\"http://pear.php.net\">PEAR</a> standards by way of <a href=\"http://solarphp.com\">Solar</a>, <a href=\"http://symfony.com\">Symfony</a>, <a href=\"http://framework.zend.com\">Zend</a>, and others.</p>\n<p>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.</p>\n<p>For what it\u2019s worth, the existing Aura v2 libraries are already structured according to the PSR-4 rules, and work with <a href=\"http://getcomposer.com\">Composer</a> through their own package-specific autoloader files:</p>\n<ul>\n<li><a href=\"https://github.com/auraphp/Aura.Autoload/tree/develop-2\">Aura.Autoload v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Cli/tree/develop-2\">Aura.Cli v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Di/tree/develop-2\">Aura.Di v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Dispatcher/tree/develop-2\">Aura.Dispatcher v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Html/tree/develop-2\">Aura.Html v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Includer/tree/develop-2\">Aura.Includer v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Router/tree/develop-2\">Aura.Router v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Sql/tree/develop-2\">Aura.Sql v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Sql_Query/tree/develop-2\">Aura.Sql_Query v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Sql_Schema/tree/develop-2\">Aura.Sql_Schema v2</a></li>\n<li><a href=\"https://github.com/auraphp/Aura.Web/tree/develop-2\">Aura.Web v2</a></li>\n</ul>\n<p>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. ;-)</p>\n<hr>\n<p class=\"reddit-links\">Read the Reddit discussion about this post <a href=\"https://www.reddit.com/r/PHP/comments/1s03pj/psr4_autoloader_has_passed/\">here</a>.</p>\n"
}
