# bovigo/vfsStream

vfsStream is a stream wrapper for a virtual file system that may be helpful in unit tests to mock the real file system. It can be used with any unit test framework, like PHPUnit or SimpleTest.

Repository: https://github.com/bovigo/vfsStream
Canonical: https://ross.abutalabs.com/products/vfsstream
Language: PHP
License: BSD-3-Clause
License Family: permissive
Topics: vfsstream, php, testing, filesystem
Last push: 2024-08-29T18:46:22+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5585, "days_push": 734, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1440, forks 105 (observed 2026-08-28T04:04:44.149899+00:00)

## What it is
vfsStream is a PHP stream wrapper that provides a virtual file system in memory, primarily for mocking the real file system in unit tests. It works with any PHP unit test framework such as PHPUnit or SimpleTest.

## Use cases
- mock the filesystem in PHPUnit tests
- test code that reads and writes files without touching disk
- simulate file permissions and directory structures in tests
- avoid slow or side-effecting real file I/O in unit tests
- test file upload handling logic safely

## When to choose
- you write PHP unit tests involving file operations
- you need deterministic, isolated filesystem behavior in tests
- you want to test permission-related code paths

## When to avoid
- you need integration tests against a real filesystem
- your project is not written in PHP
- you need a persistent virtual filesystem for production use

## Facets
- artifact type: library
- maturity: stable
- function: testing, mocking, file-system
- domain: testing, developer-tools, files
- platform: php, cli
- tags: virtual-filesystem, stream-wrapper, phpunit, unit-testing

## Member repositories
- bovigo/vfsStream (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.149899+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:30.996820+00:00, confidence not recorded.
  - readme: https://github.com/bovigo/vfsStream (fetched 2026-08-28T04:04:44.149899+00:00, sha 1dceaf8ee247)
- Data as of 2026-08-30T08:39:29.467469+00:00.
