2017 © Pedro Peláez
 

library flysystem-fallback-to-read-only-adapter

Flystem adapter with a fallback to a read only flystem adapter

image

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

Flystem adapter with a fallback to a read only flystem adapter

  • Thursday, November 30, 2017
  • by Grummfy
  • Repository
  • 2 Watchers
  • 1 Stars
  • 166 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 14 % Grown

The README.md

Flysystem adapter with a fallback to a readonly adapter

Author Build Status Coverage Status Coverage Status Quality Score Software License Packagist Version Total Downloads, (*1)

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., (*2)

We develop it to allow us to easier manage some of non private data from development environment with prod data., (*3)

On the read only adapter you can: * read * list, (*4)

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

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

So when you have two adapters (A & 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)., (*7)

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., (*8)

Installation

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

Usage

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

Inspiration & similar adapters

Run the test

composer install
vendor/bin/atoum

The Versions

30/11 2017

dev-master

9999999-dev

Flystem adapter with a fallback to a read only flystem adapter

  Sources   Download

MIT

The Requires

 

The Development Requires

by jvb

filesystem cloud files storage abstraction filesystems file systems flysystem-adapter

30/11 2017

1.0.2

1.0.2.0

Flystem adapter with a fallback to a read only flystem adapter

  Sources   Download

MIT

The Requires

 

The Development Requires

by jvb

filesystem cloud files storage abstraction filesystems file systems flysystem-adapter

08/05 2017

1.0.1

1.0.1.0

Flystem adapter with a fallback to a read only flystem adapter

  Sources   Download

MIT

The Requires

 

The Development Requires

by jvb

filesystem cloud files storage abstraction filesystems file systems flysystem-adapter

06/05 2017

1.0.0

1.0.0.0

Flystem adapter with a fallback to a read only flystem adapter

  Sources   Download

MIT

The Requires

 

The Development Requires

by jvb

filesystem cloud files storage abstraction filesystems file systems flysystem-adapter

05/05 2017

0.1.0

0.1.0.0

Flystem adapter with a fallback to a read only flystem adapter

  Sources   Download

MIT

The Requires

 

by jvb

filesystem cloud files storage abstraction filesystems file systems flysystem-adapter