Last modified: 2014-09-29 08:55:39 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 T69984, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67984 - Member variable visibility changes broke compatibility for extensions
Member variable visibility changes broke compatibility for extensions
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression
Depends on: 69824
Blocks: 67522
  Show dependency treegraph
 
Reported: 2014-07-14 11:25 UTC by Joel K. Pettersson
Modified: 2014-09-29 08:55 UTC (History)
8 users (show)

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


Attachments

Description Joel K. Pettersson 2014-07-14 11:25:53 UTC
The following change made some member variables of the EditPage class protected:

https://gerrit.wikimedia.org/r/#/c/133484/

The change seems to have been intended simply as a cleanup, but it broke compatibility with at least one extension, Semantic Forms. (See bug: https://bugzilla.wikimedia.org/show_bug.cgi?id=67522 ) I don't know whether or not any other extensions are affected.

Extension compatibility might not be such a high priority, but given the nature of the commit (just a cleanup), I file this in case making EditPage::$mTokenOk public again is agreeable. (I also saw that some other visibility changes from the above commit, to another class, were adjusted when they caused another, more serious problem: https://bugzilla.wikimedia.org/show_bug.cgi?id=65665 )

If you want to keep EditPage::$mTokenOk private, an alternative proposal would be to add a method to return the $mTokenOk status. That would still require changing any code that now relies on reading $mTokenOk, but it would make for the cleanest change.
Comment 1 Andre Klapper 2014-07-14 12:51:25 UTC
[CC'ing author and reviewer of the patch that introduced this problem]
Comment 2 Joel K. Pettersson 2014-07-28 15:55:30 UTC
Any preferences regarding how to solve it? Either of the two solutions I mentioned would make for a trivial patch.

If there's no comment in a while, I'll probably just go ahead with submitting the first alternative for review, and then if that isn't accepted, I'll go for the second alternative.
Comment 3 s7eph4n 2014-07-28 16:13:09 UTC
To be honest I'd go for reverting that patch altogether. It broke the interface without properly deprecating the variables first disregarding all dependencies.

http://www.mediawiki.org/wiki/Deprecation
Comment 4 Andre Klapper 2014-07-28 18:36:39 UTC
Siebrand: ping. Do you plan to fix that patch? Or need the extensions code changes instead? Replying to comment 3 welcome.
Comment 5 s7eph4n 2014-08-03 00:05:11 UTC
Patch: https://gerrit.wikimedia.org/r/#/c/151370/
Comment 6 Gerrit Notification Bot 2014-08-03 00:06:21 UTC
Change 151370 had a related patch set uploaded by Legoktm:
Fix for Ia9baaf0b: Make previously public variables public again

https://gerrit.wikimedia.org/r/151370
Comment 7 Bawolff (Brian Wolff) 2014-08-29 19:50:42 UTC
(In reply to Joel K. Pettersson from comment #2)
> Any preferences regarding how to solve it? Either of the two solutions I
> mentioned would make for a trivial patch.
> 
> If there's no comment in a while, I'll probably just go ahead with
> submitting the first alternative for review, and then if that isn't
> accepted, I'll go for the second alternative.

The visibility change is now reverted. Going forward we should probably investigate if the way SemanticForms is using EditPage is appropriate, as well as if a differing deprecation practice for member variables is appropriate (comment 3).
Comment 8 Gerrit Notification Bot 2014-09-12 19:52:57 UTC
Change 151370 merged by jenkins-bot:
Fix for Ia9baaf0b: Make previously public variables public again

https://gerrit.wikimedia.org/r/151370
Comment 9 s7eph4n 2014-09-12 20:21:44 UTC
This bug should stay open, Ia9baaf0b is only one of many patches changing variable visibility. However given the time and effort this one took, I will not try to fix up any of the other patches.

For a full list of candidates in need of fixing see here: https://gerrit.wikimedia.org/r/#/q/owner:siebrand%2540kitano.nl+topic:phpcs,n,z

Siebrand claims he checked all the extensions on WMF's gerrit and I believe him. Only 1. he missed at least one, so maybe others and 2. there is more than 5000 extensions out there according to Wikiapiary, WMF's gerrit knows only 2242.
Comment 10 Andre Klapper 2014-09-13 09:26:41 UTC
(In reply to s7eph4n from comment #9)
> This bug should stay open

Errm, you wrote that comment while closing this ticket.  :)
Or you could create a followup ticket with lower priority for remaining work.
Comment 11 s7eph4n 2014-09-13 09:38:45 UTC
Did I? Darn... Got confused with the SemanticForms specific bug, I guess.

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


Navigation
Links