Skip to content

Commit

Permalink
feat(xdebug): add support for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Nov 24, 2024
1 parent 99885bb commit e4d3427
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion features/src/xdebug/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Xdebug",
"id": "xdebug",
"version": "1.4.1",
"version": "1.5.0",
"description": "Configures Xdebug for the Dev Environment",
"options": {
"enabled": {
Expand Down
15 changes: 15 additions & 0 deletions features/src/xdebug/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ xdebug_83_alpine() {
rm -f /etc/php81/conf.d/50_xdebug.ini
}

xdebug_84_alpine() {
apk add --no-cache php84-pecl-xdebug -X https://dl-cdn.alpinelinux.org/alpine/edge/testing
rm -f /etc/php81/conf.d/50_xdebug.ini
}

xdebug_81_deb() {
apt-get install -y --no-install-recommends php8.1-xdebug
}
Expand All @@ -47,6 +52,10 @@ xdebug_83_deb() {
apt-get install -y --no-install-recommends php8.3-xdebug
}

xdebug_84_deb() {
apt-get install -y --no-install-recommends php8.4-xdebug
}

if [ "$(id -u || true)" -ne 0 ]; then
echo 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
exit 1
Expand Down Expand Up @@ -86,6 +95,9 @@ case "${ID_LIKE}" in
8.3)
xdebug_83_deb
;;
8.4)
xdebug_84_deb
;;
*)
echo "(!) Unsupported PHP version: ${PHP_VERSION}"
exit 1
Expand All @@ -109,6 +121,9 @@ case "${ID_LIKE}" in
8.3)
xdebug_83_alpine
;;
8.4)
xdebug_84_alpine
;;
*)
echo "(!) Unsupported PHP version: ${PHP_VERSION}"
exit 1
Expand Down

0 comments on commit e4d3427

Please sign in to comment.