Skip to content

Update utopia-php/storage to 4.0 - #245

Merged
loks0n merged 2 commits into
mainfrom
chore/update-storage-4.0
Jul 23, 2026
Merged

Update utopia-php/storage to 4.0#245
loks0n merged 2 commits into
mainfrom
chore/update-storage-4.0

Conversation

@loks0n

@loks0n loks0n commented Jul 23, 2026

Copy link
Copy Markdown
Member

What

Updates executor to the stable utopia-php/storage 4.0.0 release and migrates to its breaking streaming API:

  • Replaces four cross-device transfer() calls with copy() for source downloads, build artifact uploads, and build-cache restore/store.
  • Explicitly casts the four Local log/error read() streams to strings where executor response assembly requires strings.
  • Updates the direct constraint to ^4.0 and locks storage 4.0.0; no transitive packages change.

Storage 4.0 changes and executor impact

  • Storage I/O is streams-only: read() returns StreamInterface, while write() and upload() consume streams. Source, artifact, and cache copies no longer require whole payload strings in executor memory.
  • copy() replaces transfer() and centralizes bounded cross-device streaming, retaining chunked multipart upload and abort-on-failure behavior.
  • S3 downloads stream into temporary storage as bytes arrive instead of buffering the complete response body in PHP memory.
  • S3-family adapters require injected HTTP clients to implement both PSR-18 and the streaming client interface. Executor uses the library default client, which satisfies both interfaces, so StorageFactory needs no client migration.
  • Same-device S3 copies can run provider-side when the adapter knows its bucket. Current executor flows copy between remote and Local devices, so their behavior remains cross-device streaming.
  • Runtime log and error files still become strings at the response boundary by design; executor already caps these reads at MAX_LOG_SIZE.
  • Multipart upload verbs are simplified (prepareUpload/finalizeUpload/uploadData become prepare/finalize/upload), but executor does not call those lower-level methods directly.

Storage release: https://github.com/utopia-php/storage/releases/tag/4.0.0

Upstream comparison: utopia-php/monorepo@storage/3.1.0...storage/4.0.0

Verification

Run against stable storage 4.0.0:

  • composer test:unit — 20 tests, 72 assertions
  • composer analyze — no errors
  • composer format:check — passed
  • composer refactor:check — clean
  • composer audit — no security advisories
  • git diff --check — clean

composer validate --strict reports only the existing exact-version warning for utopia-php/http.

The E2E suite requires the full Docker runtime stack and is left to CI.

@loks0n
loks0n marked this pull request as ready for review July 23, 2026 20:54
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown

Greptile Summary

Updates executor to Utopia Storage 4.0 and adapts to its streaming API.

  • Replaces cross-device transfer() calls with copy() for source, artifact, and build-cache operations.
  • Converts streamed log and error reads to strings at the response boundary.
  • Updates the Composer constraint and lockfile to storage 4.0.0 without changing transitive dependencies.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code defects identified.

The dependency update is accompanied by the required call-site migrations while preserving source and destination ordering, failure handling, bounded log reads, and response string contracts.

Important Files Changed

Filename Overview
composer.json Updates the direct utopia-php/storage dependency constraint from ^3.1 to ^4.0.
composer.lock Locks utopia-php/storage at 4.0.0 with matching source and distribution metadata.
src/Executor/Runner/Docker.php Migrates four cross-device operations to copy() and materializes streamed log and error reads as strings.

Reviews (1): Last reviewed commit: "Use stable storage 4.0 release" | Re-trigger Greptile

@loks0n
loks0n merged commit cd28e73 into main Jul 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant