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

!!! TASK: Remove dispatched state from ActionRequest #3301

Merged
merged 5 commits into from
Sep 12, 2024

Commits on Sep 12, 2024

  1. TASK: Remove Flow's RequestInterface

    TLTR:
    
    Since the separation of http and cli requests the interface is completely unused. And strict types against its only implementation, the ActionRequest make it impossible to implement a custom request.
    
    --------
    
    _Initially_ the interface was introduced with 2a26925 at beginning of time. At that time this was done probably to be able to type against the interface instead of the common `Request` class, that the Cli and Web Request both extended.
    
    With the removal of many methods in its interface 8c40ff2 and with the full separation of action and cli requests #1552 the interface became useless.
    
    The dispatcher and controller interface are both typed against the `ActionRequest` and so it's impossible to implement a custom request.
    mhsdesign authored and kitsunet committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    4b7b8d0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7bd9e17 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c83a33e View commit details
    Browse the repository at this point in the history
  4. WIP: TASK: Remove obsolete "RollsBackToTheParentRequest" logic in dis…

    …patcher
    
    As discussed we concluded that this logic might be faulty and actually do harm without the `isDispatched` in place:
    
    Background:
    
    the dispatcher is either used for main request, in which case this logic is not needed, or for subrequest like in a fusion plugin
    
    Scenario:
    
    A subrequest, while being handled, throws a `StopActionException`.
    which is caught here. We check if it's a main request and get the main request which is now to be handled in the loop, like a forward.
    
    Thesis:
    
    Now it will actually render the outer response inside the plugin
    But previously because the main request was dispatched === true, it would not be handled.
    
    Example:
    
    Using `throwStatus` in a plugin will result in the main request rendering being started again and again until the memory is exhausted.
    mhsdesign authored and kitsunet committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    4568a9a View commit details
    Browse the repository at this point in the history
  5. Re-enable skipped tests

    kitsunet committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    8c81fd0 View commit details
    Browse the repository at this point in the history