php / pie

The PHP Installer for Extensions
BSD 3-Clause "New" or "Revised" License
666 stars 19 forks source link

Unable to install xdebug/xdebug #129

Closed cnizzardini closed 4 days ago

cnizzardini commented 4 days ago

Within an alpine docker container. I have tried the most recent nightly build after reading through this issue: #117 but still encounter issues:

/srv/app # pie install xdebug/xdebug
You are running PHP 8.1.10
Target PHP installation: 8.1.10 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)

In UnableToResolveRequirement.php line 25:

  Unable to find an installable package xdebug/xdebug for the latest compatible version, with minimum stability stable.  

install [-j|--make-parallel-jobs MAKE-PARALLEL-JOBS] [--with-phpize-path WITH-PHPIZE-PATH] [--with-php-config WITH-PHP-CONFIG] [--with-php-path WITH-PHP-PATH] [--] <requested-package-and-version>

Version:

/srv/app # pie -V
🥧 PHP Installer for Extensions (PIE) 0.2.0@2b50a1
asgrim commented 4 days ago

Xdebug does not have a stable release with PIE yet, you need to specify the stability, e.g. pie install xdebug/xdebug:^3.4@beta (I think, I'm on my phone so can't check)

See https://packagist.org/packages/xdebug/xdebug for compatible versions 👍

cnizzardini commented 4 days ago

Ah well then it seems like some of these ugly alpine deps are still necessary, none the less that works. Here is this for future readers to take what they need:

RUN if [[ "$ENV" != "prod" ]]; then \
    apk add git \
    && apk add --no-cache --virtual .php-deps file re2c autoconf make zlib zlib-dev g++ curl linux-headers \
    && curl -o /usr/local/bin/pie -L https://php.github.io/pie/pie-nightly.phar \
    && chmod 766 /usr/local/bin/pie \
    && pie install xdebug/xdebug:^3.4@beta \
    && apk del -f .php-deps; \
fi