Download the PHP package skyraptor/laravel-versioned-storage without Composer

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

Laravel Versioned Storage

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (master) Total Downloads

Store versioned files and directory snapshots on Laravel filesystem disks. Each write gets a unique path; the database tracks historical versions and which version is current. Failed uploads cannot publish a partial snapshot.

Installation

Requires PHP 8.3+, Laravel 12 or 13, and a Unix-like runtime with PCNTL, POSIX, and sockets. Native Windows PHP is unsupported; use WSL2 or a Linux container. Web uploads require PHP-FPM with a hard request termination limit.

The publish tag includes configuration and one initial-schema migration. To publish only the required migration, use laravel-versioned-storage-migrations; configuration is optional and uses laravel-versioned-storage-config.

Usage

Start with the application workflows and guarantees for the complete write/read/replace/stage/discard/cleanup lifecycle. You do not need to understand the internal components to use the package.

Files

put() accepts strings, streams, and Laravel File/UploadedFile objects. File versions are stored at <path>/<version>, not at the logical path. Read through this API rather than Storage::get($logicalPath).

Directory snapshots

Files live at <directory>/<version>/<file>. Each snapshot is independent: previous files are not copied. Write all contents before the callback returns. Paths are relative to the disk root/prefix; leading slashes are normalized.

Cleanup

Pass cleanup: true to retire previous versions:

Retired versions disappear from public reads and lists immediately, but their files remain until cleanup. Run or schedule:

Ensure Laravel's scheduler is running. Cleanup retries interrupted uploads and failed deletions; it returns a failure exit code if any operation fails. --chunk=20 changes the default concurrency batch size of 10. For synchronous, resource-specific cleanup, use VersionedStorage::cleanup($path) or $directory->cleanup().

Cleanup is not resource deletion: it preserves current versions, readable history not explicitly retired, and completed unpublished stages.

Deletion and discard

Discard a completed upload that you have not published:

Published snapshots cannot be discarded. To remove a child from a directory, publish a replacement containing only the files you want to keep. To remove older published history, publish with cleanup: true and run cleanup.

There is currently no supported consumer API to delete the current file/folder resource or one arbitrary published version. Do not delete version paths or package metadata manually. See deletion workflows and limitations.

Transactions

Uploads must run outside metadata transactions. Stage first, then publish on the same database connection as your application changes:

Use stageDirectory($path, $callback) for directories. Completed stages never expire automatically: publish or explicitly discard() them outside a transaction. After rollback, republish or discard. Across jobs/processes, pass $stage->version and reload with VersionedStorage::staged($uuid).

Configuration

Defaults in config/laravel-versioned-storage.php:

Configure the metadata connection before migrating. Override the disk per call with disk: 's3'. The same API is available through SkyRaptor\LaravelVersionedStorage\Facades\VersionedStorage.

Safety and constraints

Testing in Laravel Applications

Migrate the package tables and enable synchronous uploads in test setup:

Use DatabaseMigrations, not a setup wrapping uploads in database transactions. Enable the helper for each fresh application. It uses real package behavior but does not enforce hard timeouts; keep real-process timeout tests separate.

More

License

Library Integration Exception. Independent applications may retain their own license, including proprietary terms; the package and covered modifications retain applicable AGPL obligations. See COPYING for the full license.

By Patrick Henninger and contributors.


All versions of laravel-versioned-storage with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/concurrency Version ^12.0||^13.0
illuminate/database Version ^12.0||^13.0
illuminate/filesystem Version ^12.0||^13.0
illuminate/queue Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
league/flysystem-path-prefixing Version ^3.0
spatie/fork Version ^1.2.12
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 skyraptor/laravel-versioned-storage contains the following files

Loading the files please wait ...