Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PHP 7.1] Composer 2.2.4 fetched from https://getcomposer.org/composer.phar causes "Call to undefined function stream_isatty()" #10464

@palmic

Description

@palmic

Reproduce:

= PHP version: ======

$ php -v
PHP 7.1.16-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Apr 5 2018 08:47:00) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.16-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

= direct composer latest version (2.2.4) works ok: ===========
$ curl -Ns https://getcomposer.org/download/2.2.4/composer.phar > ./composer.phar && chmod 777 ./composer.phar && ./composer.phar -V
Composer version 2.2.4 2022-01-08 12:30:42

= "latest" composer version download fetches composer which causes this error on use (current latest is 2.2.4): ===========
$ curl -Ns https://getcomposer.org/composer.phar > ./composer.phar && chmod 777 ./composer.phar && ./composer.phar -V
PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Component\Console\Output\stream_isatty() in phar:///home/palmam/composer.phar/vendor/symfony/console/Output/StreamOutput.php:113
Stack trace:
#0 phar:///home/palmam/composer.phar/vendor/symfony/console/Output/StreamOutput.php(51): Symfony\Component\Console\Output\StreamOutput->hasColorSupport()
#1 phar:///home/palmam/composer.phar/vendor/symfony/console/Output/ConsoleOutput.php(42): Symfony\Component\Console\Output\StreamOutput->__construct(Resource id #99, 32, NULL, Object(Symfony\Component\Console\Formatter\OutputFormatter))
#2 phar:///home/palmam/composer.phar/src/Composer/Factory.php(287): Symfony\Component\Console\Output\ConsoleOutput->__construct(32, NULL, Object(Symfony\Component\Console\Formatter\OutputFormatter))
#3 phar:///home/palmam/composer.phar/src/Composer/Console/Application.php(125): Composer\Factory::createOutput()
#4 phar:///home/palmam/composer.phar/bin/composer(83): Composer\Console\Application->run()
#5 /home/palmam/composer.phar(30): re in phar:///home/palmam/composer.phar/vendor/symfony/console/Output/StreamOutput.php on line 113

Fatal error: Uncaught Error: Call to undefined function Symfony\Component\Console\Output\stream_isatty() in phar:///home/palmam/composer.phar/vendor/symfony/console/Output/StreamOutput.php:113
Stack trace:
#0 phar:///home/palmam/composer.phar/vendor/symfony/console/Output/StreamOutput.php(51): Symfony\Component\Console\Output\StreamOutput->hasColorSupport()
#1 phar:///home/palmam/composer.phar/vendor/symfony/console/Output/ConsoleOutput.php(42): Symfony\Component\Console\Output\StreamOutput->__construct(Resource id #99, 32, NULL, Object(Symfony\Component\Console\Formatter\OutputFormatter))
#2 phar:///home/palmam/composer.phar/src/Composer/Factory.php(287): Symfony\Component\Console\Output\ConsoleOutput->__construct(32, NULL, Object(Symfony\Component\Console\Formatter\OutputFormatter))
#3 phar:///home/palmam/composer.phar/src/Composer/Console/Application.php(125): Composer\Factory::createOutput()
#4 phar:///home/palmam/composer.phar/bin/composer(83): Composer\Console\Application->run()
#5 /home/palmam/composer.phar(30): re in phar:///home/palmam/composer.phar/vendor/symfony/console/Output/StreamOutput.php on line 113

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions