-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: initStateless() method #54
Comments
Additional Information. I already tried to test locally and the tests fail.
Without overriding these functions, the tests fail and do not want to work at all. So I have a huge request for you: Thank you very much in advance! |
Hi @vanodevium Before Adapterman was using the same With PHP is using the superglobals, to initiate any request. And that is incompatible with a threading system. As any change in these global values will affect the others threads. For that they need to encapsulate that values inside classes (Request and Response). Workerman v4 don't use any superglobal, so we need to create another The near futureActually Adapterman override the header functions, that don't work with CLI. But later we need an spiral of changes with any function that use the headers: setcookie, sessions, .... After checking the PHP C source, with a very small change, the headers can work in CLI also and we can remove all the override functions and php code in Adapterman (and other CLI apps). I created the issue php/php-src#12304 After this small change, we can use any PHP app without overrides or extra php code. And any code using setcookie or sessions will work without any problem. |
I am very grateful to you for such a detailed and understandable answer! |
Created PR php/php-src#16145 To use the php native functions, without disable in .ini and recreate them in php. |
When my laravel app doesn't use sessions at all, or it's set to a non-file engine, I don't want to rewrite php functions.
So it's just another adapterman initialization method that won't check the php.ini
Something like:
Adapterman::initStateless();
The text was updated successfully, but these errors were encountered: