Download the PHP package contenir/contenir-storage without Composer

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

contenir/contenir-storage

Formerly contenir/storage; the old package is abandoned in favour of this one.

Continuous Integration codecov

Framework-agnostic asset storage for Contenir CMS.

One StorageInterface for storing, listing, renaming and deleting CMS assets on a local filesystem, an S3-compatible bucket (AWS S3, Cloudflare R2, MinIO) or behind Cloudflare's URL image transforms, with a shared pipeline of named image variants (thumbnails, responsive ladders, AVIF/WebP siblings).

Requirements

Install

Add league/flysystem-aws-s3-v3 when you use an S3-compatible bucket:

The 0.x releases, which support PHP 8.1, remain available from the 0.x branch and v0.* tags; see UPGRADE-2.0.md.

Usage

From configuration

By hand

The storage contract

Method Purpose
store(UploadInput, string $directory): Entry Save an upload under a detected-type name and generate its variants
url(string $path, ?string $variant = null): ?string Public URL, or null when the asset or variant is missing
thumbnailUrl(string $path): ?string url($path, 'admin-thumb'), null when the variant is not declared
urlsForKey(string $path): list<string> Every URL a CDN might cache for the asset (for purges)
variantUrls(string $path, string $variant): array<string, string> Per-format variant URLs, built without I/O
list(string $path, ?ListOptions): iterable<Entry> Browse a directory, filtered and sorted
exists(string $path): bool Whether the asset exists
delete(string $path): void Delete the asset and every variant sibling
rename(string $from, string $to): void Move the asset and its variant siblings
imageMeta(string $path): ImageMeta Width, height and MIME of an image
regenerateMissingVariants(string $path): list<string> Backfill variants the asset is missing

Optional capabilities are separate interfaces: MissingVariantsReporterInterface (audit without writing), BulkDeleteInterface (delete an exact key list) and OnDemandVariantGeneratorInterface (materialise one variant from its key).

Documentation

Development

The QA toolchain is contenir/contenir-qa-tools. Mago is a standalone binary, installed separately (brew install mago).

No test talks to a real cloud service. S3 behaviour is exercised against an in-memory Flysystem double (tests/TestAsset/Flysystem/FailingFilesystem).

License

MIT. See LICENSE.


All versions of contenir-storage with dependencies

PHP Build Version
Package Version
Requires php Version ~8.3.0 || ~8.4.0 || ~8.5.0
league/flysystem Version ^3.29
psr/log Version ^1.1 || ^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 contenir/contenir-storage contains the following files

Loading the files please wait ...