Uh oh!
There was an error while loading. Please reload this page.
Remove clear from Entity, Item and Property - #614
Conversation
JeroenDeDauw
commented
Feb 8, 2016
IIRC that use case will need a replacement that can create an "empty" entity of the same type. We have no code that can do this currently. Could have something like the Perhaps we should double check if we actually care about this use case? If the property one was broken, then perhaps we could just have it support items, and not have to deal with this in a more general way? |
Benestar
commented
Feb 8, 2016
We just got rid fo that single use case: https://gerrit.wikimedia.org/r/#/c/268970/2/repo/includes/api/EditEntity.php I don't like the idea of adding something like this to EntityDocument. Rather create some abstract method in EntityContent or EntityHandler to do that. |
JeroenDeDauw
commented
Feb 8, 2016
In that case, why not remove the method already? |
Benestar
commented
Feb 8, 2016
Agree, we can also just remove it. Will change this PR accordingly. |
JeroenDeDauw
commented
Feb 9, 2016
+2 if someone else is at least +1. |
thiemowmde
commented
Feb 9, 2016
We discussed changes like this many, many times. Again, what's the benefit of removing methods instead of simply not using them? There is no simple replacement, as Jeroen correctly said. -2. |
thiemowmde
commented
Feb 9, 2016
Why is this tagged as a bug? |
JeroenDeDauw
commented
Feb 9, 2016
|
05e1612 to
938e18aCompareJeroenDeDauw
commented
Feb 12, 2016
@thiemowmde still -2? |
thiemowmde
commented
Feb 12, 2016
Let's please do this in a later release (probably 6.0) together with the removal of Entity. |
New instances should be created instead of clearing an existing Entity. The only real usecase for this seems to be the clear=true parameter in the wbeditentity api module. Property::clear even had a bug in that it didn't clear the statements but only the fingerprint.
thiemowmde
commented
Mar 10, 2016
Rebased. +2 from my side. Waiting for the tests. |
Remove clear from Entity, Item and Property
New instances should be created instead of clearing an existing Entity.
The only real usecase for this seems to be the clear=true parameter in the
wbeditentity api module.
Property::clear even had a bug in that it didn't clear the statements but
only the fingerprint.