Description
Expected behaviour
#2546 added support for installation using PHP Installer for Extensions (PIE).
It is expected that this installation command also works on 64-bit Windows platforms by downloading the appropriate DLL.
Actual behaviour
PIE produces an error:
Could not find release asset for phpredis/phpredis:6.1.0 named one of "php_redis-6.1.0-8.3-nts-vs16-x86_64.zip, php_redis-6.1.0-8.3-vs16-nts-x86_64.zip"
I'm seeing this behaviour on
- OS: Windows 11
- Redis: n/a
- PHP: 8.3.14-nts-vs16-x86_64
- phpredis: 6.1.0
Steps to reproduce, backtrace or example script
- Download PHP Installer for extensions PHAR
- Run
php pie.phar install phpredis/phpredis
Full output:
This command may need elevated privileges, and may prompt you for your password.
You are running PHP 8.3.14
Target PHP installation: 8.3.14 nts, vs16, on Windows x86_64 (from C:\Programs\php-8.3.14-nts-Win32-vs16-x64\php.exe)
Found package: phpredis/phpredis:6.1.0 which provides ext-redis
In CouldNotFindReleaseAsset.php line 19:
Could not find release asset for phpredis/phpredis:6.1.0 named one of "php_redis-6.1.0-8.3-nts-vs16-x86_64.zip, php_redis-6.1.0-8.3-vs16-nts-x86_64.zip"
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] [--disable-redis-json] [--disable-redis-session] [--enable-redis] [--enable-redis-igbinary] [--enable-redis-lz4] [--enable-redis-lzf] [--enable-redis-msgpack] [--enable-redis-zstd] [--with-liblz4 WITH-LIBLZ4] [--with-liblzf WITH-LIBLZF] [--with-libzstd WITH-LIBZSTD] [--] <requested-package-and-version>
According to the PIE design documents, PIE expects Windows builds to be attached to the GitHub release.
Possible solution
Note that attaching the existing PECL builds to the GitHub release won't quite fix the issue, because the naming convention is different.
It appears the PHP Foundation has recently standardized on referring to 64-bit x86 platforms as x86_64
instead of x64
(see php/pie#87 (comment); though PECL (and https://windows.php.net itself! still uses x64
).
There is a fairly new "official" PHP Windows Builder GitHub Action, which can be provided with an environment variable ARTIFACT_NAMING_SCHEME
- if set to pecl
, it produces the existing x64
-style name, but if unset it produces a x86_64
-style name.
Perhaps it would be possible to use this (or something similar to it) to produce the DLLs built for PIE?
I am not familiar enough with GH Actions to tell whether this is a simple drop-in change, or whether more work is needed.
I've checked
- There is no similar issue from other users
- Issue isn't fixed in
develop
branch