Skip to content

Update utopia-php/storage to 3.0 - #243

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

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

Conversation

@loks0n

@loks0n loks0n commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

Updates utopia-php/storage 2.0.5 → 3.0.0 (latest), with the code changes required by the 3.0 major.

Changes

  • composer.jsonutopia-php/storage: ^3.0; utopia-php/http bumped rc16 → rc18 (rc16 pinned utopia-php/validators ^0.2, conflicting with storage 3.0's 0.3.*).
  • StorageFactoryStorage::DEVICE_* constants are gone; switch on the DeviceType enum via tryFrom (unknown schemes still fall back to Local). Acl is now the Acl::Private enum.
  • MaintenanceDevice::getFiles() was removed and its replacement listFiles() is recursive/files-only, which doesn't fit listing top-level runtime dirs in /tmp; replaced with a plain glob() on the hostname prefix (also drops the now-redundant prefix check).
  • Docker — removed createDirectory() before the build-cache transfer(): it's no longer on the abstract Device (Local-only), Local creates parent dirs during upload, and S3-style devices never needed it.

Testing

  • composer analyze (phpstan) clean
  • composer test:unit — 20 tests, 72 assertions pass
  • composer format:check passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown

Greptile Summary

This PR upgrades the storage package to 3.0 and adapts the executor to its new API. The main changes are:

  • Storage device and ACL constants replaced with enums.
  • Temporary runtime discovery changed to a hostname-prefixed glob.
  • Explicit build-cache directory creation removed before transfer.
  • HTTP request types and related dependencies updated.

Confidence Score: 5/5

The latest changes look safe to merge.

  • No additional blocking issue remains after applying the follow-up selection scope.
  • The changed storage and cleanup paths produced no separate failure requiring another code change.

Important Files Changed

Filename Overview
app/controllers.php Updates injected request parameters to the request type provided by the newer HTTP package.
composer.json Updates the storage and HTTP dependency constraints.
composer.lock Locks storage 3.0, HTTP rc18, and their updated transitive dependencies.
src/Executor/Runner/Docker.php Removes explicit destination-directory creation before storing build-cache artifacts.
src/Executor/Runner/Maintenance.php Uses a hostname-prefixed glob to enumerate temporary runtime paths.
src/Executor/StorageFactory.php Migrates storage device selection and ACL values to storage 3.0 enums.

Reviews (2): Last reviewed commit: "Use Utopia\Http\Request in controllers f..." | Re-trigger Greptile

@@ -628,8 +628,6 @@ private function storeBuildCacheArtifact(string $cacheKey, string $tmpCache, Loc
$cacheDevice = $this->getBuildCacheDevice();
$destinationArtifact = $this->getBuildCacheArtifactPath($cacheDevice, $cacheKey);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Nested Cache Destination May Be Missing

When the build-cache device is local and the cache key maps to a nested path whose parent does not exist, this transfer now relies entirely on Local creating that parent. If that guarantee does not apply to device-to-device transfers, storing the cache returns false and every successful build loses its cache with a warning.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/Executor/Runner/Docker.php
Line: 630

Comment:
**Nested Cache Destination May Be Missing**

When the build-cache device is local and the cache key maps to a nested path whose parent does not exist, this transfer now relies entirely on `Local` creating that parent. If that guarantee does not apply to device-to-device transfers, storing the cache returns false and every successful build loses its cache with a warning.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code Fix in Codex

Comment thread src/Executor/Runner/Maintenance.php
rc18 reverted the PSR-7 server request interface, so injecting
ServerRequestInterface fails at runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@loks0n
loks0n merged commit 1e89ea7 into main Jul 22, 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