-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
EXPERIMENT: FEATURE: Introduce trait ActionToMethodDelegation
to create own simple controller.
#3297
base: temporary-mvc-refactoring-target-branch
Are you sure you want to change the base?
Conversation
Haha, well, I wanted to do this after I finish my work stuff, well, good good. Btw, this ignores the public method thing you noted on the original simple controller chnage before, and I wanted to comment that that needs reflection which is nasty, so I would rather not check visibility. |
ActionToMethodDelegation
instead of SimpleActionController
.ActionToMethodDelegation
instead of SimpleActionController
.
I was unsure to do this in this pr or let this trait first be destroyed by someone who dislikes it :D Actually i did plan on using reflection as its super fast nowadays (faster than property mapping :D) https://stackoverflow.com/questions/4160901/how-to-check-if-a-function-is-public-or-protected-in-php
|
Aaand i really think that we should keep this change out of the main pr #3232 (comment) right now (also the class The introduction of |
Neat, well then, great, we can check callable and public in one go. |
We should/could use this also for the existing Controller?! |
Yes sounds great. And im already glad this is an own pr 😅 |
ActionToMethodDelegation
instead of SimpleActionController
.ActionToMethodDelegation
to create own simple controller.
Will be split up into an own pr neos#3297
We also discussed to keep the
|
57170ee
to
f5b137f
Compare
This reverts commit 82caa27.
…tionController`. The name of the previously suggested `SimpleActionController` looked for improvement. The `Simple*` prefix suggest, that the initial implementation blew up too much. But ideally a name would be more obvious and not suggest that there is another _complex_ action controller. I could not come up with a better name, but we can make the controllers more composable. This change introduces a trait which implements the logic of the previous `SimpleActionController`. That way people can implement the `ControllerInterface` directly and use a trait that will map action to method name.
b9e1b79
to
cadaaba
Compare
080c854
to
f37ce2c
Compare
ActionToMethodDelegation
to create own simple controller.ActionToMethodDelegation
to create own simple controller.
Will be split up into an own pr neos/flow-development-collection#3297
The name of the previously suggested
SimpleActionController
looked for improvement.The
Simple*
prefix suggest, that the initial implementation blew up too much. But ideally a name would be more obvious and not suggest that there is another complex action controller.I could not come up with a better name, but we can make the controllers more composable.
This change introduces a trait which implements the logic of the previous
SimpleActionController
.That way people can implement the
ControllerInterface
directly and use a trait that will map action to method name.Upgrade instructions
Review instructions
See also
ActionResponse
(simpler controller pattern) #3232 (comment)Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions