Closed windware-ono closed 3 years ago
I run pug-php with PHP 8 for months with no issues. hasColorSupport()
tries to check if your system supports color in CLI.
The case where STDOUT
is not defined is pretty rare and not related to the version but more likely the config (in a normal install of PHP, it's fopen('php://stdout', 'w')
) but I can see in the last version of Symfony, the presence of STDOUT
is also checked first. I could follow this path and just disable color if the constant is missing.
Hmm, the PHP I installed is PHP 8.0.3 on Ubuntu 20.04 through ppa:ondrej/php
, so I thought I'm not in a rare environment.
It does say STDOUT/IN/ERR are only defined in CLI SAPI but then it still worked with PHP 7.4 from the same ppa repo enabling same PHP modules. https://www.php.net/manual/en/features.commandline.io-streams.php
Thanks for the fix.
Fixed in phug 1.8.2, please upgrade and retry.
I get
Undefined constant "STDOUT"
error using this on PHP 8.0 undervendor/phug/phug/src/Phug/Renderer/Renderer/Partial/Debug/DebuggerTrait.php
inPhug\Renderer::hasColorSupport
for@posix_isatty(STDOUT);
.