-
Notifications
You must be signed in to change notification settings - Fork 408
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
Added ability to generate new requests/responses on duplicate start() #622
Conversation
@@ -175,15 +175,20 @@ public function testDoesNotPreserveVarsWhenFlagIsDisabled( | |||
|
|||
public function testKeepThePreviousStateOfOneViewComponentByDefault(): void | |||
{ | |||
$this->expectOutputString(<<<'html' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just some fixes to tests on a windows computer
@@ -378,15 +378,20 @@ public function testDoesNotPreserveVarsWhenFlagIsDisabled( | |||
|
|||
public function testKeepThePreviousStateOfOneViewComponentByDefault(): void | |||
{ | |||
$this->expectOutputString(<<<'html' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just some fixes to tests on a windows computer
Still don't work, but work better. Now if you go to: json, db, fortunes the response change correctly, but if you return the second time after change the URL return a 404. Perhaps it's a problem in the dispatcher (need renew anything) and why later show always 404 ? PD: if the first url is a 404, later all request return 404. Perhaps need to change anything in the dispatcher or router after a 404. |
How to disable the headers, especially the Content-Lenght ?? |
After check a bit the code, we can create tests for async. https://github.com/flightphp/core/blob/master/tests/EngineTest.php We can test more than 1 url (routes) in the same test method, to check if all work correctly. It isn't necessary Adapterman for that. Only without |
It's weird cause in the unit test, it should in theory run into the same problem because start is called twice. Maybe there's something else that needs to be considered. I'll probably build another unit test to see if I can replicate. |
This behavior can be shut off https://docs.flightphp.com/learn/configuration |
@joanhey Unit testing is my favorite thing! I was able to replicate the behavior as you can see in the You can shut off the content length by setting Flight to be |
If you know that the problem is the router. You need to fix it !! PD: now you |
Need to be the default. |
Register the For each request, always it's necessary a new |
Now it's working with Adapterman:
|
Another detail, remember that Adapterman need minimum PHP 8.0, if you add to the docs. |
When you create a new version, I'll add it to the Techempower Benchmark. |
I created version 3.14.0 and merged this and a few other things into it. |
With the last PRs merged, also the normal Flight will be faster. |
Added to Techempower benchmark TechEmpower/FrameworkBenchmarks#9598 PD: check the changes to use it with Adapterman |
This is hopefully to allow for easier integration with platforms like swoole, workerman, etc.