Skip to content

Commit 473b2ad

Browse files
pjcdawkinsclaude
andcommitted
feat: upgrade static-php-cli submodule to v2.7.5
Update the static-php-cli submodule from commit 4c55f4a2 to v2.7.5 (c5ae719b). Changes made to adapt to v2.7.5: - Replace legacy Docker build script approach with spc-alpine-docker tool. - Add ext/craft.yml to configure PHP extensions (curl, filter, openssl, pcntl, phar, posix, zlib). - Update Makefile to use new build command via spc-alpine-docker. The new version uses a unified craft.yml configuration format and bin/spc tool instead of the legacy docker/ directory with manual build scripts. Co-Authored-By: Claude <[email protected]>
1 parent b91a7e6 commit 473b2ad

File tree

5 files changed

+37
-135
lines changed

5 files changed

+37
-135
lines changed

Dockerfile.php

Lines changed: 0 additions & 80 deletions
This file was deleted.

Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,9 @@ internal/legacy/archives/php_darwin_$(GOARCH):
3737
rm -rf $(GOOS)
3838

3939
internal/legacy/archives/php_linux_$(GOARCH):
40-
cp ext/extensions.txt ext/static-php-cli/docker
41-
docker buildx build \
42-
--build-arg GOARCH=$(GOARCH) \
43-
--build-arg PHP_VERSION=$(PHP_VERSION) \
44-
--build-arg USE_BACKUP_ADDRESS=yes \
45-
--file=./Dockerfile.php \
46-
--platform=linux/$(GOARCH) \
47-
--output=type=local,dest=./internal/legacy/archives/ \
48-
--progress=plain \
49-
ext/static-php-cli/docker
40+
mkdir -p internal/legacy/archives
41+
cd ext/static-php-cli && SPC_USE_ARCH=$(GOARCH) ./bin/spc-alpine-docker build curl,filter,openssl,pcntl,phar,posix,zlib --build-cli --with-php=$(PHP_VERSION)
42+
cp ext/static-php-cli/buildroot/bin/php $(PHP_BINARY_PATH)
5043

5144
PHP_WINDOWS_REMOTE_FILENAME := "php-$(PHP_VERSION)-nts-Win32-vs16-x64.zip"
5245
internal/legacy/archives/php_windows.zip:

ext/craft.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# craft.yml configuration for building PHP CLI for Upsun CLI
2+
# This file configures static-php-cli v2.7.5+ to build a minimal PHP binary
3+
4+
php-version: "8.2"
5+
6+
extensions:
7+
- curl
8+
- filter
9+
- openssl
10+
- pcntl
11+
- phar
12+
- posix
13+
- zlib
14+
15+
libs: []
16+
17+
sapi:
18+
- cli
19+
20+
build-options:
21+
with-clean: false
22+
with-suggested-libs: false
23+
with-upx-pack: true
24+
with-strip-php: true
25+
26+
download-options:
27+
prefer-pre-built: true
28+
retry: 5
29+
30+
craft-options:
31+
doctor: true
32+
download: true
33+
build: true

ext/extensions.txt

Lines changed: 0 additions & 44 deletions
This file was deleted.

ext/static-php-cli

Submodule static-php-cli updated 591 files

0 commit comments

Comments
 (0)