-
-
Notifications
You must be signed in to change notification settings - Fork 34
feat: add a runtime for FrankenPHP with Symfony #124
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
Conversation
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.
small copy & paste error. Looking forward to Early Hints 👀
if ($this->kernel instanceof TerminableInterface && $sfRequest && $sfResponse) { | ||
$this->kernel->terminate($sfRequest, $sfResponse); | ||
} | ||
} while ($ret); |
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.
Sorry for the review but maybe the callable could define its return type : void
if I'm right, same for the first one:
$server = array_filter($_SERVER, static fn (string $key): bool => !str_starts_with($key, 'HTTP_'), ARRAY_FILTER_USE_KEY);
I'm not sure if the current lib tend to define return types on callable 🙁
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.
I usually dont add return types on callables. It gives zero to little benefit. But it is just a matter of taste. As long as CI is not complaining, Im fine with adding return types.
if ($this->kernel instanceof TerminableInterface && $sfRequest && $sfResponse) { | ||
$this->kernel->terminate($sfRequest, $sfResponse); | ||
} |
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.
Should this part not be also inside the frankenphp_handle_request
. Or does it have no difference here? If its inside or outside the callable. I'm not sure if the terminate is this way called for every request as it should, else I know some projects which would crash into unexpected state.
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.
Frankenphp only cares about putting out the response. A "cleanup" or background process could be running outside IMHO.
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.
I'm not sure if the terminate is this way called for every request as it should
It does.
Could you please rebase your PR now when #125 is merged? |
Co-authored-by: Alexander Schranz <alexander@sulu.io>
8f9b802
to
94136bc
Compare
@Nyholm rebased |
Thank you! |
Thank you very much @Nyholm! |
Add a runtime for the worker mode of FrankenPHP. To be released this afternoon at ForumPHP!