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

FIX lookupReverseOwners to work in deriving classes #235

Merged

Conversation

dnsl48
Copy link
Contributor

@dnsl48 dnsl48 commented Jun 4, 2019

The fix allows classes extending RecursivePublishable to use lookupReverseOwners.
Currently, those aren't always explicitly registered as extensions and as such DataObject::has_extension may return false even if RecursivePublishable is there, but the particular calling extension is not.
DataObject::has_extension checks for deriving classes internally (unless a third parameter given).

Related Issues

#72

@chillu chillu mentioned this pull request Jun 4, 2019
13 tasks
Copy link
Contributor

@ScopeyNZ ScopeyNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense.

@ScopeyNZ
Copy link
Contributor

ScopeyNZ commented Jun 9, 2019

@dnsl48 do you want to target this at 1.4 (or earlier)? It's a bugfix?

@dnsl48
Copy link
Contributor Author

dnsl48 commented Jun 9, 2019

Could do so, but I'm not sure it's worth the risk. Even though it's a bufgix, technically it amends the method behaviour. I'd prefer it to go to the next minor release, just as a safer path to take.

P.S. well, arguably it could be called an enhancement too, not strictly a bugfix :)

@ScopeyNZ
Copy link
Contributor

ScopeyNZ commented Jun 9, 2019

I'm still thinking it's probably a valid bugfix. I really think that if anyone else was subclassing RecursivePublishable then they'll have the same issue.

@dnsl48 dnsl48 changed the base branch from 1 to 1.4 June 9, 2019 20:46
@dnsl48
Copy link
Contributor Author

dnsl48 commented Jun 9, 2019

I've changed the base to 1.4

@ScopeyNZ ScopeyNZ merged commit 0e165ae into silverstripe:1.4 Jun 9, 2019
@dnsl48 dnsl48 deleted the pulls/1/lazy-reverse-owners branch June 9, 2019 22:37
@dnsl48 dnsl48 restored the pulls/1/lazy-reverse-owners branch June 9, 2019 22:37
@dnsl48 dnsl48 deleted the pulls/1/lazy-reverse-owners branch June 12, 2019 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants