Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Flysystem Stream Wrapper Laravel Package

m2mtech/flysystem-stream-wrapper

Adds a PHP stream wrapper for Flysystem v2/v3 so you can use fly:// paths with native file functions (file_put_contents, mkdir, etc.). Includes Symfony Lock-based locking plus options to ignore visibility errors and emulate dir metadata.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Unified File Storage Abstraction: Enables a single interface for handling files across local, cloud (S3, GCS), and remote storage (SFTP, FTP) via Flysystem, reducing complexity in multi-environment deployments.
  • Roadmap for Scalable Media Handling: Supports future-proofing for video/audio streaming, large file uploads, or real-time file processing pipelines (e.g., AI/ML model training data).
  • Build vs. Buy: Avoids reinventing stream wrapper logic for Flysystem, saving dev time while maintaining flexibility for custom storage backends.
  • Use Cases:
    • Media Libraries: Serve user-uploaded files (images, videos) dynamically from any storage backend.
    • Backup Systems: Stream large backups directly to/from cloud storage without local caching.
    • Hybrid Architectures: Seamlessly integrate legacy systems (e.g., FTP-based) with modern cloud storage.

When to Consider This Package

  • Adopt if:
    • Your app uses Flysystem V2+ and needs stream-based file operations (e.g., fopen(), file_get_contents()).
    • You require low-latency access to files in non-local storage (e.g., S3, SFTP) without manual SDK calls.
    • Your team prioritizes consistency across storage backends (e.g., same code for local/dev/cloud/prod).
  • Look Elsewhere if:
    • You’re using Flysystem V1 or another file abstraction layer (e.g., League’s Flysystem without streams).
    • Your use case is simple (e.g., only local files or direct SDK usage).
    • You need advanced features like file locking, atomic writes, or custom metadata—consider extending Flysystem directly or using a higher-level package (e.g., spatie/flysystem-dropbox).

How to Pitch It (Stakeholders)

For Executives: "This package lets us treat all file storage—local servers, AWS S3, or even legacy FTP—as a single system. It’s like giving our app a ‘universal USB port’ for files: plug in any storage backend without rewriting core logic. For [X use case, e.g., scaling user uploads or migrating to cloud storage], it cuts dev time by 30% while future-proofing our infrastructure. MIT-licensed and battle-tested with Flysystem’s 200K+ installs."

For Engineering: *"The m2mtech/flysystem-stream-wrapper bridges Flysystem’s adapter pattern with PHP’s native stream functions (fopen(), stream_copy_to_stream()). Key wins:

  • Zero SDK bloat: Use file_get_contents('s3://bucket/file.txt') instead of manual S3 SDK calls.
  • Local dev parity: Test cloud storage locally with sftp:// or local:// wrappers.
  • Extensible: Hook into Flysystem’s events for custom logic (e.g., logging, encryption). Tradeoff: Adds a thin abstraction layer; best for teams already using Flysystem. Pair with [related tool, e.g., Laravel’s Filesystem] for full stack integration."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support