-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add clear to list classes #649
Conversation
src/Term/AliasGroupList.php
Outdated
* | ||
* @since 5.1 | ||
*/ | ||
public function clear() { |
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.
There is Fingerprint::setAliasGroups
, so we should not need this.
Looks good. Could perhaps also test that an empty list does not change state. But not that important |
@Benestar and I had a look in our code base.
|
On hold, should not block 5.1.0 |
Rebased.
|
What I wrote above is still true. There is still code that needs to clean these list classes. Refactoring all this code in a way that it does not need to do this is a lot of effort, and probably not really worth it. I strongly supported #614 because it should not be possible to "repurpose" an existing entity and turn it into something completely different. There really should not be an Considering the odd fact that I just implemented a |
This is needed as a replacement for users of the holder interfaces to remove all elements from one of the given list classes. Bug: T128363
@@ -342,6 +342,15 @@ public function filter( StatementFilter $filter ) { | |||
} | |||
|
|||
/** | |||
* Removes all statements from this list. | |||
* | |||
* @since 6.0 |
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.
this should have been 7.0 (or maybe 6.4) I guess
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.
Thanks! Fixed in #719.
This is needed as a replacement for users of the holder interfaces to remove all elements from one of the given list classes.
Bug: T128363