igniphp / framework

Swoole, PSR-15, PSR-7, PSR-11 lightweight modular anti-framework for REST micro-services.
MIT License
265 stars 14 forks source link

PHP 7.3 support #39

Closed roquie closed 5 years ago

roquie commented 5 years ago

If run framework with PHP 7.3 and Swoole, I got the following error:

roquie@roquies-MBP:~/google_drive/experiments/igni-framework-test/examples$ php build_in_server_example.php
[2019-03-02 11:02:42][INFO] - Server is listening 0.0.0.0:8080
[2019-03-02 11:02:45][INFO] - Client Igni\Network\Server\Client[1] connected
[2019-03-02 14:02:45 $81920.0]  WARNING swManager_check_exit_status: worker#6 abnormal exit, status=0, signal=11
A bug occurred in Swoole-v4.2.13, please report it.
The Swoole developers probably don't know about it,
and unless you report it, chances are it won't be fixed.
You can read How to report a bug doc before submitting any bug reports:
>> https://github.com/swoole/swoole-src/issues/2000
Please do not send bug reports in the mailing list or personal letters.
The issue page is also suitable to submit feature requests.

PHP Fatal error:  Uncaught Igni\Network\Exception\ClientException: Client with id 1 was not connected or is already disconnected. in /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Exception/ClientException.php:22
Stack trace:
#0 /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Server.php(101): Igni\Network\Exception\ClientException::forInactiveClient(1)
#1 /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Server.php(243): Igni\Network\Server->getClient(1)
#2 {main}
  thrown in /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Exception/ClientException.php on line 22

Fatal error: Uncaught Igni\Network\Exception\ClientException: Client with id 1 was not connected or is already disconnected. in /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Exception/ClientException.php:22
Stack trace:
#0 /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Server.php(101): Igni\Network\Exception\ClientException::forInactiveClient(1)
#1 /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Server.php(243): Igni\Network\Server->getClient(1)
#2 {main}
  thrown in /Users/roquie/google_drive/experiments/igni-framework-test/vendor/igniphp/network/src/Exception/ClientException.php on line 22
[2019-03-02 14:02:46 $81920.0]  WARNING swManager_check_exit_status: worker#6 abnormal exit, status=255, signal=0
[2019-03-02 11:02:46][INFO] - Client Igni\Network\Server\Client[2] connected
[2019-03-02 14:02:46 $81920.0]  WARNING swManager_check_exit_status: worker#7 abnormal exit, status=0, signal=11
A bug occurred in Swoole-v4.2.13, please report it.
The Swoole developers probably don't know about it,
and unless you report it, chances are it won't be fixed.
You can read How to report a bug doc before submitting any bug reports:
>> https://github.com/swoole/swoole-src/issues/2000
Please do not send bug reports in the mailing list or personal letters.
The issue page is also suitable to submit feature requests.

How to reproduce?

  1. clone framework repo
  2. install composer deps
  3. cd examples && php build_in_server_example.php

I watch this behavior from PHP 7.3.0 version and Swoole 4.2.7. Probably this bug is a framework bug.

roquie commented 5 years ago

https://github.com/igniphp/network works normally with standard examples.

roquie commented 5 years ago

Fucking magic!

Swoole falls when validating headers with usage \Zend\Diactoros\HeaderSecurity::isValid() method. While starting the preg_match function. But, if i want reproduce this behavior without Igni framework , – all works. WHAT IS IT!?

dkraczkowski commented 5 years ago

@roquie Thanks for rising the issue, I will look at it soon.

roquie commented 5 years ago

Fixed by swoole authors (4.3.3 works fine).