shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.9k stars 337 forks source link

Install php extension with pecl on windows with version. #855

Closed terabytesoftw closed 2 months ago

terabytesoftw commented 3 months ago

Describe the bug

Install wincache-2.0.0.9

Version

Operating systems Windows

PHP versions 8.1

Screenshots/Logs

Add-Extension: D:\a\_actions\shivammathur\setup-php\main\src\scripts\run.ps1:15
Line |
  15 |  Add-Extension wincache stable 2.0.0.9
     |                                ~~~~~~~
     | Cannot validate argument on parameter 'extension_version'. The argument "2.0.0.9" does not match the
     | "^\d+(\.\d+){0,2}$" pattern. Supply an argument that matches "^\d+(\.\d+){0,2}$" and try the command again.
shivammathur commented 3 months ago

I fixed the regex here on setup-php side https://github.com/shivammathur/setup-php/commit/594bd591ec5fc2a0913e1e6c6eba2bd60844146b.

@mlocati Can we have it changed in Install-PhpExtension as well. And, also changed to search for DLLs in https://downloads.php.net/~windows/pecl/ indexes.

terabytesoftw commented 3 months ago

I fixed the regex here on setup-php side 594bd59.

@mlocati Can we have it changed in Install-PhpExtension as well. And, also changed to search for DLLs in https://downloads.php.net/~windows/pecl/ indexes.

Thks, use the branch develop but it doesn't install it.

✗ wincache Could not install wincache on PHP 8.1.29 
mlocati commented 3 months ago

Can we have it changed in Install-PhpExtension as well.

Done: https://github.com/mlocati/powershell-phpmanager/pull/118

shivammathur commented 3 months ago

@mlocati Thanks for updating the regex.

New extension builds are no longer uploaded to windows.php.net, Would it be possible to change it so that it looks for builds in https://downloads.php.net/~windows/pecl/

mlocati commented 3 months ago

If I'm not wrong, I should already have done that: see https://github.com/mlocati/powershell-phpmanager/pull/116

shivammathur commented 3 months ago

Ah!, I missed that. Thanks again

mlocati commented 3 months ago

Thanks to you!

shivammathur commented 2 months ago

Released 2.31.1 with the fix.

terabytesoftw commented 2 months ago

Awesome job,

Thks.