mlocati/docker-php-extension-installer

PECL deps should be ignored when installed from source/commit

Closed this issue · 2 comments

Version of install-php-extensions

latest

Error description

Currently xdebug/xdebug@803f5517dc cannot be installed as the PECL package.xml config does not allow PHP 8.3 https://github.com/xdebug/xdebug/blob/66fc2c128aaf089efc120c9ce41f06e7eb9420c3/package.xml#L202 . The xdebug itself is however compatible: https://github.com/xdebug/xdebug/blob/master/config.m4#L22

Installing from source/commit was introduced in #538. I would expect no deps validation, at least not othe PHP version, as sources are not required to have PECL package.xml and/or the package.xml can be outdated (until a stable PECL release is done).

Minimal Dockerfile

FROM ghcr.io/mvorisek/image-php:8.3-alpine-base

RUN apk update \
    && apk upgrade \
    && apk add bash git make unzip gnupg ca-certificates coreutils \
    && rm -rf /var/cache/apk/*

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

RUN install-php-extensions xdebug/xdebug@803f5517dc

If the code at a specific commit is compatible with PHP 8.3, then the package.xml file should state it

In case anyone is facing this issue as well, here is how I solved it:

RUN git clone --depth 1 https://github.com/xdebug/xdebug.git -b master xdebug \
    && cd xdebug && git reset --hard 28f528d0ef \
    && sed 's~<max>8.2.99</max>~<max>8.3.0</max>~' -i package.xml
RUN install-php-extensions $(realpath xdebug)