Skip to content

Application::processRequest should return Response #348

Open
@bckp

Description

@bckp
  • Explain your intentions

I belive we should consider BC break change, and modify code of Application in way, that
public function processRequest(Request $request): IResponse
will return response instead of sending it directly from itself.

public function run(): void should get $response from processRequest and then send it.

  • It's up to you to make a strong case to convince the project's developers of the merits of this feature

With this approach, you can simply extends Application and create from current setup long running process that can repeat requests and responses, it will be much easier to implement PSR interface to Nette and it will help a lot with projects like HonkLegion/Roadrunner that implements Nette into RoadRunner (or any other long running process like FrankenPHP and others) worker approach (speed up applications by 30% with almost zero efford).

Right now, we need to copy a lot of code from Application to make this work, that make our life more miserable. In Nette, not much is changed (i know, it is BC break as processRequest is public) but it will help a lot to minimize modifications of Application to get better long running system.

I can create a MR for this, but before it i want to talk about that idea, if there is even minimal chance to get it approved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions