Last modified: 2013-10-30 11:30:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37640, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35640 - Article::delete() calls
Article::delete() calls
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.19
All All
: High normal (vote)
: 1.19.0 release
Assigned To: Platonides
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-01 21:25 UTC by Platonides
Modified: 2013-10-30 11:30 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Platonides 2012-04-01 21:25:58 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.
Comment 1 Jeroen De Dauw 2012-04-02 12:17:25 UTC
> 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.
Comment 2 Platonides 2012-04-02 12:18:39 UTC
Then it shouldn't be deprecated if it's still used.
Comment 3 Jeroen De Dauw 2012-04-02 12:20:38 UTC
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 :)
Comment 4 Platonides 2012-04-02 12:23:25 UTC
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
Comment 5 Alexandre Emsenhuber [IAlex] 2012-04-02 17:54:51 UTC
(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.
Comment 6 Jeroen De Dauw 2012-04-03 16:14:22 UTC
> 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...
Comment 7 Alexandre Emsenhuber [IAlex] 2012-04-03 16:17:14 UTC
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 ;)
Comment 8 Jeroen De Dauw 2012-04-03 16:21:18 UTC
(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.
Comment 9 Tyler Romeo 2012-08-06 15:46:02 UTC
This has since been fixed: https://gerrit.wikimedia.org/r/9968
Comment 10 Platonides 2012-08-07 11:37:34 UTC
That's funny, I fixed it without remembering about this bug.
Thanks Tyler.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links