diff --git a/features/src/php/devcontainer-feature.json b/features/src/php/devcontainer-feature.json index e732dcad..05652a30 100644 --- a/features/src/php/devcontainer-feature.json +++ b/features/src/php/devcontainer-feature.json @@ -2,7 +2,7 @@ "id": "php", "name": "PHP", "description": "Installs PHP into the Dev Environment", - "version": "2.7.0", + "version": "2.7.1", "documentationURL": "https://github.com/Automattic/vip-codespaces/tree/trunk/features/src/php", "options": { "version": { diff --git a/features/src/php/install.sh b/features/src/php/install.sh index f5f3b54b..e92fce2c 100755 --- a/features/src/php/install.sh +++ b/features/src/php/install.sh @@ -221,6 +221,13 @@ setup_php83_alpine() { } setup_php84_alpine() { + alpine_version="$(cat /etc/alpine-release)" + if [ "$(printf '%s\n' "3.21" "${alpine_version}" | sort -V | head -n1 || true)" = "3.21" ]; then + REPOS="" + else + REPOS="-X https://dl-cdn.alpinelinux.org/alpine/v3.21/community" + fi + if [ "${LITE_INSTALL}" != 'true' ]; then # missing: php84-pecl-mcrypt php84-pecl-timezonedb EXTENSIONS="icu-data-full ghostscript php84-bcmath php84-ftp php84-intl php84-soap php84-pecl-igbinary php84-pecl-ssh2" @@ -268,10 +275,11 @@ setup_php84_alpine() { php84-xml \ php84-xmlreader \ php84-xmlwriter \ - php84-zip ${EXTENSIONS} -X https://dl-cdn.alpinelinux.org/alpine/edge/testing + php84-zip ${EXTENSIONS} ${REPOS} if [ "${SKIP_GMAGICK}" != 'true' ]; then - apk add --no-cache php84-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp -X https://dl-cdn.alpinelinux.org/alpine/edge/testing + # shellcheck disable=SC2086 + apk add --no-cache php84-dev gcc make libc-dev graphicsmagick-dev libtool graphicsmagick libgomp ${REPOS} pecl84 channel-update pecl.php.net pecl84 install channel://pecl.php.net/gmagick-2.0.6RC1 < /dev/null || true echo "extension=gmagick.so" > /etc/php84/conf.d/40_gmagick.ini diff --git a/features/src/xdebug/devcontainer-feature.json b/features/src/xdebug/devcontainer-feature.json index e91e76fa..a4efdb1b 100644 --- a/features/src/xdebug/devcontainer-feature.json +++ b/features/src/xdebug/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Xdebug", "id": "xdebug", - "version": "1.5.0", + "version": "1.5.1", "description": "Configures Xdebug for the Dev Environment", "options": { "enabled": { diff --git a/features/src/xdebug/install.sh b/features/src/xdebug/install.sh index eddbf0e8..cc66715b 100755 --- a/features/src/xdebug/install.sh +++ b/features/src/xdebug/install.sh @@ -36,7 +36,15 @@ xdebug_83_alpine() { } xdebug_84_alpine() { - apk add --no-cache php84-pecl-xdebug -X https://dl-cdn.alpinelinux.org/alpine/edge/testing + alpine_version="$(cat /etc/alpine-release)" + if [ "$(printf '%s\n' "3.21" "${alpine_version}" | sort -V | head -n1 || true)" = "3.21" ]; then + REPOS="" + else + REPOS="-X https://dl-cdn.alpinelinux.org/alpine/v3.21/community" + fi + + # shellcheck disable=SC2086 # We need to expand $REPOS + apk add --no-cache php84-pecl-xdebug ${REPOS} rm -f /etc/php81/conf.d/50_xdebug.ini }