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

Laravel Storage Copy Laravel Package

sykez/laravel-storage-copy

A small Laravel package for copying files and directories between storage disks, making it easy to move or duplicate content across local, S3, or other configured filesystems with a simple, fluent API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Ships as a Laravel service provider registering a single Artisan command; it is an operator tool, not a runtime library, so it introduces zero coupling to application domain code, middleware, or Eloquent models.
  • Operates through the Storage facade / Flysystem abstraction, meaning it inherits disk definitions from config/filesystems.php — same credentials, endpoints, and visibility rules the app already uses. No new secrets or infrastructure required.
  • This is the correct architectural shape for the problem: a thin imperative wrapper over adapters already installed in the host application.

Integration feasibility

  • Install via composer require, package auto-discovery (Laravel 5.5+), then invoke php artisan storage:copy .... No migrations, no published config (verify), no facade aliases.
  • Integration cost is measured in hours, not days. The real work is validating behavior against representative data, not wiring it up.

Technical risk

  • Maturity: 7 stars, 0 dependents, score 0.095 — effectively unvalidated in the wild. Single maintainer, likely bus factor of one.
  • Maintenance: Laravel major-version compatibility is not guaranteed; check the illuminate/support constraint and last release cadence before committing.
  • Data integrity: Unknown whether it streams (Flysystem readStream/writeStream) or buffers files into memory; unknown whether it verifies checksums, handles partial failure, or resumes. This is the dominant risk for anything beyond toy datasets.
  • Correctness surface: Recursive traversal, empty directories, symlinks, path normalization, visibility/metadata preservation, overwrite semantics, keys with spaces/unicode, S3 multipart thresholds.
  • Security: Runs with the app's disk credentials and inherits their scope. CLI-only, so no web attack surface. Licensing is clean (MIT).

Key questions

  1. What Laravel and PHP versions are supported, and what version constraint applies to illuminate/support?
  2. Does it stream files or buffer them in memory?
  3. Does it support recursive copies, and how are directories, visibility, and metadata handled?
  4. Is it idempotent? Overwrite, skip, or fail on existing destination files? Is there a --dry-run?
  5. Which disk pairings work — S3-to-S3, local-to-S3, SFTP, custom disks?
  6. Is there checksum/integrity verification, and can an interrupted run be resumed?
  7. Test coverage and CI status? Date of last commit/release?
  8. Known issues with large file counts or long-running invocations?
  9. Could we fork or vendor the command in under a day if abandoned? (Almost certainly yes.)

Integration Approach

Stack fit

  • Works in any Laravel application using the Storage facade and Flysystem adapters (local, S3, GCS, Azure, FTP/SFTP).
  • Best treated as a dev/ops dependency, not a production runtime dependency. Use composer require --dev if it is only invoked for environment migrations; if it must run inside a production deploy image, promote it to a regular require or vendor it.

Migration path

  • Purely additive. Add the package, run the command against a sandbox, diff source and destination with a manifest. No schema changes, no config migration.
  • Rollback is composer remove, which is a strong safety property for a tool in this class.

Compatibility

  • Pin the exact version in composer.json and test against the specific Laravel major in use.
  • Blast radius is limited to the disks you point it at: issue least-privilege credentials scoped to the specific bucket/prefix for the copy job rather than reusing broad application credentials.

Sequencing

  1. Inventory: enumerate source disks/paths, file counts, total bytes, largest single object, and key-format edge cases.
  2. Spike in sandbox: one small directory, one large file, one deeply nested tree, one empty directory, keys with spaces and unicode.
  3. Validate: byte-for-byte manifest comparison or checksum sampling.
  4. Staging run against staging buckets.
  5. Production run in a maintenance window or dual-write window; re-run for delta before cutover.
  6. Cutover and decommission.
  • For very large migrations (tens of GB+, millions of objects), evaluate rclone or native aws s3 sync instead — parallel, resumable, verifiable. Reserve this package for small, bounded, one-off copies where its simplicity is an asset.

Operational Impact

Maintenance

  • Low surface area (one command) but also a low maintenance signal. Assume the maintainer may disappear; plan to fork or vendor the single command file into the repo. Because the logic is thin, reimplementation as an in-house Artisan command is a credible fallback (~100–200 lines using Storage::allFiles, readStream, writeStream).

Support

  • No commercial support; community issues only. Internal ownership must be explicitly assigned, with a documented fork path and pinned version.

Scaling

  • Synchronous, single-process CLI. Throughput is bounded by serial round trips — noticeably slow for many small files across regions.
  • Watch PHP memory limits and S3 request rates/throttling. Chunk by prefix and run multiple invocations rather than attempting one monolithic run.

Failure modes

  • Partial copy on interruption with no built-in resume; requires idempotent skip logic or manual reconciliation.
  • Silent data issues: dropped visibility, dropped metadata, empty directories omitted.
  • Overwrites destination files without warning (verify).
  • Memory exhaustion on large files if not streamed.
  • Truncated destination objects on mid-object network failure, adapter-dependent.
  • Mitigations: dry-run, pre/post manifest diff, checksum verification, small batches, least-privilege credentials.

Ramp-up

  • Near zero for any Laravel developer — the mental model is literally Storage::copy. The actual cost is documentation: write an internal runbook covering disk configuration, batch strategy, verification, and rollback.

TPM recommendation: Viable as a small, low-blast-radius operational utility for bounded one-off copies inside an existing Laravel stack. Do not adopt it as a critical dependency or for large-scale migration without either forking it into your codebase or selecting a mature sync tool. Gate adoption on the key questions above; if those answers are unavailable, budget a few days to reimplement internally rather than inherit unverified behavior.

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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource