llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
371 stars 21 forks source link

7.0.0 - 2023-05-12 crashes #361

Closed MaMaKow closed 1 year ago

MaMaKow commented 1 year ago

Bug report category

Diagnose

Output of `diagnose` command
Mandelkow@DESKTOP-N615Q0T MINGW64 ~/bar/dienstplan-apotheke (development)
$ php tests/phpcompatinfo.phar analyser:run ../
PHP Fatal error:  Uncaught TypeError: trim() expects parameter 1 to be string, bool given in phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Terminal.php:60
Stack trace:
#0 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Terminal.php(60): trim(false)
#1 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Terminal.php(31): HumbugBox436\KevinGH\Re
quirementChecker\Terminal::initDimensions()
#2 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Printer.php(28): HumbugBox436\KevinGH\Req
uirementChecker\Terminal->getWidth()
#3 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Checker.php(17): HumbugBox436\KevinGH\Req
uirementChecker\Printer->__constru in phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Termin
al.php on line 60

Fatal error: Uncaught TypeError: trim() expects parameter 1 to be string, bool given in phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Terminal.php:60
Stack trace:
#0 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Terminal.php(60): trim(false)
#1 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Terminal.php(31): HumbugBox436\KevinGH\Re
quirementChecker\Terminal::initDimensions()
#2 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Printer.php(28): HumbugBox436\KevinGH\Req
uirementChecker\Terminal->getWidth()
#3 phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Checker.php(17): HumbugBox436\KevinGH\Req
uirementChecker\Printer->__constru in phar://C:/Users/foo/tests/phpcompatinfo.phar/.box/src/Termin
al.php on line 60

Summary

Analysis does not run

Expected behaviour

Program does run

Actual behaviour

Program crashes

$ php --version
PHP 7.4.16 (cli) (built: Mar  2 2021 14:06:15) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
llaville commented 1 year ago

Major version v7 is not supposed to run on PHP 7 platform. See minimum requirements

llaville commented 1 year ago

Here is what you should get if you try to run PHP CompatInfo 7.0 PHAR distribution on PHP 7 platform

phpcompatinfo-v7_PHP7