View Issue Details

IDProjectCategoryView StatusLast Update
0002388XdebugInstallationpublic2025-12-08 18:15
Reporterrichardbrinkman Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version3.4.6 
Summary0002388: pecl install xdebug not workingn on PHP 8.5.0
Description

If you try to install xdebug with "pecl install xdebug" on a system running PHP 8.5.0 you get the following error:

2.423 pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.4.99), installed version is 8.5.0
2.424 No valid packages found
2.424 install failed

Steps To Reproduce
  1. Install PHP 8.5.0
  2. Run pecl install xdebug
Additional Information

The PHP version is 8.5.0; not the 8.5-dev as shown below. The bugtracker does not know that PHP 8.5.0 is out of beta.

TagsNo tags attached.
Operating System
PHP Version8.5-dev

Activities

derick

2025-11-25 14:19

administrator   ~0007418

I'll update the version list. However, Xdebug isn't compatibly with PHP 8.5 just yet: https://xdebug.org/docs/compat

You'll have to have a little patience.

xdebug_fan

2025-12-04 15:07

reporter   ~0007422

I tried to install Xdebug with "pecl install xdebug" as well as "pie install xdebug/xdebug" since now the latest version of PHP should be supported according to this page: https://xdebug.org/docs/compat

Should this Bug maybe be reopened? Is there anything I missed to get Xdebug running?

I attached the Dockerfile I use to this comment that can be built with "docker build -t php85-ci:latest --target ci ."

Dockerfile (871 bytes)   
FROM php:8.5-fpm-alpine AS production

ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0" \
    PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
    PHP_OPCACHE_MEMORY_CONSUMPTION="192" \
    PHP_OPCACHE_MAX_WASTED_PERCENTAGE="10"

ENV TZ=Europe/Berlin

RUN apk add --no-cache --update --virtual buildDeps linux-headers autoconf libzip-dev git \
    && apk add curl-dev openssl-dev build-base icu-dev

RUN docker-php-ext-configure zip \
 && docker-php-ext-install zip \
 && docker-php-ext-install pdo_mysql \
 && docker-php-ext-configure intl \
 && docker-php-ext-install intl

WORKDIR /var/www/api

# Install composer globally
COPY install-composer.sh /var/www/api/
RUN /var/www/api/install-composer.sh

# The build for the contious integration
FROM production AS ci

ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="1"

# Install Xdebug
RUN pecl install -f xdebug
RUN docker-php-ext-enable xdebug
Dockerfile (871 bytes)   

xdebug_fan

2025-12-04 15:21

reporter   ~0007424

Oh the composer install can just be removed since the "install-composer.sh" file will be missing when building the Dockerfile

richardbrinkman

2025-12-05 06:57

reporter   ~0007426

@derick, can you reopen this bug report, since the pecl install problem still exists and PHP 8.5 is shown to be compatible according to https://xdebug.org/docs/compat? Or should I open a copy of the bug report?

derick

2025-12-05 08:11

administrator   ~0007427

@richardbrinkman, you can install xdebug 3.5 with PIE for now.

I'm deliberately not uploading it (manually) to PECL yet as that is going to go away as it is now deprecated with PIE being the replacement. Giving a little nudge to move to PIE fir the developers that really want to run the latest PHP.

The release announcement at https://xdebug.org/announcements/2025-12-04 does mention PIE only. The documentation also says PECL is deprecated with addition documentation for PIE: https://xdebug.org/docs/install#pie

kdederichs

2025-12-05 10:58

reporter   ~0007428

As a side note to this:
install-php-extensions in Docker also uses pecl under the hood (and as I understand it they don't want to move off it just yet for BC reasons) so it not being on pecl is a bit inconvenient in that regard.

xdebug_fan

2025-12-05 16:51

reporter   ~0007430

Thank you derick! The install with PIE works now for me. The "install-php-extensions" call is not required as far as I can tell (I checked it in the container with "php --version"). This is the Dockerfile I use now (I removed the composer install now from my previous note right away - maybe this is useful for others)

Dockerfile-2 (801 bytes)   
FROM php:8.5-fpm-alpine AS production

ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0" \
    PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
    PHP_OPCACHE_MEMORY_CONSUMPTION="192" \
    PHP_OPCACHE_MAX_WASTED_PERCENTAGE="10"

ENV TZ=Europe/Berlin

RUN apk add --no-cache --update --virtual buildDeps linux-headers autoconf libzip-dev git \
    && apk add curl-dev openssl-dev build-base icu-dev

RUN docker-php-ext-configure zip \
 && docker-php-ext-install zip \
 && docker-php-ext-install pdo_mysql \
 && docker-php-ext-configure intl \
 && docker-php-ext-install intl

WORKDIR /var/www/api

# The build for the contious integration
FROM production AS ci

ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="1"

# Install Pie
COPY --from=ghcr.io/php/pie:bin /pie /usr/bin/pie

# Install Xdebug
RUN pie install xdebug/xdebug
Dockerfile-2 (801 bytes)   

richardbrinkman

2025-12-06 03:54

reporter   ~0007431

Whilst it is apparently a deliberate act of not uploading xdebug releases to pecl anlymore, maybe it is a good idea to reflect that in the documentation. Currently pecl install is listed as one of the options to install xdebug on https://xdebug.org/docs/install. Also on https://github.com/xdebug/xdebug/blob/master/README.rst pecl install is the primary install option. Pie is not mentioned in the README at all. Pecl is also listed as a requirement for installation (for distro's without an xdebug package).

derick

2025-12-08 18:15

administrator   ~0007432

@richardbrinkman I had updated the documentation on https://xdebug.org/docs/install already. It specifically has:

You can also install Xdebug with the following legacy installation methods:

  • Linux without an Xdebug package with PECL.
  • macOSX with homebrew, through PECL.

And also in red as a warning, at https://xdebug.org/docs/install#pecl :

The PECL installation tool and PECL web site are deprecated. PIE (PHP Installer for Extensions) is the replacement for PECL. You can find the instructions for installing Xdebug with PIE above.

I had not updated the README yet, but I have done so now too: https://github.com/xdebug/xdebug/blob/master/README.rst

And also, after the delay, I uploaded Xdebug 3.5.0 to PECL. I will (for now) continue to do that with a delay. But likely only for the 3.5 series.

Please do upgrade to PIE.

Issue History

Date Modified Username Field Change
2025-11-21 08:12 richardbrinkman New Issue
2025-11-25 14:19 derick Assigned To => derick
2025-11-25 14:19 derick Status new => closed
2025-11-25 14:19 derick Resolution open => no change required
2025-11-25 14:19 derick Note Added: 0007418
2025-12-04 15:07 xdebug_fan Note Added: 0007422
2025-12-04 15:07 xdebug_fan File Added: Dockerfile
2025-12-04 15:21 xdebug_fan Note Added: 0007424
2025-12-05 06:57 richardbrinkman Note Added: 0007426
2025-12-05 08:11 derick Note Added: 0007427
2025-12-05 10:58 kdederichs Note Added: 0007428
2025-12-05 16:51 xdebug_fan Note Added: 0007430
2025-12-05 16:51 xdebug_fan File Added: Dockerfile-2
2025-12-06 03:54 richardbrinkman Note Added: 0007431
2025-12-08 18:15 derick Note Added: 0007432