Download the PHP package brianhenryie/bh-php-flysystem-readonly without Composer

On this page you can find all versions of the php package brianhenryie/bh-php-flysystem-readonly. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bh-php-flysystem-readonly

Flysystem 2 | 3 [PHP 7.4 | 8.x]() PHPCS PEAR

Flysystem Read-Only Adapter

A League Flysystem adapter which wraps another adapter: reads pass through to it, writes and deletes are captured in memory. The underlying filesystem is never modified, but code running on top of it sees its own changes as though they had been written. Uses league/flysystem-memory to store changes.

Created to use for --dry-run mode needs: the whole program runs normally – writing files, deleting them, listing directories, reading back what it just wrote – and nothing reaches the disk. This was extracted from Strauss, where it implements strauss --dry-run.

Install

Use

How it works

Three layers are consulted, in order:

Layer Contents
deleted files tombstones written by delete(); directory tombstones recorded by deleteDirectory()
modified files everything written during this session, in an in-memory adapter
delegate the real filesystem, read-only

So read() throws if the path was deleted, returns the in-memory copy if it was written, and otherwise reads from the delegate. listContents() merges the delegate's listing with the in-memory one, removing deleted paths and preferring the in-memory version of any path present in both.

Mutating operations only ever touch the in-memory layers. setVisibility() on a file which exists only on the delegate filesystem first copies that file into memory – so the whole file is read into memory, as it also is for copy() and move().

Path normalization

A PathNormalizer may be injected; it defaults to League's WhitespacePathNormalizer (which, among other things, strips the leading / so paths match those returned by the adapters' directory listings).

The normalizer is applied by this adapter and again by the in-memory layers it delegates to, so an injected normalizer must be idempotent: normalize(normalize($path)) === normalize($path).

Flysystem 2 and 3

league/flysystem 3 added directoryExists() to FilesystemAdapter and FilesystemReader, and has() to FilesystemReader. Two traits back-fill them, calling the genuine parent implementation when it exists:

These require the class using the trait to implement ::normalizePath().

PHP Flysystem 2 Flysystem 3
7.4 – (requires PHP 8.0.2)
8.0 – 8.4

Known limitations

Tests

Credits

Handwritten by Brian Henry for Strauss then extracted by Claude.


All versions of bh-php-flysystem-readonly with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-fileinfo Version *
league/flysystem Version ^2.5 || ^3.0
league/flysystem-memory Version ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brianhenryie/bh-php-flysystem-readonly contains the following files

Loading the files please wait ...