-
Notifications
You must be signed in to change notification settings - Fork 824
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
CMS action related extension points #9340
CMS action related extension points #9340
Conversation
mfendeksilverstripe
commented
Nov 26, 2019
•
edited
Loading
edited
- several new extension points added
- these extension points allow to execute some custom code related to handling of user actions
- no functional changes
- these changes are required for Action trigger feature silverstripe-versioned-snapshots#25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some revisions. I don't think we need to have so many extension points. It's not a great developer experience to have to remember all those names. I think a simple before
and after
hook, like we do in other components will suffice. To disambiguate between the Controller/Field/Form/RequestHandler methods, we'll pass $subject
to the extension hook, and the developer can use a simple instanceof
check to change the code path based on where the method was called.
Make sense?
@unclecheese @blueo Restoring this branch as it's still needed for the snapshots backwards compatibility. |
* CMS action related extension points * Refactor to use fewer extension points * Remove explicit return type Co-authored-by: Aaron Carlino <[email protected]>
Hey team, this was merged into the 4 branch but wasn't released in 4.5.0, so is now being lined up for the next patch release as 4.5.1. I don't think it's a patch change, so suggest we revert it from the 4.5 branch and allow it to be released in 4.6.0 when that comes out later on. Thoughts? cc @mfendeksilverstripe @unclecheese |
Yeah, I had a chat with the team about this. 4.6 isn't due out until June, and we have critical developments in the versioned-snapshots module that rely on this change, and we weighed the options and decided this was the best approach. It isn't really a new API, and it's not a bugfix, either, so while I agree it's pushing the boundary a bit, I don't think it should be reverted. If anyone can make a good argument otherwise, I'm open to it, however. |
Extension points are always tricky to categorise, yeah. I was looking at releasing a patch version so #9367 could be shipped, are you happy for me to do that now? |
Yup, have at it. |