Skip to content

Commit

Permalink
Merge pull request #17 from mlocati/master
Browse files Browse the repository at this point in the history
Fork Sync: Update from parent repository
  • Loading branch information
vanderletenpartners authored Feb 1, 2024
2 parents bc4d3ac + da13fc5 commit c60c645
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 46 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ body:
- type: textarea
attributes:
label: Minimal Dockerfile
description: Please provide the relevant parts of your Dockerfile to reproduce the issue
description: |
Please provide the relevant parts of your Dockerfile to reproduce the issue.
Please don't post your whole Dockerfile: it'll take more time from the maintainers to check what's going wrong.
And it's time you won't pay for.
render: Dockerfile
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ install-php-extensions @fix_letsencrypt
| ast | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| bcmath | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| bitset | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| blackfire | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| blackfire | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| bz2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| calendar | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| cassandra[*](#special-requirements-for-cassandra) | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Expand All @@ -225,6 +225,7 @@ install-php-extensions @fix_letsencrypt
| excimer | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| exif | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ffi | | | | | | | ✓ | ✓ | ✓ | ✓ | ✓ |
| ftp | | | | | | | | | | ✓ | ✓ |
| gd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| gearman | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | |
| geoip | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | |
Expand Down Expand Up @@ -306,9 +307,9 @@ install-php-extensions @fix_letsencrypt
| soap | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sockets | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sodium[*](#special-requirements-for-sodium) | | ✓ | ✓ | ✓ | | | | | | | |
| solr | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| solr | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sourceguardian | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| spx | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| spx | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sqlsrv[*](#special-requirements-for-sqlsrv) | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ssh2 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| stomp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ |
Expand All @@ -319,7 +320,7 @@ install-php-extensions @fix_letsencrypt
| sysvsem | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sysvshm | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| tensor | | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| tideways | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| tideways | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| tidy | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| timezonedb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| uopz | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Expand All @@ -345,7 +346,7 @@ install-php-extensions @fix_letsencrypt
| zookeeper | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| zstd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
*Number of supported extensions: 142*
*Number of supported extensions: 143*
<!-- END OF EXTENSIONS TABLE -->
PS: the pre-installed PHP extensions are excluded from this list.
Expand Down
9 changes: 5 additions & 4 deletions data/supported-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apcu_bc 7.0 7.1 7.2 7.3 7.4
ast 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
bitset 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
blackfire 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
blackfire 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
bz2 5.5 5.6 7.0 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em 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
sysvshm 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
tensor 7.2 7.3 7.4 8.0 8.1 8.2
tideways 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2
tideways 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
tidy 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
timezonedb 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
uopz 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3
Expand Down
91 changes: 55 additions & 36 deletions install-php-extensions
Original file line number Diff line number Diff line change
Expand Up @@ -357,74 +357,80 @@ getModuleSourceCodePath() {
fi
}

# Get the wanted PHP module version, resolving it if it starts with '^'
# Get the actual PHP module version, resolving it if it starts with '^'
#
# Arguments:
# $1: the name of the module to be normalized
# $1: the name of the module
# $2: the wanted version (optional, if omitted we'll use getWantedPHPModuleVersion)
#
# Output:
# The version to be used
resolveWantedPHPModuleVersion() {
resolveWantedPHPModuleVersion_raw="$(getWantedPHPModuleVersion "$1")"
resolveWantedPHPModuleVersion_afterCaret="${resolveWantedPHPModuleVersion_raw#^}"
if test "$resolveWantedPHPModuleVersion_raw" = "$resolveWantedPHPModuleVersion_afterCaret"; then
printf '%s' "$resolveWantedPHPModuleVersion_raw"
resolvePHPModuleVersion() {
resolvePHPModuleVersion_module="$1"
if test $# -lt 2; then
resolvePHPModuleVersion_raw="$(getWantedPHPModuleVersion "$installRemoteModule_module")"
else
resolvePHPModuleVersion_raw="$2"
fi
resolvePHPModuleVersion_afterCaret="${resolvePHPModuleVersion_raw#^}"
if test "$resolvePHPModuleVersion_raw" = "$resolvePHPModuleVersion_afterCaret"; then
printf '%s' "$resolvePHPModuleVersion_raw"
return
fi
case "$resolveWantedPHPModuleVersion_afterCaret" in
case "$resolvePHPModuleVersion_afterCaret" in
?*@snapshot | ?*@devel | ?*@alpha | ?*@beta | ?*@stable)
resolveWantedPHPModuleVersion_wantedStability="${resolveWantedPHPModuleVersion_afterCaret##*@}"
resolveWantedPHPModuleVersion_wantedVersion="${resolveWantedPHPModuleVersion_afterCaret%@*}"
resolvePHPModuleVersion_wantedStability="${resolvePHPModuleVersion_afterCaret##*@}"
resolvePHPModuleVersion_wantedVersion="${resolvePHPModuleVersion_afterCaret%@*}"
;;
*)
resolveWantedPHPModuleVersion_wantedStability=''
resolveWantedPHPModuleVersion_wantedVersion="$resolveWantedPHPModuleVersion_afterCaret"
resolvePHPModuleVersion_wantedStability=''
resolvePHPModuleVersion_wantedVersion="$resolvePHPModuleVersion_afterCaret"
;;
esac
resolveWantedPHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$1/allreleases.xml")"
resolvePHPModuleVersion_xml="$(curl -sSLf "http://pecl.php.net/rest/r/$resolvePHPModuleVersion_module/allreleases.xml")"
# remove line endings, collapse spaces
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_xml" | tr -s ' \t\r\n' ' ')"
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_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
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed -r 's#<r#\n<r#g')"
if test -n "$resolvePHPModuleVersion_wantedStability"; then
# keep the lines with the wanted stability
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | grep "<s>$resolveWantedPHPModuleVersion_wantedStability</s>")"
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | grep "<s>$resolvePHPModuleVersion_wantedStability</s>")"
fi
# remove everything's up to '<v>' (included)
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | sed 's#^.*<v>##')"
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | sed 's#^.*<v>##')"
# keep just the versions
resolveWantedPHPModuleVersion_versions="$(printf '%s' "$resolveWantedPHPModuleVersion_versions" | cut -d'<' -f1)"
resolvePHPModuleVersion_versions="$(printf '%s' "$resolvePHPModuleVersion_versions" | cut -d'<' -f1)"
resetIFS
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
if test "$resolveWantedPHPModuleVersion_version" != "${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion.}"; then
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
if test "$resolvePHPModuleVersion_version" != "${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion.}"; then
# Example: looking for 1.0, found 1.0.1
printf '%s' "$resolveWantedPHPModuleVersion_version"
printf '%s' "$resolvePHPModuleVersion_version"
return
fi
done
for resolveWantedPHPModuleVersion_version in $resolveWantedPHPModuleVersion_versions; do
resolveWantedPHPModuleVersion_suffix="${resolveWantedPHPModuleVersion_version#$resolveWantedPHPModuleVersion_wantedVersion}"
if test "$resolveWantedPHPModuleVersion_version" = "$resolveWantedPHPModuleVersion_suffix"; then
for resolvePHPModuleVersion_version in $resolvePHPModuleVersion_versions; do
resolvePHPModuleVersion_suffix="${resolvePHPModuleVersion_version#$resolvePHPModuleVersion_wantedVersion}"
if test "$resolvePHPModuleVersion_version" = "$resolvePHPModuleVersion_suffix"; then
continue
fi
if test -z "$resolveWantedPHPModuleVersion_suffix"; then
if test -z "$resolvePHPModuleVersion_suffix"; then
# Example: looking for 1.0, found exactly it
printf '%s' "$resolveWantedPHPModuleVersion_version"
printf '%s' "$resolvePHPModuleVersion_version"
return
fi
case "$resolveWantedPHPModuleVersion_suffix" in
case "$resolvePHPModuleVersion_suffix" in
[0-9])
# Example: looking for 1.1, but this is 1.10
;;
*)
# Example: looking for 1.1, this is 1.1rc1
printf '%s' "$resolveWantedPHPModuleVersion_version"
printf '%s' "$resolvePHPModuleVersion_version"
return
;;
esac
done
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$1" "$resolveWantedPHPModuleVersion_raw" "$resolveWantedPHPModuleVersion_versions" >&2
printf 'Unable to find a version of "%s" compatible with "%s"\nAvailable versions are:\n%s\n' "$resolvePHPModuleVersion_module" "$resolvePHPModuleVersion_raw" "$resolvePHPModuleVersion_versions" >&2
exit 1
}

