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 phpdoc for DataList::relation method (namespace) #8042

Merged
merged 1 commit into from
Apr 30, 2018

Conversation

JorisDebonnet
Copy link
Contributor

Fixed an old non-namespaced phpdoc.

The example from that doc still doesn't seem to work though. Perhaps I should create an issue about that, but you never know someone here knows what's wrong.

When I try DataList::Create(\SilverStripe\Security\Group::class)->relation("Members")->Count() it returns 0. Even on a brand-new installation, it should at least return the Default Administrator (belonging to the Administrator group), shouldn't it? At least, \SilverStripe\Security\Group::get()->byID(2)->Members()->Count() does return 1.

(I'm trying to fix an issue in symbiote/silverstripe-memberprofiles where I have the same issue of relation("Members") returning an empty list while expecting Members)

@JorisDebonnet JorisDebonnet changed the title Fix phpdoc for relation method (namespace) Fix phpdoc for DataList::relation method (namespace) Apr 30, 2018
@dhensby
Copy link
Contributor

dhensby commented Apr 30, 2018

This docs fix looks good, so I'll merge it - I'm really not sure about the bug you describe, a new issue for that would be good.

@dhensby dhensby merged commit c5b0bd8 into silverstripe:4 Apr 30, 2018
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.

2 participants