shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Home Page:https://setup-php.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 8.4 on Windows stopped working

sebastianbergmann opened this issue · comments

Describe the bug

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

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

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 �[90;1m==> �[0m�[37;1mSetup PhpManager �[0m
2023-09-22T05:07:22.1190583Z �[32;1m√ �[0m�[34;1mPhpManager �[0m�[90;1mInstalled �[0m
2023-09-22T05:07:22.1396528Z 
2023-09-22T05:07:22.1398723Z �[90;1m==> �[0m�[37;1mSetup PHP �[0m
2023-09-22T05:07:28.6429756Z �[31;1mException: �[0mC:\tools\php\PhpManager\public\Enable-PhpExtension.ps1:55
2023-09-22T05:07:28.6430400Z �[36;1mLine |
2023-09-22T05:07:28.6431314Z �[36;1m  55 | �[0m …             �[36;1mthrow "Unable to find a locally available extension with �[0m …
2023-09-22T05:07:28.6431821Z �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-09-22T05:07:28.6432515Z �[31;1m�[36;1m     | �[31;1mUnable to find a locally available extension with name (or handle) "openssl curl mbstring opcache": use the
2023-09-22T05:07:28.6433077Z �[36;1m     | �[31;1mInstall-PhpExtension to download it
2023-09-22T05:07:28.6433403Z �[0m
2023-09-22T05:07:28.7498105Z ##[error]The process 'C:\Program Files\PowerShell\7\pwsh.exe' failed with exit code 1

@sebastianbergmann

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

@sebastianbergmann

It should work correctly now.