{
    "href": "/post/2016/12/05/independent-packages-and-subtree-splits/",
    "relId": "2016/12/05/independent-packages-and-subtree-splits",
    "title": "Independent Packages and Subtree Splits",
    "author": "pmjones",
    "markup": "html",
    "tags": [
        {
            "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": "2016-12-05 22:07:54 UTC",
    "updated": [
        "2016-12-05 22:07:54 UTC"
    ],
    "html": "<p>You\u2019ll sometimes see a PHP package hosted in a Github repository with the heading or subtitle \u201c[READ ONLY] Subtree Split\u201d.  This indicates that the package is actually copied from another codebase (usually a framework) and is not intended to be worked on separately from that other codebase.</p>\n<p>As such, a \u201csubtree split\u201d is not necessarily a sign of an independent package. Using a subtree split to publish a package says to me that the authors\u2019 concentration is on the framework-as-a-whole, not on the package in-and-of- itself.</p>\n<p>For example, Symfony does subtree splits for its components, as does Laravel for its Illuminate components. Those packages from the frameworks are not developed independently; they only move forward as part of the whole framework.</p>\n<p>In these cases, you often end up with <code>composer.json</code> in the framework origin directories, which is not something I generally expect. Further, the framework subdirectories may have their own src/tests/docs/etc. directories. They are there so that the subtree split can have them available at their own top level, but in the origin framework, it is again something I find unexpected.</p>\n<p>I say: if you\u2019re going to advertise independent packages, actually write them independently. Let them be their own thing. <a href=\"http://auraphp.com\">Aura</a> has done it that way since its beginning, and <a href=\"https://framework.zend.com\">Zend Framework</a> converted to that approach in version 3. Then you can compose the truly independent packages into a framework, instead of subtree-splitting your framework into pseudo-independent packages that are still bound to the origin framework development and release process.</p>\n<p class=\"reddit-links\">Read the Reddit discussion about this post <a href=\"https://www.reddit.com/r/PHP/comments/5gsops/independent_packages_and_subtree_splits/\">here</a>.</p>\n"
}
