Skip to content

Commit fccb9ab

Browse files
abnegateclaude
andcommitted
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>
1 parent d875e11 commit fccb9ab

3 files changed

Lines changed: 8 additions & 28 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
uses: docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6 # v3.3.1
2626
with:
2727
context: .
28-
build-args: |
29-
UTOPIA_CACHE_REFERENCE=d7c0806f9bbdafee794849398f65e8ece322711d
30-
UTOPIA_MONGO_REFERENCE=daea8f8213c33f52e8b66d0f5366428bf2f5a4b8
3128
push: false
3229
tags: ${{ env.IMAGE }}
3330
load: true

‎Dockerfile‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM composer:2.8 AS composer
22

3-
ARG UTOPIA_CACHE_REFERENCE=''
4-
ARG UTOPIA_MONGO_REFERENCE=''
5-
63
WORKDIR /usr/local/src/
74

85
COPY composer.lock /usr/local/src/
@@ -13,21 +10,7 @@ RUN composer install \
1310
--optimize-autoloader \
1411
--no-plugins \
1512
--no-scripts \
16-
--prefer-dist \
17-
&& if [ -n "$UTOPIA_CACHE_REFERENCE" ] || [ -n "$UTOPIA_MONGO_REFERENCE" ]; then \
18-
test -n "$UTOPIA_CACHE_REFERENCE" \
19-
&& test -n "$UTOPIA_MONGO_REFERENCE" \
20-
&& git init /tmp/utopia-cache \
21-
&& git -C /tmp/utopia-cache remote add origin https://github.com/utopia-php/monorepo.git \
22-
&& git -C /tmp/utopia-cache fetch --depth 1 origin "$UTOPIA_CACHE_REFERENCE" \
23-
&& git -C /tmp/utopia-cache checkout --detach FETCH_HEAD \
24-
&& cp -R /tmp/utopia-cache/packages/cache/src/. vendor/utopia-php/cache/src/ \
25-
&& git init /tmp/utopia-mongo \
26-
&& git -C /tmp/utopia-mongo remote add origin https://github.com/utopia-php/mongo.git \
27-
&& git -C /tmp/utopia-mongo fetch --depth 1 origin "$UTOPIA_MONGO_REFERENCE" \
28-
&& git -C /tmp/utopia-mongo checkout --detach FETCH_HEAD \
29-
&& cp -R /tmp/utopia-mongo/src/. vendor/utopia-php/mongo/src/; \
30-
fi
13+
--prefer-dist
3114

3215
FROM php:8.5.8-cli-alpine AS compile
3316

‎composer.lock‎

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)