PHPackages                             bepark/flysystem-fallback-to-read-only-adapter - 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. bepark/flysystem-fallback-to-read-only-adapter

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

bepark/flysystem-fallback-to-read-only-adapter
==============================================

Flystem adapter with a fallback to a read only flystem adapter

1.0.2(8y ago)29.6k1MITPHPPHP &gt;=5.4.0

Since May 5Pushed 8y ago2 watchersCompare

[ Source](https://github.com/BePark/flysystem-fallback-to-read-only-adapter)[ Packagist](https://packagist.org/packages/bepark/flysystem-fallback-to-read-only-adapter)[ RSS](/packages/bepark-flysystem-fallback-to-read-only-adapter/feed)WikiDiscussions master Synced 1mo ago

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

Flysystem adapter with a fallback to a readonly adapter
=======================================================

[](#flysystem-adapter-with-a-fallback-to-a-readonly-adapter)

[![Author](https://camo.githubusercontent.com/623cae98972e840b9f7361c03aab9cd034145c1020b7cd7159e583dcc0b1e6b3/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d404772756d6d66792d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/Grummfy)[![Build Status](https://camo.githubusercontent.com/5979513e78a84ddd5fc0372f8d6a536e926479572ba9fca61635e67f17b90e02/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f42655061726b2f666c7973797374656d2d66616c6c6261636b2d746f2d726561642d6f6e6c792d616461707465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/BePark/flysystem-fallback-to-read-only-adapter)[![Coverage Status](https://camo.githubusercontent.com/d0d71695c5406ff2cfb25739e72f0b6c23ab36181321139d3fc7782c23f907a1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f42655061726b2f666c7973797374656d2d66616c6c6261636b2d746f2d726561642d6f6e6c792d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/BePark/flysystem-fallback-to-read-only-adapter/code-structure)[![Coverage Status](https://camo.githubusercontent.com/5cf9e5aa104b68fe7e2b128bb975da89bd5fa77f67041d9e034be7267b16c6c3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f42655061726b2f666c7973797374656d2d66616c6c6261636b2d746f2d726561642d6f6e6c792d616461707465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/BePark/flysystem-fallback-to-read-only-adapter?branch=master)[![Quality Score](https://camo.githubusercontent.com/76552a24c5ace1f4702db0172234fbefa159c7b6d75d53558473b342e2f7ba08/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f42655061726b2f666c7973797374656d2d66616c6c6261636b2d746f2d726561642d6f6e6c792d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/BePark/flysystem-fallback-to-read-only-adapter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/eb9de4bba78eaad40f3c2a71e1d0a8244e1efaf0fa3004b1e6796e670d867b72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f42655061726b2f666c7973797374656d2d66616c6c6261636b2d746f2d726561642d6f6e6c792d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/BePark/flysystem-fallback-to-read-only-adapter)[![Total Downloads](https://camo.githubusercontent.com/c8d9ccace97a34204643097511f82a0cd89c7308bf21821584dcf9ad358cee90/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f42655061726b2f666c7973797374656d2d66616c6c6261636b2d746f2d726561642d6f6e6c792d616461707465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/BePark/flysystem-fallback-to-read-only-adapter)

Description
-----------

[](#description)

Imagine that you need to read files from a system but when you change/delete it you need to assure that everything is still untouch on a first system and that the new version is available.

We develop it to allow us to easier manage some of non private data from development environment with prod data.

On the read only adapter you can:

- read
- list

On the write only adapter you can do whatever you want, as the limits is in relation with the given adapter itself.

So this adpater will not magical convert a normal adapter to read only. It's just blocking the usage of write or delete.

So when you have two adapters (A &amp; B (the read only one)), the reading will be first made from the first one (A), if it is not found fallback to the second one (B). On write, it will first duplicate the data if not exist on the first one (A) and then write it (on A but nothing will change on B).

### Strange behaviour

[](#strange-behaviour)

Some strange behaviour can appears ;) If you remove a file that exist only on the read only adapter, it will still be readable by the adapter.

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

[](#installation)

```
composer require BePark/flysystem-fallback-to-read-only-adapter
```

Usage
-----

[](#usage)

```
$nonTouchableAdapter = new League\Flysystem\Adapter\AwsS3(...);
$doWhateverYouWantAdapter = new League\Flysystem\Adapter\Local(...);
$adapter = new BePark\Flysystem\ReadOnlyFallback\ReadOnlyFallbackAdapter($doWhateverYouWantAdapter, $nonTouchableAdapter);
```

Inspiration &amp; similar adapters
----------------------------------

[](#inspiration--similar-adapters)

- [Flysystem replica adapter](https://github.com/Litipk/flysystem-fallback-adapter)
- [Flysystem fallback adapter](https://github.com/thephpleague/flysystem-replicate-adapter)

Run the test
------------

[](#run-the-test)

```
composer install
vendor/bin/atoum
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~69 days

Total

4

Last Release

3085d ago

Major Versions

0.1.0 → 1.0.02017-05-06

### Community

Maintainers

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

---

Top Contributors

[![Grummfy](https://avatars.githubusercontent.com/u/668804?v=4)](https://github.com/Grummfy "Grummfy (2 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

flysystem-adapterphpfilesystemabstractioncloudfilesstoragefilesystemsflysystem-adapterfile systems

### Embed Badge

![Health badge](/badges/bepark-flysystem-fallback-to-read-only-adapter/health.svg)

```
[![Health](https://phpackages.com/badges/bepark-flysystem-fallback-to-read-only-adapter/health.svg)](https://phpackages.com/packages/bepark-flysystem-fallback-to-read-only-adapter)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[nimbusoft/flysystem-openstack-swift

Flysystem adapter for OpenStack Swift

44774.4k6](/packages/nimbusoft-flysystem-openstack-swift)[league/flysystem-async-aws-s3

AsyncAws S3 filesystem adapter for Flysystem.

2610.5M31](/packages/league-flysystem-async-aws-s3)[sausin/laravel-ovh

OVH Object Storage driver for laravel

40153.5k](/packages/sausin-laravel-ovh)[arhitector/yandex-disk-flysystem

The flysystem adapter for yandex disk rest api.

1210.1k](/packages/arhitector-yandex-disk-flysystem)

PHPackages © 2026

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