Skip to content

FrankenPHP: persist some core services across requests - #64104

Draft
CarlSchwan wants to merge 12 commits into
masterfrom
carl/PersistAcrossRequests
Draft

FrankenPHP: persist some core services across requests#64104
CarlSchwan wants to merge 12 commits into
masterfrom
carl/PersistAcrossRequests

Conversation

@CarlSchwan

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Used to mark a service as reusable between request when running franken
php.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
@CarlSchwan CarlSchwan self-assigned this Sep 7, 2026
@CarlSchwan
CarlSchwan requested a review from a team as a code owner September 7, 2026 14:31
@CarlSchwan
CarlSchwan requested review from Altahrim, leftybournes, provokateurin and salmart-dev and removed request for a team September 7, 2026 14:31
@CarlSchwan
CarlSchwan marked this pull request as draft September 7, 2026 14:37
Comment on lines -560 to +576
$application = $this->container->get($applicationClassName);
// Always the current container: this Router instance may outlive the request that built it.
$application = \OCP\Server::get($applicationClassName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit ugly.
I think I would prefer as a first step to keep the containers across requests, but empty their stored services completely.
And then as a second step make it possible to let some classes stay in the container across requests.

This would avoid the current dance where objects get stored in a static array and then back to the container.

Comment thread Caddyfile
}

localhost {
franken.local {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be pushed I guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants