PHPackages                             php-unified/stream-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. php-unified/stream-wrapper

ActiveLibrary

php-unified/stream-wrapper
==========================

An implementation of a required standard from PHP for stream wrappers.

1.0.3(6y ago)23MITPHPPHP ^7.2CI failing

Since Jan 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/php-unified/stream-wrapper)[ Packagist](https://packagist.org/packages/php-unified/stream-wrapper)[ RSS](/packages/php-unified-stream-wrapper/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/9b6ddb681bbe86a1de999f4a7c37664b7f6ba665928ce5d6a82d51b59eb3efa6/68747470733a2f2f7472617669732d63692e636f6d2f7068702d756e69666965642f73747265616d2d777261707065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/php-unified/stream-wrapper)

PHP Unified State
=================

[](#php-unified-state)

This package provides an interface for the [Stream Wrapper implementation of PHP](http://php.net/manual/en/class.streamwrapper.php).

The available interface is located in the `Common` folder together with an abstract implementation. It is recommended to use this abstract implementation, because this will make a required property available.

The required property is `$context`, it MUST be public, because PHP sets the context of a stream on this variable.

Registering a stream wrapper
============================

[](#registering-a-stream-wrapper)

After implementing the interface and abstract a stream wrapper can be registered. This can be done by calling the function `stream_wrapper_register(string $protocol , string $classname [, int $flags = 0 ])`. This function required 3 parameters:

- $protocol: The wrapper name should be passed to this variable.
- - Example: if you want to be able to call `fopen('void://path/to/my/file.txt', 'w+')`, you should pass `'void'` to this parameter.
- $classname: This should be name of the class which handles (read: implements StreamWrapperInterface) the stream.
- - Example: to register the `VoidStreamWrapper` you should pass `\PhpUnified\StreamWrapper\VoidStreamWrapper::class` to this parameter.
- $flags: This parameter expects an integer, either `STREAM_IS_URL` (for a HTTP stream) or `0` (for a local stream, this is the default).

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

MIT License
-----------

[](#mit-license)

Copyright (c) 2019 GrizzIT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~135 days

Total

4

Last Release

2261d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8682881?v=4)[GrizzIT](/maintainers/GrizzIT)[@grizzit](https://github.com/grizzit)

---

Top Contributors

[![mfrankruijter](https://avatars.githubusercontent.com/u/8653925?v=4)](https://github.com/mfrankruijter "mfrankruijter (6 commits)")

---

Tags

stream

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/php-unified-stream-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/php-unified-stream-wrapper/health.svg)](https://phpackages.com/packages/php-unified-stream-wrapper)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[maennchen/zipstream-php

ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.

1.9k286.3M147](/packages/maennchen-zipstream-php)[clue/stream-filter

A simple and modern approach to stream filtering in PHP

1.7k261.7M7](/packages/clue-stream-filter)[react/socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP

1.3k116.9M402](/packages/react-socket)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

688126.8M194](/packages/react-stream)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
