Download the PHP package quillstack/storage-interface without Composer

On this page you can find all versions of the php package quillstack/storage-interface. 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 storage-interface

Quillstack Storage Interface

Tests Latest Version Downloads PHP Version StyleCI CodeFactor Quality Gate Coverage Maintainability Reliability Security Maintainability License

Common interface for Storage classes. Full documentation: https://quillstack.org/storage-interface

Six methods, so that something writing files does not have to know which files. A package depending on this one works the same against the disk, against a bucket, or against something held in memory for a test.

Why this exists

Three packages in this framework read and write files — the cache, the logger and dotenv — and none of them should call file_put_contents itself, because then none of them can be tested without a disk.

So they take this interface, and a test hands them something that keeps files in an array. It is one interface with four methods, in its own package, so that depending on it does not mean depending on an implementation.

Requirements

Installation

Usage

Ask for the interface, not for an implementation:

Point it at whichever storage the application uses:

Technical documentation

Method Does
get(string $path): mixed reads what is there
exists(string $path): bool whether there is anything at that path
missing(string $path): bool the other way round, because !exists() reads worse
save(string $path, mixed $contents): bool writes, replacing whatever was there
add(string $path, mixed $contents): bool writes on the end of what is there
delete(string $path, string ...$more): bool removes one or several

What implements it

quillstack/queue writes messages through it, which is why a queue can be pointed somewhere other than the local disk without knowing it has been.

There is nothing to run here: a package which only names things has no behaviour to test.

Benchmark

There is nothing here to measure.

This package contains one interface and no code that runs. What it costs is an autoload of a few hundred bytes; what it does is entirely done by whatever implements it — which for a local disk is quillstack/local-storage, and that one is measured against league/flysystem in its own README.

A benchmark section that invented a number for an interface would be worse than one that says this.

Tests

The rest of Quillstack

This is one component of Quillstack, a PHP framework which is as simple to use as it is strict about what it does.

License

MIT. See LICENSE.


All versions of storage-interface with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
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 quillstack/storage-interface contains the following files

Loading the files please wait ...