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

[5.4.0] --output doesn't work anymore #281

Closed remicollet closed 3 years ago

remicollet commented 3 years ago

Simple phpcompatinfo analyser:run src/Bartlett/CompatInfo/Sniffs/ --output /tmp/foo.log --no-ansi display its report and doesn't populate the /tmp/foo.log file

remicollet commented 3 years ago

Simple workaround phpcompatinfo analyser:run src/Bartlett/CompatInfo/Sniffs/ --no-ansi > /tmp/foo.log

llaville commented 3 years ago

--output option behaviour has changed. To write result to a local file, you need to specified also --profile (it seems ok when I wrote it). See https://github.com/llaville/php-compat-info/blob/5.4.0/src/Bartlett/CompatInfo/Console/CommandFactory.php#L327-L335

When you specify a target file, it writes into this file

bin/phpcompatinfo analyser:run src/ --output tests/dummy.log --profile

// ... more 

Profile results are being logged as JSON format to tests/dummy.log

Time: 15.93 seconds, Memory: 26.00Mb

And without naming a target file, it writes a tempory one in /tmp folder of system


bin/phpcompatinfo analyser:run src/ --output --profile

// ... more 

Profile results are being logged as JSON format to /tmp/a13f449e-7fdd-4f40-b3da-abe29a76d03e-compatinfo.json

Time: 20.97 seconds, Memory: 26.00Mb```