Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion conf/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ PHP_MODULE_API_VERSIONS["8.1"]="20210902"
PHP_MODULE_API_VERSIONS["8.2"]="20220829"
PHP_MODULE_API_VERSIONS["8.3"]="20230831"
PHP_MODULE_API_VERSIONS["8.4"]="20240924"
PHP_MODULE_API_VERSIONS["8.5"]="20250925"

# The following lib versions are used for lib we statically store on Swift.
# They are downloaded, compiled and stored with /support/get_* scripts.
Expand All @@ -45,7 +46,7 @@ mongodb_version="1.21.0"
amqp_version="2.1.2"
phpredis_version="6.3.0"
apcu_version="5.1.27"
newrelic_version="11.5.0.18"
newrelic_version="12.2.0.27"


# Legacy support
Expand Down
76 changes: 50 additions & 26 deletions support/package_all
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,68 @@
#
# Package all extensions: both internal and non-internal.

if [ -n "$DEBUG" ]; then
set -x
if [ -n "${DEBUG}" ]; then
set -x
fi

if [ -z "$1" ]; then
echo "Usage: $0 PHP_VERSION"
echo "Example: $0 7.4"
exit 1
if [ -z "${1}" ]; then
echo "Usage: ${0} PHP_VERSION"
echo "Example: ${0} 7.4"
exit 1
fi

set -e
set -o pipefail

php_version=$1
php_version="${1}"

cd $( cd -P "$( dirname "$0" )" && pwd )
cd "$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source "../conf/versions.sh"

# SKIP imap extension since it has been moved to PECL starting with PHP 8.4
# https://www.php.net/ChangeLog-8.php#8.4.1
#
# SKIP amqp extension since it doesn't compile with PHP 8.5
# https://github.com/php-amqp/php-amqp/pull/595
#
# SKIP igbinary extension since it doesn't compile with PHP 8.5
# https://github.com/igbinary/igbinary/issues/400
#
# SKIP imagick extension since it doesn't compile with PHP 8.5
# https://github.com/Imagick/imagick/issues/755
#
Comment on lines +24 to +35
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

praise: thanks for the comment 🙏

skip=( "imap" "amqp" "igbinary" "imagick" )

for e in ./ext-internal/*; do
ext_name="$( basename "${e}" )"
# IMAP extension has been moved to PECL starting with PHP 8.4
# https://www.php.net/ChangeLog-8.php#8.4.1
if [[ "$ext_name" = "imap" ]] && [[ "$php_version" = "8.4" ]]; then
continue
fi

./package_internal_ext "${ext_name}" "${php_version}"
if [[ $? -ne 0 ]]; then
echo "Error packaging internal extension ${ext_name}" >&2
exit 1
fi
ext_name="$( basename "${e}" )"

if [[ "${PHP_MODULE_API_VERSIONS["${php_version}"]}" -ge 20240924 ]] \
&& [[ ${skip[@]} =~ "${ext_name}" ]]
then
continue
fi

./package_internal_ext "${ext_name}" "${php_version}"
if [[ $? -ne 0 ]]; then
echo "Error packaging internal extension ${ext_name}" >&2
exit 1
fi
done

for e in ./ext/*; do
ext_name="$( basename "${e}" )"
ext_name="$( basename "${e}" )"

./package_ext "${ext_name}" "${ext_name}" "${php_version}"
if [[ $? -ne 0 ]]; then
echo "Error packaging extension ${ext_name}" >&2
exit 1
fi
if [[ "${PHP_MODULE_API_VERSIONS["${php_version}"]}" -ge 20240924 ]] \
&& [[ ${skip[@]} =~ "${ext_name}" ]]
then
continue
fi

./package_ext "${ext_name}" "${ext_name}" "${php_version}"
if [[ $? -ne 0 ]]; then
echo "Error packaging extension ${ext_name}" >&2
exit 1
fi
done