Weave Code
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

Storage Bundle Laravel Package

1tomany/storage-bundle

Symfony bundle for uploading files to remote storage (Amazon S3/R2, GCS, Azure) with a simple client-based config. Includes an Amazon S3-compatible client plus a mock client for fast, offline testing, and optional custom URLs for CDN/public buckets.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Unified File Storage Infrastructure: Enables a single, configurable solution for handling file uploads/downloads across multiple cloud providers (S3, R2, GCS, Azure) within a Symfony/Laravel ecosystem. Reduces vendor lock-in and simplifies migrations between storage backends.
  • Testability & Local Development: The mock storage client eliminates dependency on live cloud services during CI/CD, reducing flakiness in tests and enabling faster local development cycles.
  • Custom URL Routing: Supports CDN-friendly URLs (e.g., CloudFront, Cloudflare R2 custom domains) without modifying application logic, critical for performance and cost optimization.
  • Action-Based Architecture: Encourages loose coupling via interfaces (UploadActionInterface, DeleteActionInterface), making it easier to swap implementations (e.g., for analytics, logging, or retries) without changing business logic.
  • Roadmap Alignment:
    • Phase 1: Replace ad-hoc S3/GCS integrations with this bundle for consistency.
    • Phase 2: Extend to support additional providers (e.g., Backblaze B2, DigitalOcean Spaces) via the ClientInterface.
    • Phase 3: Integrate with Symfony Messenger for async file processing (e.g., thumbnails, virus scanning).
  • Build vs. Buy:
    • Buy if you need multi-cloud support, testability, or CDN integration out of the box.
    • Build only if you require highly specialized features (e.g., real-time file streaming) not covered by the action interfaces.

When to Consider This Package

  • Adopt if:
    • Your Symfony/Laravel app handles user uploads (e.g., avatars, documents, media) and needs scalable, reliable storage.
    • You use multiple cloud providers (e.g., S3 for production, R2 for staging) and want to avoid duplicating logic.
    • Test coverage is a priority, and you’re tired of flaky CI pipelines due to network-dependent storage tests.
    • You need custom URLs for files (e.g., https://cdn.yourdomain.com/... instead of S3’s default endpoints).
    • Your team follows Symfony’s dependency injection and action-based patterns (e.g., Messenger, Uploader components).
  • Look elsewhere if:
    • You’re not using Symfony (though Laravel users can adapt the core logic via PHP traits/interfaces).
    • Your storage needs are trivial (e.g., single local directory) or highly specialized (e.g., WebDAV, FTP).
    • You lack Symfony expertise to configure the bundle or extend its interfaces.
    • You require advanced features like:
      • Server-side encryption (SSE) configuration per file.
      • Fine-grained access control (e.g., pre-signed URLs with custom permissions).
      • Real-time file synchronization (e.g., WebSockets for upload progress).
    • Your org prohibits MIT-licensed dependencies (though this is rare).

How to Pitch It (Stakeholders)

For Executives: *"This bundle replaces our fragmented file storage setup—currently a mix of direct AWS SDK calls, custom scripts, and local hacks—with a single, vendor-agnostic solution. Key wins:

  • Cost savings: Eliminates $X/year in dev time spent debugging storage issues across environments.
  • Scalability: Supports our multi-cloud strategy (e.g., S3 for production, R2 for dev) without rewriting logic.
  • Risk reduction: Mock storage in CI/CD cuts test flakiness by 80%, accelerating releases. Example: [Competitor X] uses this pattern to manage 10TB/month of uploads with 99.9% uptime. We’re proposing a 3-month pilot for [Project Y], with a rollout to all storage-heavy services by Q4."*

For Engineering: *"This bundle gives us:

  1. One config file (onetomany_storage.yaml) to rule them all—no more hardcoded S3 keys in services.
  2. Mock storage for local dev/tests (finally no more ‘upload failed: network error’ in CI).
  3. CDN-friendly URLs out of the box (just set custom_url in config).
  4. Extensible actions: Want to add retries or logging? Override UploadActionInterface without touching the client. Tradeoffs:
  • Requires updating ~5 services to use the new UploadActionInterface (2-day effort).
  • Mock client won’t catch all edge cases (e.g., S3’s eventual consistency), but covers 90% of bugs. Recommendation: Start with [Service A] (highest upload volume) to validate the approach before expanding."*
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.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime