Skip to content

feat: support utopia-php/storage 3.0#209

Merged
loks0n merged 1 commit into
mainfrom
feat/utopia-storage-3
Jul 20, 2026
Merged

feat: support utopia-php/storage 3.0#209
loks0n merged 1 commit into
mainfrom
feat/utopia-storage-3

Conversation

@loks0n

@loks0n loks0n commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Adopts utopia-php/storage 3.0.0. Three changes:

  • getType() now returns the DeviceType enum, so the JSON and CSV sources compare against DeviceType::Local instead of the removed Storage::DEVICE_LOCAL constant.
  • setTransferChunkSize() was removed upstream in favour of a per-call argument: the JSON and CSV destinations pass Transfer::STORAGE_MAX_CHUNK_SIZE to transfer() directly.
  • composer.json requires utopia-php/storage: 3.* and php: >=8.5 (storage 3.0's floor — a version bump signal for maintainers: this likely warrants a minor at least).

Why

This release unblocks the Appwrite migration to storage 3.0 (appwrite/appwrite#12921), which is currently draft because this package pins storage 2.*.

Testing

  • composer lint (pint) passes
  • composer check (PHPStan level 3, src + tests) passes — it caught the two setTransferChunkSize() calls a plain grep missed
  • Unit suite: 62 tests / 380 assertions pass against storage 3.0.0, including the JSON/CSV export tests that exercise the Local device transfer path

🤖 Generated with Claude Code

- getType() comparisons use the DeviceType enum instead of the removed
  Storage::DEVICE_LOCAL constant (JSON and CSV sources)
- setTransferChunkSize() was removed upstream; the chunk size is now
  passed per transfer() call (JSON and CSV destinations)
- Require utopia-php/storage 3.* and PHP >= 8.5 (the storage floor)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@loks0n
loks0n merged commit 6681ffc into main Jul 20, 2026
4 checks passed
@loks0n
loks0n deleted the feat/utopia-storage-3 branch July 20, 2026 13:27
@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the migration library for storage 3.0. The main changes are:

  • PHP and utopia-php/storage requirements are raised.
  • CSV and JSON sources compare device types with the new enum.
  • CSV and JSON destinations pass the transfer chunk size per call.
  • The lockfile is refreshed for the new dependency set.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The API updates match the storage 3.0 migration described by the dependency change.
  • The CSV and JSON source and destination changes stay mirrored.

Important Files Changed

Filename Overview
composer.json Raises the PHP requirement and switches storage to the 3.x line.
composer.lock Refreshes the resolved dependency graph for the storage 3.0 update.
src/Migration/Sources/CSV.php Updates the local-device guard to compare against DeviceType::Local.
src/Migration/Sources/JSON.php Mirrors the CSV source update for JSON imports.
src/Migration/Destinations/CSV.php Moves chunk sizing from the removed setter to the CSV export transfer call.
src/Migration/Destinations/JSON.php Moves chunk sizing from the removed setter to the JSON export transfer call.

Reviews (1): Last reviewed commit: "feat: support utopia-php/storage 3.0" | Re-trigger Greptile

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