Expand Down Expand Up @@ -811,6 +817,12 @@ buildRequiredPackageLists() {
ffi@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile libffi-dev"
;;
ftp@alpine)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
;;
ftp@debian)
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile $buildRequiredPackageLists_libssldev"
;;
gd@alpine)
buildRequiredPackageLists_persistent="$buildRequiredPackageLists_persistent freetype libjpeg-turbo libpng libxpm"
buildRequiredPackageLists_volatile="$buildRequiredPackageLists_volatile freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev"
Expand Down Expand Up @@ -2401,6 +2413,9 @@ EOF
cd - >/dev/null
fi
;;
ftp)
docker-php-ext-configure ftp --with-openssl-dir=/usr
;;
gd)
if test $PHP_MAJMIN_VERSION -le 506; then
docker-php-ext-configure gd --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf --with-vpx-dir
Expand Down Expand Up @@ -2623,7 +2638,7 @@ getPackageSource() {
installRemoteModule() {
installRemoteModule_module="$1"
printf '### INSTALLING REMOTE MODULE %s ###\n' "$installRemoteModule_module"
installRemoteModule_version="$(resolveWantedPHPModuleVersion "$installRemoteModule_module")"
installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module")"
installRemoteModule_path="$(getModuleSourceCodePath "$installRemoteModule_module")"
rm -rf "$CONFIGURE_FILE"
installRemoteModule_manuallyInstalled=0
Expand Down Expand Up @@ -2716,7 +2731,7 @@ installRemoteModule() {
if test $(compareVersions "$(cmake --version | head -n1 | sed -E 's/^.* //')" '3.7') -lt 0; then
installRemoteModule_tmp=0.29.0
else
installRemoteModule_tmp=0.30.3
installRemoteModule_tmp=0.31.0
fi
cd "$(getPackageSource https://github.com/commonmark/cmark/archive/$installRemoteModule_tmp.tar.gz)"
make -s -j$(getProcessorCount) cmake_build
Expand Down Expand Up @@ -3506,7 +3521,6 @@ installRemoteModule() {
fi
ldconfig || true
fi
set -x
cd "$installRemoteModule_dir/Saxon.C.API"
exit
phpize
Expand Down Expand Up @@ -3572,8 +3586,10 @@ installRemoteModule() {
;;
solr)
if test -z "$installRemoteModule_version"; then
if test $PHP_MAJMIN_VERSION -le 506; then
if test $PHP_MAJMIN_VERSION -lt 700; then
installRemoteModule_version=2.4.0
elif test $PHP_MAJMIN_VERSION -lt 704; then
installRemoteModule_version=2.6.0
fi
fi
;;
Expand All @@ -3584,7 +3600,7 @@ installRemoteModule() {
spx)
if test -z "$installRemoteModule_path"; then
if test -z "$installRemoteModule_version"; then
installRemoteModule_version=v0.4.14
installRemoteModule_version=v0.4.15
fi
if test "${installRemoteModule_version%.*}" = "$installRemoteModule_version"; then
installRemoteModule_displayVersion="$installRemoteModule_version"
Expand Down Expand Up @@ -3652,6 +3668,9 @@ installRemoteModule() {
installRemoteModule_version=4.5.10
elif test $PHP_MAJMIN_VERSION -le 704; then
installRemoteModule_version=4.8.11
elif test $PHP_BITS -eq 32; then
# See https://github.com/swoole/swoole-src/issues/5198#issuecomment-1820162178
installRemoteModule_version="$(resolvePHPModuleVersion "$installRemoteModule_module" '^5.0')"
fi
else
installRemoteModule_version="$(resolvePeclStabilityVersion "$installRemoteModule_module" "$installRemoteModule_version")"
Expand Down
15 changes: 15 additions & 0 deletions scripts/tests/ftp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env php
<?php

require_once __DIR__ . '/_bootstrap.php';

$rc = 0;
echo 'Checking if ftp_ssl_connect() exists... ';
if (!function_exists('ftp_ssl_connect')) {
$rc = 1;
echo "NO!\n";
} else {
echo "yes.\n";
}

exit($rc);

0 comments on commit c60c645

Please sign in to comment.