Skip to content
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

Handle Response object from runner in frankenphp #177

Open
guillaume-sainthillier opened this issue Nov 18, 2024 · 0 comments
Open

Handle Response object from runner in frankenphp #177

guillaume-sainthillier opened this issue Nov 18, 2024 · 0 comments

Comments

@guillaume-sainthillier
Copy link

guillaume-sainthillier commented Nov 18, 2024

Hello there!

Thanks for the amazing work with Frankenphp.
It would be nice if frankenphp runtime could handle a Response object in the runtime.
The SymfonyRuntime does handle it : https://github.com/symfony/runtime/blob/9889783c17e8a68fa5e88c8e8a1a85e802558dba/SymfonyRuntime.php#L137

One of the use case can be:

return function (array $context) {
    if ($context['APP_MAINTENANCE'] ?? false) {
        return new Response('MAINTENANCE IN PROGRESS', Response::HTTP_SERVICE_UNAVAILABLE);
    }

    return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant