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

CMS action related extension points #9340

Conversation

mfendeksilverstripe
Copy link
Contributor

@mfendeksilverstripe mfendeksilverstripe commented Nov 26, 2019

Copy link

@unclecheese unclecheese left a 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 unclecheese merged commit acbbf80 into silverstripe:4 Jan 15, 2020
@unclecheese unclecheese deleted the feature/request-handler-extension-points branch January 15, 2020 01:24
@mfendeksilverstripe mfendeksilverstripe restored the feature/request-handler-extension-points branch January 15, 2020 19:16
@mfendeksilverstripe
Copy link
Contributor Author

@unclecheese @blueo Restoring this branch as it's still needed for the snapshots backwards compatibility.

unclecheese pushed a commit that referenced this pull request Jan 27, 2020
* CMS action related extension points

* Refactor to use fewer extension points

* Remove explicit return type

Co-authored-by: Aaron Carlino <[email protected]>
@robbieaverill
Copy link
Contributor

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

@unclecheese
Copy link

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.

@robbieaverill
Copy link
Contributor

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?

@unclecheese
Copy link

Yup, have at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants