cli-menu icon indicating copy to clipboard operation
cli-menu copied to clipboard

Windows compatibility: replace posix_isatty() with stream_isatty()

Open underdpt opened this issue 3 years ago • 3 comments

Hello,

Giving it another try to check if there's a way to make this package windows compatible, i found stream_isatty() which is described on php documentation as a posix_isatty() replacement, and is windows compatible.

What do you think?

underdpt avatar Jul 05 '22 08:07 underdpt

Hey @underdpt

Sounds promising, I'm not 100% sure what else might need refactoring to support windows but I'd be interested to see if that gets over any initial hurdles. I have little to no experience with windows around this area so would welcome any assistance, prototyping etc

mikeymike avatar Jul 05 '22 09:07 mikeymike

Also, looks like that function is only available in PHP 7.2, currently we support 7.1. I'm happy to drop support for 7.1 though. But as @mikeymike says, I don't think that will be last issue. In fact, we probably added that because we couldn't get it to work on windows.

AydinHassan avatar Jul 05 '22 09:07 AydinHassan

I'm on vacation in two weeks. Will try to make a PR then and run the tests to see what other issues arise. I have a project that runs on windows where this would be very useful, so if the tests passes, will try a quick integration to check if it works in a real life application.

underdpt avatar Jul 05 '22 09:07 underdpt