ghedipunk / PHP-Websockets

A Websockets server written in PHP.
BSD 3-Clause "New" or "Revised" License
917 stars 374 forks source link

minimum php version a question to ghedipunk #31

Closed Xaraknid closed 9 years ago

Xaraknid commented 9 years ago

I would like to know what the lowest php version you want php-websockets to support?

As I see in developement you use "namespace" that mean php 5.3 required.

I currently working on optimization of the current code and I think I find a way to meet the requirement you want for this project. Keep core code, allow multiple method library and allow dev patch in different space. That way user patch will be untouched if we upgrade the core code.

That way I will be able to pull a version optimized with support to default ( socket ) , libev eventloop and a spot for making libevent too for windows server.

But all this will required to make the minimum php version to 5.4 using traits. Is this correct for you ?

ghedipunk commented 9 years ago

5.4, because it is the earliest version still within the support lifecycle on PHP.

For the record, I am reluctant to add non-backwards-compatible features without discussion. However, traits are a good feature to implement, so I'm happy to break compatibility with a PHP version that has been officially unsupported for nearly a year.

Xaraknid commented 9 years ago

Excellent, thanks!

A follow-up question : Did you approve this structures ? ./testwebsock.php ./eventloop/socket.php ./eventloop/libev.php ./extensions/ <-- future extensions like permessage-deflate (compression) ./subprotocol/ ./userpatch/ <-- patch made by dev

for users.php and websockets.php you want it in ; ./ or ./core/