PHPackages                             hallodanny/laravel-virtual-storage - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. hallodanny/laravel-virtual-storage

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

hallodanny/laravel-virtual-storage
==================================

Virtual Filesystem Storage Adapter for Laravel

v1.0.1(4y ago)0111MITPHPPHP ^8.0

Since Jun 12Pushed 4y agoCompare

[ Source](https://github.com/hallodanny/laravel-virtual-storage)[ Packagist](https://packagist.org/packages/hallodanny/laravel-virtual-storage)[ RSS](/packages/hallodanny-laravel-virtual-storage/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Laravel Virtual Storage Filesystem Adapter
==========================================

[](#laravel-virtual-storage-filesystem-adapter)

Sometimes, when we are testing, it would be very nice to just easily swap out the various `Storage:disk()` calls with a virtual files system like `mikey179/vfsStream`.

Installation
------------

[](#installation)

```
composer require --dev hallodanny/laravel-virtual-storage

```

Then register the provider in your `App\Providers\AppServiceProvider` like so:

```
public function register()
{
    if ($this->app->environment('testing')) {
        if (class_exists(VirtualFilesystemServiceProvider::class)) {
            $this->app->register(VirtualFilesystemServiceProvider::class);
        }
    }
}
```

This assumes you stick with the default `APP_ENV=testing` settings that Laravel comes with out of the box. Of course, you may also register the provider in the more traditional manner if you want the virtual file system adapter available in other environments, of it you just don't like the way we do it.

Configuration
-------------

[](#configuration)

All configuration can be done in a combination of your `.env`, `phpunit.xml`, and `config/filesystems.php`.

Suppose you had a `config/filesystems.php` that looked something like this:

```
return [
    ....

    'disks' => [
        'data' => [
            'driver' => 'local',
            'root'   => env('STORAGE_DATA_DIR'),
        ],

        'archive' => [
            'driver'   => 's3'
            'key'      => env('S3_KEY'),
            'secret'   => env('S3_SECRET'),
            'region'   => env('S3_REGION'),
            'bucket'   => env('S3_DEVELOP_BUCKET')
        ]
    ],
];
```

Simply make a modification to the `driver` property:

```
return [
    ....

    'disks' => [

        'data' => [
            'driver'  => env('STORAGE_DATA_DRIVER', 'local'),
            'root'    => env('STORAGE_DATA_DIR')
        ],

        'archive' => [
            'driver'   => env('S3_ARCHIVE_DRIVER', 's3')
            'key'      => env('S3_KEY'),
            'secret'   => env('S3_SECRET'),
            'region'   => env('S3_REGION'),
            'bucket'   => env('S3_DEVELOP_BUCKET')
        ]
    ],
];
```

Setting up the driver with `env()` allows us to default to our standard drivers or allow us to override that in `phpunit.xml` to switch over to the virtual filesystem driver.

Now, in your `phpunit.xml` add:

```

```

That is all there is to it, those drives will now use the virtual filesystem adapter.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83% 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 ~10 days

Total

2

Last Release

1472d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbcd2574fd594738ef00232bd7ea3016f688f662d2b228ad71b1c28c69ce46d2?d=identicon)[hallodanny](/maintainers/hallodanny)

---

Top Contributors

[![bubba-h57](https://avatars.githubusercontent.com/u/603630?v=4)](https://github.com/bubba-h57 "bubba-h57 (39 commits)")[![rdarcy1](https://avatars.githubusercontent.com/u/15962421?v=4)](https://github.com/rdarcy1 "rdarcy1 (7 commits)")[![RafaelKr](https://avatars.githubusercontent.com/u/14234815?v=4)](https://github.com/RafaelKr "RafaelKr (1 commits)")

---

Tags

Flysystemlaravellumenadapterstoragevfsphp-vs

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/hallodanny-laravel-virtual-storage/health.svg)

```
[![Health](https://phpackages.com/badges/hallodanny-laravel-virtual-storage/health.svg)](https://phpackages.com/packages/hallodanny-laravel-virtual-storage)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)[luoyy/ali-oss-storage

aliyun oss filesystem storage for laravel 10+

1531.0k1](/packages/luoyy-ali-oss-storage)

PHPackages © 2026

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