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: Mvc\Dispatcher::afterControllerInvocation will not be called for CLI requests anymore. #3296

Open
wants to merge 1 commit into
base: 9.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Jan 30, 2024

Reverts that the cli dispatcher invokes the mvc slots dispatcher slots with cli requests.

When there was one dispatcher the slot afterControllerInvocation was fired for both cli and web request. (Seemingly only ever at Runtime?)

Then with the split of web and cli dispatchers this legacy layer was introduced:

cf55b18#diff-2c9408e74a8ac737f84468e74c23956d2057e64196e66b97281905d8697226ca

Now during a short time the Mvc\Dispatcher::afterControllerInvocation signal was now also called for cli request during compile time.

With this bugfix #2529 the initial behaviour was restored again. For cli request it will only fire at runtime, and web request are either way always runtime.

This breaking change cleans up the legacy layer.

  • The original signals Mvc\Dispatcher 'afterControllerInvocation' and 'beforeControllerInvocation'
    Will be only invoked for action requests.
    They still only fire at runtime, as web requests happen at runtime.

  • The with Flow 6.0 introduced signals Cli\Dispatcher 'afterControllerInvocation' and 'beforeControllerInvocation'
    Will still be only invoked for cli requests.
    Will still fired either at compile or runtime, as cli requests can happen always.

Upgrade instructions

In case you used the MVC signals and relied on it to also be invoked for CliRequest, you need to connect as well to the respective Cli\Dispatcher signal. But keep in mind that you might need to check if flow is in runtime as this signal will be also fired for compile time unlike the mvc signal before.

Review instructions

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@mhsdesign
Copy link
Member Author

mhsdesign commented Jan 30, 2024

Related #3232 (comment)

and @kitsunet 's comment:

cli dispatch is a bit of a mess, and good point we should probably breaking fix it for this release. it has been this way ever since we split the two. It was one dispatcher at some point but that really didn't work well api wise, so I ripped it apart brutally with some dirt left behind....

And #1892

…led for CLI requests anymore.

Reverts that the cli dispatcher invokes the mvc slots dispatcher slots with cli requests.

When there was one dispatcher the slot `afterControllerInvocation` was fired for both cli and web request. (Seemingly only ever at Runtime?)

Then with the split of web and cli dispatchers this legacy layer was introduced:

neos@cf55b18#diff-2c9408e74a8ac737f84468e74c23956d2057e64196e66b97281905d8697226ca

Now during a short time the `Mvc\Dispatcher::afterControllerInvocation` signal was now also called for cli request during compile time.

With this bugfix neos#2529 the initial behaviour was restored again.
For cli request it will only fire at runtime, and web request are either way always runtime.

This breaking change cleans up the legacy layer.

- The original signals Mvc\Dispatcher 'afterControllerInvocation' and 'BeforeControllerInvocation'
Will be only invoked for action requests.
They still only fire at runtime, as web requests happen at runtime.

- The with Flow 6.0 introduced signals Cli\Dispatcher 'afterControllerInvocation' and 'BeforeControllerInvocation'
Will still be only invoked for cli requests.
Will still fired either at compile or runtime, as cli requests can happen always.

In case you used the MVC signals and relied on it to also be invoked for CliRequest, you need to connect as well to the respective Cli\Dispatcher signal.
But keep in mind that you might need to check if flow is in runtime as this signal will be also fired for compile time unlike the mvc signal before.
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.

None yet

1 participant