php-school / cli-menu

🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.
http://www.phpschool.io
MIT License
1.94k stars 106 forks source link

Windows compatibility: replace posix_isatty() with stream_isatty() #257

Closed underdpt closed 11 months ago

underdpt commented 2 years ago

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?

mikeymike commented 2 years ago

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

AydinHassan commented 2 years ago

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.

underdpt commented 2 years ago

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.

dverkauf commented 1 year ago

Any news about Windows support?

AydinHassan commented 11 months ago

@dverkauf we tried with windows before and didn't make any progress so it's not a priority for us, but we are of course happy to accept pr's!