{
    "href": "/post/2025/02/03/stream-interop-now-open-for-public-review/",
    "relId": "2025/02/03/stream-interop-now-open-for-public-review",
    "title": "Stream-Interop Now Open For Public Review",
    "author": "pmjones",
    "tags": [
        {
            "href": "/tag/programming/",
            "relId": "programming",
            "title": "Programming",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/interop/",
            "relId": "interop",
            "title": "Interop",
            "author": null,
            "created": "2025-02-03 20:11:59 UTC",
            "updated": [
                "2025-02-03 20:11:59 UTC"
            ],
            "markup": "markdown"
        }
    ],
    "created": "2025-02-03 20:12:59 UTC",
    "updated": [
        "2025-02-03 20:12:59 UTC"
    ],
    "markup": "markdown",
    "html": "<blockquote>\n<p>Many thanks to the private reviewers and collaborators on this project thus far. Special thanks to <a href=\"https://github.com/nbish11\">Nathan Bishop</a> for starting this project, and for his generous donation of the Github organization and the Packagist vendor space. Special thanks also to <a href=\"https://github.com/koriym\">Akihito Koriyama</a> for his encouragement and advice on this and related <code>*-interop</code> projects.</p>\n</blockquote>\n<p>After a period of private review, the <a href=\"https://github.com/stream-interop/interface\">stream-interop/interface</a> package is now open for public review.</p>\n<p><a href=\"https://github.com/stream-interop/interface\">Stream-Interop</a> publishes interoperable interfaces providing a more object-oriented approach to encapsulating and interacting with stream resources in PHP 8.4+. It reflects, refines, and reconciles the common practices identified within <a href=\"https://github.com/stream-interop/interface/blob/1.x/README-RESEARCH.md\">several pre-existing projects</a>.</p>\n<p>The package defines separate interfaces for various affordances around stream resources so that (1) implementations can advertise well-tailored affordances, and (2) consumers can typehint to the specific affordances they require for specific situations:</p>\n<ul>\n<li>\n<a href=\"https://github.com/stream-interop/interface#stream\"><em>Stream</em></a> is a common baseline for streams.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#resourcestream\"><em>ResourceStream</em></a> affords direct access to the encapsulated resource.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#closablestream\"><em>ClosableStream</em></a> affords closing the stream.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#sizablestream\"><em>SizableStream</em></a> affords getting the full length of the stream in bytes.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#readablestream\"><em>ReadableStream</em></a> affords reading from the stream.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#seekablestream\"><em>SeekableStream</em></a> affords moving the stream pointer.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#stringablestream\"><em>StringableStream</em></a> affords casting the stream to a string.</li>\n<li>\n<a href=\"https://github.com/stream-interop/interface#writablestream\"><em>WritableStream</em></a> affords writing to the stream.</li>\n</ul>\n<p>The <a href=\"https://github.com/stream-interop/impl\">reference implementations</a> demonstrate how the interfaces can be combined in various ways to implement everything from a simple <a href=\"https://github.com/stream-interop/impl/blob/1.x/src/ConsumableFileStream.php\">ConsumableFileStream</a> to a lazy ghost <a href=\"https://github.com/stream-interop/impl/blob/1.x/src/ReadWriteFile.php\">ReadWriteFile</a>.</p>\n<p>If you use streams and are interested an interoperable set of interfaces, please offer your comments and criticism as <a href=\"https://github.com/stream-interop/interface/issues\">issues or PRs out at Github</a>.</p>\n"
}
