Skip to content

Commit

Permalink
Merge pull request #15 from vdlp/revert-14-revert-13-master
Browse files Browse the repository at this point in the history
Revert "Revert "Fork Sync: Update from parent repository""
  • Loading branch information
nathan-van-der-werf authored Dec 1, 2023
2 parents dd4ff55 + 6da7834 commit fcf32f6
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
- 3.0.0
- ^2
- ^2.8
- ^2.8@stable
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ We need to monitor new releases at https://docs.microsoft.com/en-us/sql/connect/
The only available versions of the `uv` PHP extension are all beta.
We should switch to the stable release once it will be available.

### vld

The only available versions of this PHP extension are all beta.
We should switch to the stable release once it will be available.

## xdiff

The `xdiff` PHP extension uses the LibXDiff library.
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ install-php-extensions xdebug-^2
install-php-extensions xdebug-^2.8
```

Please remark that with the syntax above you'll get the vary latest compatible version, which may be unstable. In order to install the most recent *stable* version, you can append `@stable`:

```sh
# Install the most recent STABLE xdebug 3.x version (for example 3.2.2)
install-php-extensions xdebug-^3@stable
```

(valid suffixes are: `@snapshot`, `@devel`, `@alpha`, `@beta`, and `@stable`)

Pre-release versions extensions available on `PECL` can be setup by suffixing the extension's name with its state i.e. `alpha`, `beta`, `rc`, `preview`, `devel` or `snapshot`.
For example:

Expand Down Expand Up @@ -244,7 +253,7 @@ install-php-extensions @fix_letsencrypt
| lzf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| mailparse | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| maxminddb | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| mcrypt | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| mcrypt | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| memcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| memcached | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| memprof[*](#special-requirements-for-memprof) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Expand Down Expand Up @@ -318,8 +327,9 @@ install-php-extensions @fix_letsencrypt
| uuid | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| uv | | | | | | | | ✓ | ✓ | ✓ | ✓ |
| vips[*](#special-requirements-for-vips) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| vld | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| wddx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | |
| xdebug | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| xdebug | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xdiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xhprof | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xlswriter | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Expand All @@ -335,7 +345,7 @@ install-php-extensions @fix_letsencrypt
| zookeeper | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| zstd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
*Number of supported extensions: 141*
*Number of supported extensions: 142*
<!-- END OF EXTENSIONS TABLE -->
PS: the pre-installed PHP extensions are excluded from this list.
Expand Down
5 changes: 3 additions & 2 deletions data/supported-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ lz4 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
lzf 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
mailparse 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
maxminddb 7.2 7.3 7.4 8.0 8.1 8.2 8.3
mcrypt 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
mcrypt 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
memcache 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
memcached 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
memprof 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
Expand Down Expand Up @@ -123,8 +123,9 @@ uploadprogress 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
uuid 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
uv 8.0 8.1 8.2 8.3
vips 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
vld 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
wddx 5.5 5.6 7.0 7.1 7.2 7.3
xdebug 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
xdebug 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
xdiff 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
xhprof 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
xlswriter 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
Expand Down
141 changes: 126 additions & 15 deletions install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,40 @@ resolveWantedPHPModuleVersion() {
printf '%s' "$resolveWantedPHPModuleVersion_raw"
return
fi
case "$resolveWantedPHPModuleVersion_afterCaret" in
?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable)
resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}"
resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}"
;;
*)
resolveWantedPHPModuleVersion_wantedStability=''
resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret"
;;
esac
resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")"
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ' | sed -r 's# *<#\n<#g' | grep '<v>' | sed 's#<v>##g' | sed 's# ##g')"
# remove line endings, collapse spaces
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
# one line per release (eg <r><v>1.2.3</v><s>stable</s></r>)
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
if test -n "$resolveWantedPHPModuleVersion_wantedStability"; then
# keep the lines with the wanted stability
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | grep "<s>$resolveWantedPHPModuleVersion_wantedStability</s>")"
fi
# remove everything's up to '<v>' (included)
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*<v>##')"
# keep just the versions
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)"
resetIFS
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_afterCaret}"
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_afterCaret.}"; then
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then
# Example: looking for 1.0, found 1.0.1
printf '%s' "$resolveWantedPHPModuleVersion_version"
return
fi
done
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_afterCaret}"
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then
continue
fi
Expand Down Expand Up @@ -1039,10 +1060,18 @@ buildRequiredPackageLists() {
mongodb@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent icu-libs $buildRequiredPackageLists_icuPersistent libsasl $buildRequiredPackageLists_libssl snappy"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile icu-dev cyrus-sasl-dev snappy-dev $buildRequiredPackageLists_libssldev zlib-dev"
if test $PHP_MAJMIN_VERSION -ge 704; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent zstd-libs"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile zstd-dev"
fi
;;
mongodb@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libsnappy[0-9]+(v[0-9]+)?$ ^libicu[0-9]+$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libicu-dev libsasl2-dev libsnappy-dev $buildRequiredPackageLists_libssldev zlib1g-dev"
if test $PHP_MAJMIN_VERSION -ge 704; then
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent ^libzstd[0-9]*$"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libzstd-dev"
fi
;;
mosquitto@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent mosquitto-libs"
Expand Down Expand Up @@ -1199,6 +1228,9 @@ buildRequiredPackageLists() {
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libssl1.1"
fi
;;
saxon@debian)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_volatile unzip"
;;
seasclick@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent libstdc++"
;;
Expand Down Expand Up @@ -2815,7 +2847,7 @@ installRemoteModule() {
case "$DISTRO" in
alpine)
if ! test -e /usr/local/include/libgearman/gearman.h || ! test -e /usr/local/lib/libgearman.so; then
installRemoteModule_src="$(getPackageSource https://github.com/gearman/gearmand/releases/download/1.1.20/gearmand-1.1.20.tar.gz)"
installRemoteModule_src="$(getPackageSource https://github.com/gearman/gearmand/releases/download/1.1.21/gearmand-1.1.21.tar.gz)"
cd -- "$installRemoteModule_src"
./configure
make -j$(getProcessorCount) install-binPROGRAMS
Expand Down Expand Up @@ -3076,8 +3108,34 @@ installRemoteModule() {
installRemoteModule_version=1.9.2
elif test $PHP_MAJMIN_VERSION -le 701; then
installRemoteModule_version=1.11.1
elif test $PHP_MAJMIN_VERSION -le 703; then
installRemoteModule_version=1.16.2
fi
fi
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" 1.17.0) -ge 0; then
# Enable developer flags? (yes/no)
addConfigureOption enable-mongodb-developer-flags no
# Enable code coverage? (yes/no)
addConfigureOption enable-mongodb-coverage no
# Use system libraries for libbson, libmongoc, and libmongocrypt? (yes/no)
addConfigureOption with-mongodb-system-libs no
# Enable client-side encryption? (auto/yes/no)
addConfigureOption with-mongodb-client-side-encryption yes
# Enable Snappy for compression? (auto/yes/no)
addConfigureOption with-mongodb-snappy yes
# Enable zlib for compression? (auto/system/bundled/no)
addConfigureOption with-mongodb-zlib yes
# Enable zstd for compression? (auto/yes/no)
addConfigureOption with-mongodb-zstd yes
# Enable SASL for Kerberos authentication? (auto/cyrus/no)
addConfigureOption with-mongodb-sasl yes
# Enable crypto and TLS? (auto/openssl/libressl/darwin/no)
addConfigureOption with-mongodb-ssl yes
# Use system crypto profile (OpenSSL only)? (yes/no)
addConfigureOption enable-mongodb-crypto-system-profile yes
# Use bundled or system utf8proc for SCRAM-SHA-256 SASLprep? (bundled/system)
addConfigureOption with-mongodb-utf8proc bundled
fi
;;
mosquitto)
if test -z "$installRemoteModule_version"; then
Expand Down Expand Up @@ -3107,6 +3165,8 @@ installRemoteModule() {
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 704; then
installRemoteModule_version=4.10.0
elif test $PHP_MAJMIN_VERSION -lt 801; then
installRemoteModule_version=22.0.0
fi
else
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
Expand All @@ -3118,28 +3178,28 @@ installRemoteModule() {
installRemoteModule_sockets=no
fi
installRemoteModule_openssl=yes
# enable sockets supports?
# enable sockets supports? (v < 22.1.0) / enable coroutine sockets? (v >= 22.1.0)
addConfigureOption enable-sockets $installRemoteModule_sockets
# enable openssl support?
addConfigureOption enable-openssl $installRemoteModule_openssl
# enable http2 support?
addConfigureOption enable-http2 yes
# enable mysqlnd support?
# enable mysqlnd support? (v < 22.1.0) / enable coroutine mysqlnd? (v >= 22.1.0)
addConfigureOption enable-mysqlnd yes
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '22.8.0') -ge 0; then
#enable hook curl support?
addConfigureOption enable-hook-curl yes
# enable postgres support?
addConfigureOption with-postgres yes
else
if test -n "$installRemoteModule_version" && test $(compareVersions "$installRemoteModule_version" '22.0.0') -lt 0; then
# enable json support?
addConfigureOption enable-swoole-json yes
# enable curl support?
addConfigureOption enable-swoole-curl yes
if test -z "$installRemoteModule_version" || test $(compareVersions "$installRemoteModule_version" '4.8.0') -ge 0; then
if test $(compareVersions "$installRemoteModule_version" '4.8.0') -ge 0; then
# enable postgres support?
addConfigureOption with-postgres yes
fi
else
#enable hook curl support? (v < 22.1.0) / enable coroutine curl? (v >= 22.1.0)
addConfigureOption enable-hook-curl yes
# enable postgres support? (v < 22.1.0) / enable coroutine postgres? (v >= 22.1.0)
addConfigureOption with-postgres yes
fi
;;
opentelemetry)
Expand Down Expand Up @@ -3197,8 +3257,10 @@ installRemoteModule() {
;;
protobuf)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
if test $PHP_MAJMIN_VERSION -lt 700; then
installRemoteModule_version=3.12.4
elif test $PHP_MAJMIN_VERSION -lt 800; then
installRemoteModule_version=3.24.4
fi
fi
;;
Expand Down Expand Up @@ -3342,6 +3404,45 @@ installRemoteModule() {
installRemoteModule_ini_extra="$(grep -vE '^[ \t]*extension[ \t]*=' $installRemoteModule_src/relay.ini)"
installRemoteModule_manuallyInstalled=1
;;
saxon)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
installRemoteModule_version='11.6'
else
installRemoteModule_version='12.3'
fi
fi
installRemoteModule_majorVersion="${installRemoteModule_version%%.*}"
if test "$installRemoteModule_majorVersion" -ge 12; then
case $(uname -m) in
aarch64 | arm64 | armv8)
installRemoteModule_url=https://downloads.saxonica.com/SaxonC/EE/${installRemoteModule_majorVersion}/libsaxon-EEC-linux-aarch64-v${installRemoteModule_version}.zip
;;
*)
installRemoteModule_url=https://downloads.saxonica.com/SaxonC/EE/${installRemoteModule_majorVersion}/libsaxon-EEC-linux-x86_64-v${installRemoteModule_version}.zip
;;
esac
else
installRemoteModule_url=https://downloads.saxonica.com/SaxonC/EE/${installRemoteModule_majorVersion}/libsaxon-EEC-setup64-v${installRemoteModule_version}.zip
fi
installRemoteModule_dir="$(getPackageSource $installRemoteModule_url)"
if ! test -f /usr/lib/libsaxon-*.so; then
if test "$installRemoteModule_majorVersion" -ge 12; then
cp $installRemoteModule_dir/libs/nix/*.so /usr/lib/
else
cp $installRemoteModule_dir/*.so /usr/lib/
fi
ldconfig || true
fi
set -x
cd "$installRemoteModule_dir/Saxon.C.API"
exit
phpize
./configure --enable-saxon
make -j$(getProcessorCount) install
cd - >/dev/null
installRemoteModule_manuallyInstalled=1
;;
seasclick)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
Expand Down Expand Up @@ -3763,6 +3864,15 @@ installRemoteModule() {
fi
fi
;;
vld)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -lt 700; then
installRemoteModule_version=0.14.0
else
installRemoteModule_version=beta
fi
fi
;;
xdebug)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 500; then
Expand Down Expand Up @@ -4335,6 +4445,7 @@ fi
if test $USE_PICKLE -gt 1; then
buildPickle
fi

for PHP_MODULE_TO_INSTALL in $PHP_MODULES_TO_INSTALL; do
case "$PHP_MODULE_TO_INSTALL" in
@fix_letsencrypt)
Expand Down
3 changes: 0 additions & 3 deletions scripts/ci-test-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,6 @@ getDockerImageName() {
return
fi
case "$2" in
8.3)
getDockerImageName_version="$2-rc"
;;
*)
getDockerImageName_version="$2"
;;
Expand Down
5 changes: 3 additions & 2 deletions scripts/test-installversion
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -o errexit
set -o nounset

WANTED_VERSION="${1:-}"
WANTED_VERSION_AFTERCARET="${1#^}"
WANTED_VERSION_BASE="${1#^}"
WANTED_VERSION_BASE="${WANTED_VERSION_BASE%@*}"
INSTALLME=xdebug
if test -n "$WANTED_VERSION"; then
INSTALLME="$INSTALLME-$1"
Expand All @@ -18,7 +19,7 @@ if test -z "$WANTED_VERSION"; then
printf 'Installing the default version worked (we installed version %s)\n' "$INSTALLED_VERSION"
elif test "$WANTED_VERSION" = "$INSTALLED_VERSION"; then
printf 'Installing specific version %s worked\n' "$WANTED_VERSION"
elif test "$WANTED_VERSION" != "$WANTED_VERSION_AFTERCARET" && test "${INSTALLED_VERSION#$WANTED_VERSION_AFTERCARET.}" != "$INSTALLED_VERSION"; then
elif test "$WANTED_VERSION" != "$WANTED_VERSION_BASE" && test "${INSTALLED_VERSION#$WANTED_VERSION_BASE.}" != "$INSTALLED_VERSION"; then
printf 'Installing version compatible with %s worked (we installed version %s)\n' "$WANTED_VERSION" "$INSTALLED_VERSION"
else
printf 'We wanted to install version %s, but we installed %s\n' "$WANTED_VERSION" "$INSTALLED_VERSION" >&2
Expand Down

0 comments on commit fcf32f6

Please sign in to comment.