Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
4f76942
toolchain fixes forward port from v2-pgo
henderkes May 10, 2026
6e32672
better deduplicate_flags
henderkes May 11, 2026
efdd2a7
update libraries to honour user flags
henderkes May 11, 2026
743934d
use resolved dependency tree instead of asking for with_suggests ever…
henderkes May 11, 2026
7e6e9d8
add pgo capabilities v3 style
henderkes May 11, 2026
bfaa7eb
Merge remote-tracking branch 'origin/v3' into feat/pgo-v3
henderkes May 11, 2026
a585359
reset registry
henderkes May 11, 2026
4172508
use {pkg_root_path} for packages, otherwise containers get confused w…
henderkes May 12, 2026
270e2d6
cant reset it because of the same reason x(
henderkes May 12, 2026
c1c34d8
trust filesystem, not downloads
henderkes May 12, 2026
8453f69
fix BUILD_CC=cc workaround root cause (minijit trips zig default unde…
henderkes May 12, 2026
57ef042
fix phpunit failure
henderkes May 12, 2026
defd50f
wrong exception type
henderkes May 12, 2026
814014e
array
henderkes May 12, 2026
2415b7d
we don't need this anymore
henderkes May 12, 2026
4754faf
also build curl exe on windows
henderkes May 12, 2026
445c0b3
don't add fno-sanitize=undefined for library builds
henderkes May 12, 2026
9addbe2
oops
henderkes May 12, 2026
b880ef7
allow * stage to subscribe to everything
henderkes May 12, 2026
db794bf
strange shit
henderkes May 12, 2026
09de4c9
drop ldflags fron watcher-c
henderkes May 15, 2026
6fda358
--build-frankenphp didn't actually build frankenphp
henderkes May 15, 2026
a88e426
clean cgo cache before rebuilding frankenphp (reports wrong version f…
henderkes May 15, 2026
70e717a
fix version reevaluating regression from v2
henderkes May 15, 2026
1707d21
don't extract local sources
henderkes May 15, 2026
4b19f4e
forward port #1138
henderkes May 15, 2026
07aae79
forward port #1142
henderkes May 16, 2026
19d1379
better cross compile compatibility
henderkes May 17, 2026
697040b
Trim base namespace for registry
crazywhalecc May 18, 2026
fdc75cb
Allow vendor mode loading default registry file
crazywhalecc May 18, 2026
ce70c0d
Register artifacts dynamically if not already initialized
crazywhalecc May 18, 2026
f27ec77
Refactor clang runtime bits support for zig integration
crazywhalecc May 18, 2026
32da708
Change gettext-win base to 0.18 (master is 1.0 now)
crazywhalecc May 18, 2026
3eca044
Whoops
crazywhalecc May 18, 2026
7bb4a09
turn llvm-tools into a doctor check. llvm-runtime is a target now
henderkes May 19, 2026
efa7946
build in SOURCE_PATH
henderkes May 19, 2026
b38c7b2
install runtime rt after zig init
henderkes May 19, 2026
433043c
fix macOS
henderkes May 19, 2026
f1525c0
Merge branch 'v3' into feat/pgo-v3
henderkes May 20, 2026
6fe55a4
Merge branch 'v3' into feat/pgo-v3
crazywhalecc May 22, 2026
735f126
Update discord invite link
crazywhalecc May 22, 2026
a23ad55
Add preInstall stage
crazywhalecc May 22, 2026
9d508f1
forward port v2 pgo changes
henderkes May 22, 2026
c40d069
address #1155
henderkes May 22, 2026
d93fdd9
use github tokens for package downloads
henderkes May 22, 2026
3c24c92
mongodb: export PHP_VERSION_ID for in-tree builds
luthermonson May 22, 2026
713f825
mongodb: export PHP_VERSION_ID for in-tree builds (#1156)
henderkes May 23, 2026
e7fb1e2
backport fixes from v2
henderkes May 23, 2026
1ae989d
simplify common zig code paths
henderkes May 23, 2026
203fed6
dont pass shared extension packages to SPCConfigUtil for building php…
henderkes May 23, 2026
5bdcd3f
dont pass all static exts to frankenphp build either
henderkes May 23, 2026
6ab52a5
cxxflags in spcconfigutil
henderkes May 23, 2026
80d8107
backport v2 passing correct libraries, not all
henderkes May 24, 2026
fe4803c
run shared ext builds after frankenphp build
henderkes May 24, 2026
15deecd
Merge remote-tracking branch 'origin/v3' into feat/pgo-v3
henderkes May 24, 2026
f068911
revert
henderkes May 24, 2026
d846db2
forward v2 fix
henderkes May 26, 2026
69d0f9b
remove SPC_ARCH
henderkes May 29, 2026
2d5abd3
micro patch for cross-arch 32 bit builds
henderkes May 29, 2026
d52ba59
fix SourcePatcher::patchHardcodedINI method signature
henderkes May 30, 2026
5747a56
build shared extensions before frankenphp
henderkes Jun 2, 2026
3b8abda
add libclang.cpu.a
henderkes Jun 9, 2026
8f557aa
forward-port feat/pgo fixes
henderkes Jul 9, 2026
6b6a099
fix gmssl and event properly..
henderkes Jul 9, 2026
a65441b
dont pass invalid empty gh token
henderkes Jul 9, 2026
6060a6c
blub
henderkes Jul 20, 2026
404b2dc
fix smth
henderkes Jul 21, 2026
1778032
fix swoole trying to load under fpm/frankenphp
henderkes Jul 21, 2026
9bceaac
update extensions from pecl to pie
henderkes Jul 21, 2026
15e2b7b
simpler fix for swoole
henderkes Jul 21, 2026
b437b2f
default extract for pie sources
henderkes Jul 21, 2026
0299ed5
default extract for pie source number 2
henderkes Jul 21, 2026
81213f5
extract shared-only extensions into their own folder
henderkes Jul 22, 2026
6ba9cd2
pecl for those
henderkes Jul 22, 2026
ed0863d
imagick on pecl too, version substitute...
henderkes Jul 22, 2026
347a3c3
move opentelemetry back to PIE
henderkes Jul 22, 2026
3b425b6
igbinary PIE
henderkes Jul 23, 2026
3bd142a
extra ldflags Libphp.so
henderkes Jul 31, 2026
02df4a2
Update ext-event.yml
henderkes Jul 31, 2026
a5a8d0e
php 8.6 compatibility with all bundled extensions
henderkes Aug 7, 2026
38ad355
test: use source.build-root in getSourceRoot test
henderkes Aug 7, 2026
de3ee11
more fixes for 8.6
henderkes Aug 8, 2026
600d08e
more fixes for 8.6
henderkes Aug 8, 2026
657960d
update php-rar
henderkes Aug 9, 2026
341d82d
php 8.6.0~beta1 compatibility
henderkes Aug 12, 2026
497ebae
php 8.6.0~beta1 compatibility 2
henderkes Aug 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ chmod +x ./spc
首先,创建 `craft.yml` 文件,并从 [扩展列表](https://static-php.dev/en/guide/extensions.html) 或 [命令生成器](https://static-php.dev/en/guide/cli-generator.html) 指定要包含的扩展:

```yml
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5, 8.6 (pre-release)
php-version: 8.5
# Put your extension list here
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

## Features

- :elephant: Support multiple PHP versions - PHP 8.1, 8.2, 8.3, 8.4, 8.5
- :elephant: Support multiple PHP versions - PHP 8.1, 8.2, 8.3, 8.4, 8.5, 8.6 (pre-release)
- :handbag: Build single-file PHP executable with zero dependencies
- :hamburger: Build **[phpmicro](https://github.com/static-php/phpmicro)** self-extracting executables (combines PHP binary and source code into one file)
- :pill: Automatic build environment checker with auto-fix capabilities
Expand Down Expand Up @@ -63,7 +63,7 @@ chmod +x ./spc
First, create a `craft.yml` file and specify which extensions you want to include from [extension list](https://static-php.dev/en/guide/extensions.html) or [command generator](https://static-php.dev/en/guide/cli-generator.html):

```yml
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5
# PHP version support: 8.1, 8.2, 8.3, 8.4, 8.5, 8.6 (pre-release)
php-version: 8.5
# Put your extension list here
extensions: "apcu,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,readline,redis,session,simplexml,sockets,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,xsl,zip,zlib"
Expand Down
10 changes: 8 additions & 2 deletions config/env.ini
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ SPC_TARGET=${GNU_ARCH}-linux-musl
CC=${SPC_DEFAULT_CC}
CXX=${SPC_DEFAULT_CXX}
AR=${SPC_DEFAULT_AR}
RANLIB=${SPC_DEFAULT_RANLIB}
LD=${SPC_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_CFLAGS="-fPIC -O3 -pipe -fno-plt -fno-semantic-interposition -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
SPC_DEFAULT_CFLAGS="-fPIC -O3 -pipe -fno-plt -fno-semantic-interposition -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections -Wno-unused-command-line-argument"
SPC_DEFAULT_CXXFLAGS="${SPC_DEFAULT_CFLAGS}"
SPC_DEFAULT_LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -Wl,-z,noexecstack -Wl,--gc-sections"
; upx executable path
Expand All @@ -120,11 +121,13 @@ SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable
; embed type for php, static (libphp.a) or shared (libphp.so)
SPC_CMD_VAR_PHP_EMBED_TYPE="static"
; EXTRA_CFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ${SPC_DEFAULT_CFLAGS}"
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden ${SPC_DEFAULT_CFLAGS}"
; EXTRA_CXXFLAGS for `configure` and `make` php
SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ${SPC_DEFAULT_CXXFLAGS}"
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
; EXTRA_LDFLAGS_PROGRAM for `make` php; appended only to SAPI executable links (cli/fpm/cgi/micro/embed). Used by PGO to inject -fprofile-use= without polluting libphp.{a,so}.
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM=""

; optional, path to openssl conf. This affects where openssl will look for the default CA.
; default on Debian/Alpine: /etc/ssl, default on RHEL: /etc/pki/tls
Expand All @@ -140,6 +143,7 @@ SPC_USE_LLVM=system
CC=${SPC_DEFAULT_CC}
CXX=${SPC_DEFAULT_CXX}
AR=${SPC_DEFAULT_AR}
RANLIB=${SPC_DEFAULT_RANLIB}
LD=${SPC_DEFAULT_LD}
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
SPC_DEFAULT_CFLAGS="--target=${MAC_ARCH}-apple-darwin -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffunction-sections -fdata-sections"
Expand All @@ -163,5 +167,7 @@ SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -fvis
SPC_CMD_VAR_PHP_MAKE_EXTRA_CXXFLAGS="-g -fstack-protector-strong -fno-ident -fpie -fvisibility=hidden -fvisibility-inlines-hidden -Werror=unknown-warning-option ${SPC_DEFAULT_CXXFLAGS}"
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.dylib
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
; EXTRA_LDFLAGS_PROGRAM for `make` php; appended only to SAPI executable links (cli/fpm/cgi/micro/embed). Used by PGO to inject -fprofile-use= without polluting libphp.{a,dylib}.
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM=""
; minimum compatible macOS version (LLVM vars, availability not guaranteed)
MACOSX_DEPLOYMENT_TARGET=12.0
2 changes: 1 addition & 1 deletion config/pkg/ext/builtin-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ ext-pdo_pgsql:
- ext-pgsql
- postgresql
php-extension:
arg-type@unix: with-path
arg-type@unix: custom
arg-type@windows: '--with-pdo-pgsql=yes'
ext-pdo_sqlite:
type: php-extension
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-amqp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-amqp:
type: php-extension
artifact:
source:
type: pecl
name: amqp
type: pie
repo: php-amqp/php-amqp
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-apcu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-apcu:
type: php-extension
artifact:
source:
type: pecl
name: APCu
type: pie
repo: apcu/apcu
metadata:
license-files: [LICENSE]
license: PHP-3.01
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-ast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-ast:
type: php-extension
artifact:
source:
type: pecl
name: ast
type: pie
repo: nikic/php-ast
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
7 changes: 4 additions & 3 deletions config/pkg/ext/ext-brotli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ ext-brotli:
type: php-extension
artifact:
source:
type: git
type: ghtagtar
repo: kjdev/php-ext-brotli
extract: php-src/ext/brotli
rev: master
url: 'https://github.com/kjdev/php-ext-brotli'
metadata:
license-files: [LICENSE]
license: MIT
depends:
- brotli
php-extension:
arg-type: '--enable-brotli@shared_suffix@ --with-libbrotli'
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-dio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-dio:
type: php-extension
artifact:
source:
type: pecl
name: dio
type: pie
repo: pecl/dio
metadata:
license-files: [LICENSE]
license: PHP-3.01
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-ev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-ev:
type: php-extension
artifact:
source:
type: pecl
name: ev
type: pie
repo: osmanov/pecl-ev
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-event:
type: php-extension
artifact:
source:
type: url
url: 'https://bitbucket.org/osmanov/pecl-event/get/3.1.4.tar.gz'
type: pecl
name: event
extract: php-src/ext/event
metadata:
license-files: [LICENSE]
Expand Down
5 changes: 3 additions & 2 deletions config/pkg/ext/ext-excimer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ext-excimer:
type: php-extension
artifact:
source:
type: pecl
name: excimer
type: ghtagtar
repo: wikimedia/mediawiki-php-excimer
extract: php-src/ext/excimer
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
20 changes: 20 additions & 0 deletions config/pkg/ext/ext-fastchart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ext-fastchart:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/fastchart
extract: php-src/ext/fastchart
prefer-stable: true
metadata:
license-files: [LICENSE]
depends:
- freetype
suggests:
- libpng
- libjpeg
- libwebp
php-extension:
os:
- Linux
- Darwin
14 changes: 14 additions & 0 deletions config/pkg/ext/ext-fastjson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ext-fastjson:
type: php-extension
artifact:
source:
type: ghtar
repo: iliaal/fastjson
extract: php-src/ext/fastjson
prefer-stable: true
metadata:
license-files: [LICENSE]
php-extension:
os:
- Linux
- Darwin
5 changes: 3 additions & 2 deletions config/pkg/ext/ext-gearman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ext-gearman:
type: php-extension
artifact:
source:
type: pecl
name: gearman
type: ghtar
repo: php/pecl-networking-gearman
extract: php-src/ext/gearman
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
2 changes: 2 additions & 0 deletions config/pkg/ext/ext-gmssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ ext-gmssl:
license: PHP-3.01
depends:
- gmssl
php-extension:
arg-type: with-path
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-grpc:
type: php-extension
artifact:
source:
type: pecl
name: grpc
type: pie
repo: grpc/grpc-php-ext
metadata:
license-files: [LICENSE]
license: Apache-2.0
Expand Down
6 changes: 4 additions & 2 deletions config/pkg/ext/ext-igbinary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ ext-igbinary:
type: php-extension
artifact:
source:
type: pecl
name: igbinary
type: pie
repo: igbinary/igbinary
prefer-stable: false
extract: php-src/ext/igbinary
metadata:
license-files: [COPYING]
license: BSD-3-Clause
Expand Down
5 changes: 3 additions & 2 deletions config/pkg/ext/ext-imap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ext-imap:
type: php-extension
artifact:
source:
type: pecl
name: imap
type: ghtagtar
repo: php/pecl-mail-imap
extract: php-src/ext/imap
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-inotify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-inotify:
type: php-extension
artifact:
source:
type: pecl
name: inotify
type: pie
repo: arnaud-lb/inotify
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
5 changes: 3 additions & 2 deletions config/pkg/ext/ext-memcache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ext-memcache:
type: php-extension
artifact:
source:
type: pecl
name: memcache
type: ghtar
repo: websupport-sk/pecl-memcache
extract: php-src/ext/memcache
metadata:
license-files: [LICENSE]
license: PHP-3.0
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-memcached.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-memcached:
type: php-extension
artifact:
source:
type: pecl
name: memcached
type: pie
repo: php-memcached/php-memcached
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-msgpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-msgpack:
type: php-extension
artifact:
source:
type: pecl
name: msgpack
type: pie
repo: msgpack/msgpack-php
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
Expand Down
2 changes: 1 addition & 1 deletion config/pkg/ext/ext-mysqlnd_ed25519.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ext-mysqlnd_ed25519:
source:
type: pie
repo: mariadb/mysqlnd_ed25519
extract: php-src/ext/mysqlnd_ed25519
extract: mysqlnd_ed25519
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
Expand Down
2 changes: 1 addition & 1 deletion config/pkg/ext/ext-mysqlnd_parsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ext-mysqlnd_parsec:
source:
type: pie
repo: mariadb/mysqlnd_parsec
extract: php-src/ext/mysqlnd_parsec
extract: mysqlnd_parsec
metadata:
license-files: [LICENSE]
license: BSD-3-Clause
Expand Down
5 changes: 3 additions & 2 deletions config/pkg/ext/ext-opentelemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ext-opentelemetry:
type: php-extension
artifact:
source:
type: pecl
name: opentelemetry
type: pie
repo: open-telemetry/ext-opentelemetry
build-root: ext

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

How about subdir? build-root is definitely ambiguous. Also, move all the previous metadata.source-root here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

build-dir?

subdir doesn't say what that directory is used for

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Keep using source-root? build-dir sounds ambiguous too (out-of-source building). The name source-root also corresponds to our API getSourceRoot(). Although it still doesn't accurately describe our needs, it essentially redirects the source root.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Two diffrremt things, we need both of them.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Another approach is to completely redirect everything using source-root, eliminating the need to worry about subdirectories during in-tree extension builds:

  1. All artifacts are uniformly extracted to source/{name}
  2. During static compilation of PHP extensions, a symbolic link is created to the root directory or the specified source-root to php-src/ext/{name}
  3. Shared extensions remain unaffected

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

After doing this, our previous source-root and the current source-root for PHP extensions are actually the same thing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Are you sure that doesn't have edge cases with extension configs resolving to absolute paths before? If it's working with all extensions I think that's a good idea.

metadata:
license-files: [LICENSE]
license: Apache-2.0
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-parallel:
type: php-extension
artifact:
source:
type: pecl
name: parallel
type: pie
repo: pecl/parallel
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
5 changes: 3 additions & 2 deletions config/pkg/ext/ext-pcov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ ext-pcov:
type: php-extension
artifact:
source:
type: pecl
name: pcov
type: pie
repo: pecl/pcov
extract: pcov
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
8 changes: 4 additions & 4 deletions config/pkg/ext/ext-rar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ ext-rar:
type: php-extension
artifact:
source:
type: git
url: 'https://github.com/static-php/php-rar.git'
rev: issue-php82
extract: php-src/ext/rar
type: ghrel
repo: cataphract/php-rar
match: rar-.+\.tgz
prefer-stable: true
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
4 changes: 2 additions & 2 deletions config/pkg/ext/ext-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext-redis:
type: php-extension
artifact:
source:
type: pecl
name: redis
type: pie
repo: phpredis/phpredis
metadata:
license-files: [LICENSE]
license: PHP-3.01
Expand Down
1 change: 0 additions & 1 deletion config/pkg/ext/ext-spx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ext-spx:
source:
type: pie
repo: noisebynorthwest/php-spx
extract: php-src/ext/spx
metadata:
license-files: [LICENSE]
license: GPL-3.0-or-later
Expand Down
Loading