Last modified: 2013-10-30 11:30:13 UTC
Article::delete() calls deprecated functions Article::doWatch and Article::doUnwatch. git blame points to 98ba9f0c1b2727d867f17fe0c2a97e85b3e2d9a7 but that's just a reordering. Same with 26d87254c02f32b4bf98b2204d7daba1f0fc20de Those functions were deprecated and replaced with Action::factory in 8779f4b55fe1753f762c8477f344f8c4267562ea wfDeprecated were added in 49cdca93bed77941a6d0469f51e06d1c1c49cb72, which is wrong while core still calls them. Finding out which revisions they are is left as an exercise to reader, which is why I'm filling this at bugzilla.
> which is wrong while core still calls them. Either a function is deprecated or it's not. If you mark it as deprecated in the docs, then you also put in a call to wfDeprecated, that's what it's for.
Then it shouldn't be deprecated if it's still used.
If you mean "still used in core", sure. If you mean "used anywhere", then it does not make much sense anymore to bother with it at all right :)
Functions Article::doWatch and Article::doUnwatch are marked as deprecated, with both @deprecated and wfDeprecated(). Core still calls them in the non-deprecated function Article::delete(). Thus this is a bug. QED
(In reply to comment #1) > Either a function is deprecated or it's not. If you mark it as deprecated in > the docs, then you also put in a call to wfDeprecated, that's what it's for. From what I recall, wfDeprecated() should only be added once all usages are removed in both core and extensions.
> From what I recall, wfDeprecated() should only be added once all usages are removed in both core and extensions. A lot of people are saying this, but use your brain and think about it. What I said. Either you deprecate it or not, you do not go mark it as deprecated in the docs and then don't provide the warning. This is extremely evil towards extension devs. So either remove both the doc and warning, or keep both. Don't just remove the warning...
And if we what you say, we make extensions dev crazy because we did not offer them time to updater their code and now they gets warnings ;)
(In reply to comment #7) > And if we what you say, we make extensions dev crazy because we did not offer > them time to updater their code and now they gets warnings ;) I don't think you understand the purpose of wfDeprecated. It is there so extension developers can get warnings and notice they are using deprecated code. If they do not want warnings, then they will not turn on developer warnings and not get then.
This has since been fixed: https://gerrit.wikimedia.org/r/9968
That's funny, I fixed it without remembering about this bug. Thanks Tyler.