Menu

#58 Composer has fatal error with PHP 8.0.27

open
WTriple
True
2024-04-04
2024-04-04
Anonymous
No

I have freshly installed WinNMP 21.10 in Windows 10. I only check the PHP 8.0.27 version.
When I run composer, it will output the following:

$ composer.phar

Fatal error: Uncaught Error: Call to undefined function Composer\XdebugHandler\putenv() in phar://C:/WinNMP/bin/composer/composer.phar/vendor/composer/xdebug-handler/src/Process.php:149
Stack trace:
#0 phar://C:/WinNMP/bin/composer/composer.phar/vendor/composer/xdebug-handler/src/Status.php(47): Composer\XdebugHandler\Process::setEnv('XDEBUG_HANDLER_...')
#1 phar://C:/WinNMP/bin/composer/composer.phar/vendor/composer/xdebug-handler/src/XdebugHandler.php(77): Composer\XdebugHandler\Status->__construct('COMPOSER_ALLOW_...', false)
#2 phar://C:/WinNMP/bin/composer/composer.phar/bin/composer(16): Composer\XdebugHandler\XdebugHandler->__construct('Composer', '--ansi')
#3 C:\WinNMP\bin\composer\composer.phar(24): require('phar://C:/WinNM...')
#4 {main}
  thrown in phar://C:/WinNMP/bin/composer/composer.phar/vendor/composer/xdebug-handler/src/Process.php on line 149

My PHP version is this:

$ php --version
PHP 8.0.27 (cli) (built: Jan 20 2023 05:41:02) ( NTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.27, Copyright (c) Zend Technologies
1 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.