chore: depend on released cache and mongo instead of patching vendor

The Dockerfile cloned utopia-php/monorepo and utopia-php/mongo at fixed
commits and copied their src/ over vendor/, driven by build args pinned in
the workflow:

    UTOPIA_CACHE_REFERENCE=d7c0806f...
    UTOPIA_MONGO_REFERENCE=daea8f82...

That was a vendor patch standing in for releases that did not exist yet.
Both now do, so the lock resolves them normally and the machinery goes.

    utopia-php/cache  4.0.1 -> 4.0.2  source 92e02dab6
    utopia-php/mongo         1.5.2    source 20f9a644a

Both lock references equal the Packagist source references exactly, and
each release contains the pinned commit: d7c0806f is an ancestor of the
cache/4.0.2 tag commit, and 1.5.2 contains daea8f82.

Constraints already admitted these (cache ^4.0.0, mongo 1.*), so only the
lock moved. Removing the build args also stops a Docker build fetching
arbitrary external git refs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Jake BarnbyandClaude Opus 5 committed 2026-08-12 21:25:37 +12:00
1 parent d875e118ea
commit fccb9abb1f
3 files changed
+8 -28

No files matched your search

-3
View File
@@ -25,9 +25,6 @@ jobs:
uses: docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6 # v3.3.1
with:
context: .
build-args: |
UTOPIA_CACHE_REFERENCE=d7c0806f9bbdafee794849398f65e8ece322711d
UTOPIA_MONGO_REFERENCE=daea8f8213c33f52e8b66d0f5366428bf2f5a4b8
push: false
tags: ${{ env.IMAGE }}
load: true
+1 -18
View File
@@ -1,8 +1,5 @@
FROM composer:2.8 AS composer
ARG UTOPIA_CACHE_REFERENCE=''
ARG UTOPIA_MONGO_REFERENCE=''
WORKDIR /usr/local/src/
COPY composer.lock /usr/local/src/
@@ -13,21 +10,7 @@ RUN composer install \
--optimize-autoloader \
--no-plugins \
--no-scripts \
--prefer-dist \
&& if [ -n "$UTOPIA_CACHE_REFERENCE" ] || [ -n "$UTOPIA_MONGO_REFERENCE" ]; then \
test -n "$UTOPIA_CACHE_REFERENCE" \
&& test -n "$UTOPIA_MONGO_REFERENCE" \
&& git init /tmp/utopia-cache \
&& git -C /tmp/utopia-cache remote add origin https://github.com/utopia-php/monorepo.git \
&& git -C /tmp/utopia-cache fetch --depth 1 origin "$UTOPIA_CACHE_REFERENCE" \
&& git -C /tmp/utopia-cache checkout --detach FETCH_HEAD \
&& cp -R /tmp/utopia-cache/packages/cache/src/. vendor/utopia-php/cache/src/ \
&& git init /tmp/utopia-mongo \
&& git -C /tmp/utopia-mongo remote add origin https://github.com/utopia-php/mongo.git \
&& git -C /tmp/utopia-mongo fetch --depth 1 origin "$UTOPIA_MONGO_REFERENCE" \
&& git -C /tmp/utopia-mongo checkout --detach FETCH_HEAD \
&& cp -R /tmp/utopia-mongo/src/. vendor/utopia-php/mongo/src/; \
fi
--prefer-dist
FROM php:8.5.8-cli-alpine AS compile
Generated
+7 -7
View File
@@ -2036,16 +2036,16 @@
},
{
"name": "utopia-php/cache",
"version": "4.0.1",
"version": "4.0.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cache.git",
"reference": "6f8cb03a5cb76e95b95a05103cd14cf782b8060f"
"reference": "92e02dab63606234b993b841ebf4c58845dd4620"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/6f8cb03a5cb76e95b95a05103cd14cf782b8060f",
"reference": "6f8cb03a5cb76e95b95a05103cd14cf782b8060f",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/92e02dab63606234b993b841ebf4c58845dd4620",
"reference": "92e02dab63606234b993b841ebf4c58845dd4620",
"shasum": ""
},
"require": {
@@ -2089,9 +2089,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/cache/issues",
"source": "https://github.com/utopia-php/cache/tree/4.0.1"
"source": "https://github.com/utopia-php/cache/tree/4.0.2"
},
"time": "2026-08-04T00:06:02+00:00"
"time": "2026-08-12T07:48:59+00:00"
},
{
"name": "utopia-php/circuit-breaker",
@@ -4648,5 +4648,5 @@
"ext-redis": "*"
},
"platform-dev": {},
"plugin-api-version": "2.6.0"
"plugin-api-version": "2.9.0"
}