Page MenuHomePhabricator

Reduce public variables and methods in EditPage
Open, Needs TriagePublic

Description

Currently, there is a large number of public methods and variables that shouldn't be used outside of the class (eg when the entire EditPage object is passed in a hook). These should be deprecated for public access and made private

methods to make private*
EditPage::extractSectionTitle (used in EditPageTest)
EditPage::getSummaryInputWidget
EditPage::noSuchSectionPage
EditPage::initialiseForm
EditPage::setPreloadedContent (entirely unused)

*Only used in EditPage unless noted otherwise

Variables to make private
EditPage::$hookError
EditPage::$deletedSinceEdit
EditPage::$lastDelete
EditPage::$mTokenOkExceptSuffix
EditPage::$mTriedSave
EditPage::$incompleteForm
EditPage::$tooBig
EditPage::$missingComment
EditPage::$missingSummary
EditPage::$allowBlankSummary
EditPage::$autoSumm
EditPage::$hasPresetSummary
EditPage::$recreate
EditPage::$noSummary
EditPage::$parentRevId
EditPage::$editintro
EditPage::$markAsBot
EditPage::$mPreloadContent (public method setPreloadedContent exists, as does protected getPreloadedContent)

Event Timeline

DannyS712 updated the task description. (Show Details)
DannyS712 updated the task description. (Show Details)May 15 2020, 6:59 PM
DannyS712 updated the task description. (Show Details)May 16 2020, 12:34 AM

Change 596791 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Make EditPage::$hookError private

https://gerrit.wikimedia.org/r/596791

Change 596791 merged by jenkins-bot:
[mediawiki/core@master] Make EditPage::$hookError private

https://gerrit.wikimedia.org/r/596791

DannyS712 updated the task description. (Show Details)Sep 13 2020, 11:38 PM
DannyS712 updated the task description. (Show Details)Tue, Nov 10, 11:28 PM

Change 640490 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Reduce public methods of EditPage

https://gerrit.wikimedia.org/r/640490

Change 640490 merged by jenkins-bot:
[mediawiki/core@master] Reduce public methods of EditPage

https://gerrit.wikimedia.org/r/640490

Change 641504 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add RELEASE-NOTES for removals of EditPage public methods

https://gerrit.wikimedia.org/r/641504

Change 641504 merged by jenkins-bot:
[mediawiki/core@master] Add RELEASE-NOTES for removals of EditPage public methods

https://gerrit.wikimedia.org/r/641504

I see several patches merged. Is this completed?

The variables need to be made private still

Change 642440 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Make @internal EditPage variables private

https://gerrit.wikimedia.org/r/642440