Download the PHP package phpdot/filesystem without Composer
On this page you can find all versions of the php package phpdot/filesystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpdot/filesystem
More information about phpdot/filesystem
Files in phpdot/filesystem
Package filesystem
Short Description Coroutine-safe, PSR-native file storage for the PHPdot ecosystem: local and S3-compatible (AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces) over a PSR-18 + SigV4 client, with typed streams, resumable chunked uploads and first-class progress.
License MIT
Informations about the package filesystem
phpdot/filesystem
Coroutine-safe, PSR-native file storage. One FilesystemInterface spans local disk and S3-compatible
backends (AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces) through a hand-rolled PSR-18 + Signature V4
client — no AWS SDK. Bodies flow as PSR-7 streams with bounded memory, uploads are resumable, validation
is built in, and the server (not the browser) picks where bytes land.
Table of Contents
- Requirements
- Installation
- Usage
- Architecture
- Testing
- License
Requirements
| Requirement | Constraint |
|---|---|
| PHP | >= 8.5 |
ext-fileinfo |
* |
ext-hash |
* |
league/mime-type-detection |
^1.16 |
phpdot/console |
^0.2 |
psr/event-dispatcher |
^1.0 |
psr/http-client |
^1.0 |
psr/http-factory |
^1.0 |
psr/http-message |
^2.0 |
psr/http-server-handler |
^1.0 |
symfony/console |
^8.0 |
Bring any PSR-17/PSR-18 implementation. phpdot/container is a dev-only suggestion
(the binding attributes are inert without it).
Installation
Usage
You talk to one interface; swap the backend by swapping one binding. In a PHPdot application the container
auto-binds FilesystemInterface, so the wiring above disappears.
Beyond read/write/list, the package adds a collect-all validation pipeline (MIME, size, extension,
image dimensions over a bounded prefix), a token path generator ({date}/{uuid}/{hash}…) so the
server picks the key, an optional managed-files layer that persists a FileRecord per file with
soft-delete and quarantine, and a tus-compatible resumable upload endpoint plus CLI uploader.
Architecture
Filesystem is the operator — it drives an AdapterInterface (LocalAdapter native fopen/rename, or the
S3 adapter over a PSR-18 + SigV4 client with no AWS SDK) and a WriteContents pipeline that collapses a
string, stream, or uploaded file into one readable stream. Validation, path generation, and the resumable
upload engine sit alongside, and I/O goes non-blocking automatically under Swoole without any
ext-swoole dependency.
Testing
The unit suite (including the S3 client, signing vectors, and adapters against an in-memory HTTP client)
runs with no external services. The S3 integration suite connects to a real bucket and skips unless AWS
credentials and PHPDOT_S3_TEST_BUCKET are set.
License
MIT.
This repository is a read-only mirror, generated by CI from phpdot/monorepo. Pull requests and issues belong in the monorepo.
All versions of filesystem with dependencies
ext-fileinfo Version *
ext-hash Version *
league/mime-type-detection Version ^1.16
phpdot/console Version ^0.2
psr/event-dispatcher Version ^1.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
symfony/console Version ^8.0