Fix phpdoc for DataList::relation method (namespace) #8042
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 returns0
. 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 return1
.(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)