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.91k stars 340 forks source link

PHP 8.4 on Windows stopped working #769

Closed sebastianbergmann closed 1 year ago

sebastianbergmann commented 1 year ago

Describe the bug

setup-php stopped working for PHPUnit's workflow with PHP 8.4 on Windows:

Version

Runners

Operating systems

The workflow uses Linux and Windows, the problem reported here only affects Windows.

PHP versions

The workflow uses PHP 8.1, PHP 8.2, PHP 8.3, and PHP 8.4. The problem reported here only affects PHP 8.4.

To Reproduce

https://github.com/sebastianbergmann/phpunit/blob/main/.github/workflows/ci.yml

Expected behavior

I expect the workflow to work with PHP 8.4 on Windows.

Screenshots/Logs

2023-09-22T05:07:17.4341399Z ##[group]Run shivammathur/setup-php@v2
2023-09-22T05:07:17.4341700Z with:
2023-09-22T05:07:17.4341891Z   php-version: 8.4
2023-09-22T05:07:17.4342207Z   extensions: none, curl, dom, json, libxml, mbstring, openssl, phar, soap, tokenizer, xml, xmlwriter
2023-09-22T05:07:17.4342682Z   ini-values: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
2023-09-22T05:07:17.4342988Z   tools: none
2023-09-22T05:07:17.4343177Z   ini-file: production
2023-09-22T05:07:17.4343350Z env:
2023-09-22T05:07:17.4343526Z   COMPOSER_ROOT_VERSION: 10.4-dev
2023-09-22T05:07:17.4343862Z   PHP_EXTENSIONS: none, curl, dom, json, libxml, mbstring, openssl, phar, soap, tokenizer, xml, xmlwriter
2023-09-22T05:07:17.4344313Z   PHP_INI_VALUES: memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
2023-09-22T05:07:17.4344622Z ##[endgroup]
2023-09-22T05:07:18.0864638Z [command]"C:\Program Files\PowerShell\7\pwsh.exe" D:\a\_actions\shivammathur\setup-php\v2\src\scripts\run.ps1
2023-09-22T05:07:19.0291457Z 
2023-09-22T05:07:19.0292258Z ==> Setup PhpManager 
2023-09-22T05:07:22.1190583Z √ PhpManager Installed 
2023-09-22T05:07:22.1396528Z 
2023-09-22T05:07:22.1398723Z ==> Setup PHP 
2023-09-22T05:07:28.6429756Z Exception: C:\tools\php\PhpManager\public\Enable-PhpExtension.ps1:55
2023-09-22T05:07:28.6430400Z Line |
2023-09-22T05:07:28.6431314Z   55 |  …             throw "Unable to find a locally available extension with  …
2023-09-22T05:07:28.6431821Z      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-09-22T05:07:28.6432515Z      | Unable to find a locally available extension with name (or handle) "openssl curl mbstring opcache": use the
2023-09-22T05:07:28.6433077Z      | Install-PhpExtension to download it
2023-09-22T05:07:28.6433403Z 
2023-09-22T05:07:28.7498105Z ##[error]The process 'C:\Program Files\PowerShell\7\pwsh.exe' failed with exit code 1
shivammathur commented 1 year ago

@sebastianbergmann

Missing extension_dir directive in the php -i output broke PhpManager. This has been fixed in https://github.com/php/php-src/pull/12272 by @nielsdos. Once merged the newer builds should work correctly.

shivammathur commented 1 year ago

@sebastianbergmann

It should work correctly now.