Page MenuHomePhabricator

Complete WikiPage/Article split and deprecate Page interface
Open, Needs TriagePublic

Description

The Page interface was introduced in r91123 (June 2011) as a temporary migration step on the way to splitting WikiPage and Article. Also as a temporary migration measure, all WikiPage public methods were duplicated into Article, proxying to WikiPage. Article::__get() and Article::__set() were added, to provide temporary access to WikiPage public member variables via Article. All of these temporary migration hacks still remain, 8 years later.

I believe that fixing this is feasible for a talented contractor.

Work plan:

  • Hard-deprecate all methods of Article that say they are a "Call to WikiPage function for backwards compatibility", except for getActionOverrides().
  • Hard-deprecate the following other Article methods: __get, __set, doDeleteArticle(), doUpdateRestrictions(), updateRestrictions(), doRollback(), commitRollback().
  • Rectify any callers of the above methods in core and WMF-deployed extensions -
  • Make Action::factory() and Action::__construct() take an Article as a parameter instead of a Page. Codesearch suggests that only Flow will be broken by this, requiring a simultaneous update.
  • Add Action::getWikiPage() and Action::getArticle(). Soft-deprecate direct access to Action::$page in favour of these new accessors and fix such access in core.
  • Soft-deprecate the Page interface.
  • DELAYED TILL 1.36 Remove all type hints of the Page interface from core, replacing them with Article or WikiPage as appropriate. According to PHPStorm, there are only 7, all apparently quite feasible. - we have decided to delay this till 1.36, since then we will be able to replace it properly for either Article or WikiPage, and not Article|WikiPage
  • Similarly, in WMF-deployed extensions, rectify direct access to Action::$page and type hints of the Page interface. - T248492

Details

ProjectBranchLines +/-Subject
mediawiki/coremaster+25 -0
mediawiki/extensions/Wikibasemaster+2 -1
mediawiki/extensions/CentralNoticemaster+4 -4
mediawiki/extensions/Collectionmaster+5 -2
mediawiki/coremaster+7 -1
mediawiki/extensions/Wikibasemaster+6 -6
mediawiki/coremaster+167 -72
mediawiki/extensions/Flowmaster+2 -2
mediawiki/extensions/PageTriagemaster+9 -4
mediawiki/extensions/PageTriagemaster+1 -0
mediawiki/extensions/WikibaseLexememaster+8 -3
mediawiki/extensions/CollaborationKitmaster+16 -10
mediawiki/coremaster+173 -69
mediawiki/coremaster+4 -0
mediawiki/coremaster+4 -0
mediawiki/coremaster+4 -2
mediawiki/coremaster+6 -0
mediawiki/coremaster+131 -41
mediawiki/coremaster+4 -2
mediawiki/coremaster+80 -22
mediawiki/coremaster+24 -4
mediawiki/extensions/ProofreadPagemaster+16 -9
mediawiki/coremaster+90 -65
mediawiki/coremaster+40 -26
mediawiki/extensions/Wikibasemaster+2 -9
mediawiki/extensions/Wikibasemaster+65 -30
mediawiki/extensions/Flowmaster+21 -11
mediawiki/coremaster+3 -0
mediawiki/extensions/EntitySchemamaster+163 -79
mediawiki/extensions/PageTriagemaster+81 -66
mediawiki/coremaster+3 -0
mediawiki/coremaster+18 -11
mediawiki/extensions/FlaggedRevsmaster+108 -78
mediawiki/extensions/AbuseFiltermaster+0 -17
mediawiki/extensions/TemplateSandboxmaster+3 -3
mediawiki/extensions/Wikibasemaster+44 -19
mediawiki/coremaster+683 -300
mediawiki/extensions/WikibaseQualityConstraintsmaster+23 -16
mediawiki/extensions/ProofreadPagemaster+8 -15
mediawiki/extensions/UserMergemaster+8 -12
mediawiki/extensions/Thanksmaster+3 -3
mediawiki/extensions/Nukemaster+11 -4
mediawiki/extensions/Collectionmaster+7 -11
mediawiki/extensions/GlobalUsagemaster+3 -3
operations/mediawiki-configmaster+4 -1
mediawiki/extensions/WikibaseLexememaster+2 -2
mediawiki/extensions/AbuseFiltermaster+9 -5
mediawiki/extensions/CentralNoticemaster+3 -5
mediawiki/extensions/WikimediaMaintenancemaster+2 -2
mediawiki/extensions/WikibaseQualityConstraintsmaster+28 -8
mediawiki/extensions/AbuseFiltermaster+12 -6
mediawiki/extensions/FileImportermaster+1 -1
Show related patches Customize query in gerrit

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 581166 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/AbuseFilter@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Change 581247 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 581166 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Change 573680 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Change 580155 abandoned by Ppchelko:
Fix error: undefined constant

Reason:
I4f151f88ece56cf718749b9de11fc8e204ccf29d

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

Change 582326 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 582637 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::getComment

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

Change 582637 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article::getComment

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

Change 573688 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Change 575377 merged by jenkins-bot:
[mediawiki/core@master] WikiPage/Article split. Rely on Article inside Action

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

Change 578960 merged by jenkins-bot:
[mediawiki/extensions/ProofreadPage@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Change 573654 merged by jenkins-bot:
[mediawiki/extensions/EntitySchema@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Pchelolo updated the task description. (Show Details)Mar 25 2020, 5:37 PM

Change 583439 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::getCreator

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

Change 583439 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article::getCreator

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

Change 583487 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/Wikibase@master] Prepare for WikiPage/Article split and Page interface deprecation

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

Change 583497 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 573682 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Remove direct access to Action::page

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

Change 583568 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 578627 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Prepare for WikiPage/Article split and Page interface deprecation

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

Change 583497 merged by jenkins-bot:
[mediawiki/core@master] Remove direct access to Action::page and Article::page properties

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

Change 583487 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Prepare for WikiPage/Article split and Page interface deprecation

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

Change 583568 merged by jenkins-bot:
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 584075 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 584103 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Complete WikiPage/Article split and deprecate Page interface

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

Change 584075 merged by jenkins-bot:
[mediawiki/core@master] Remove direct access to Article::mPage from ImagePage

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

Change 584925 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Improve of WikiPage factory

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

Change 582326 merged by jenkins-bot:
[mediawiki/core@master] Soft deprecate Page interface

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

Change 577393 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Action construction with WikiPage

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

Change 588838 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::updateRevisionOn

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

Change 588838 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article::updateRevisionOn and ::updateIfNewerOn

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

Change 589789 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Make WikiPage::commitRollback internal to prepare for a breaking change

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

Change 589794 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::doEditUpdates

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

Change 589796 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::getRevision and WikiPage::getRevision

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

Change 589794 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article::doEditUpdates

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

Change 589881 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::prepareContentForEdit

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

Change 589882 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate Article::getUndoContent

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

Change 589881 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article::prepareContentForEdit

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

Change 589882 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article::getUndoContent

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

Change 589796 merged by jenkins-bot:
[mediawiki/core@master] Replace uses and hard deprecate Article:: and WikiPage::getRevision

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

Change 581247 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate Article methods proxying to WikiPage

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

Change 578920 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Change 573647 merged by jenkins-bot:
[mediawiki/extensions/CollaborationKit@master] Replace usage of deprecated Page in favor of WikiPage/Article

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

Article::getId and ::exists were hard-deprecated, but it's called by LiquidThreads. MassMessage runs tests with LiquidThreads, so it shows up in test output logs such as https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/64154/console

abi_ added a subscriber: abi_.Apr 28 2020, 3:15 PM

Article::getId and ::exists were hard-deprecated, but it's called by LiquidThreads. MassMessage runs tests with LiquidThreads, so it shows up in test output logs such as https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/64154/console

I think this is now causing the CI tests for MassMessage extension to fail and hence blocking merges. See,

  1. https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/63946/console
  2. https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/64154/console
  3. https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-docker/64191/console

Change 593073 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/PageTriage@master] Use WikiPage::getId() instead hard-deprecated Article::getId()

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

Change 593354 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/PageTriage@master] test

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

Change 593362 had a related patch set uploaded (by Art-Baltai; owner: BAGArt):
[mediawiki/extensions/Collection@master] Use WikiPage::factory() instead of new WikiPage()

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

Change 593363 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/Flow@master] Use WikiPage::factory() instead of new WikiPage()

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

Change 593364 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/CentralNotice@master] Use WikiPage::factory() instead of new WikiPage()

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

Change 593628 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/core@master] Test for WikiPage::factory

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

Change 593354 abandoned by Reedy:
test

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

Change 593073 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Use WikiPage::getId() instead hard-deprecated Article::getId()

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

Change 593363 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Use WikiPage::factory() instead of new WikiPage()

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

Pchelolo updated the task description. (Show Details)May 2 2020, 2:08 PM
Pchelolo updated the task description. (Show Details)May 2 2020, 2:12 PM

Change 593356 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/Wikibase@master] Use Action::getArticle instead of deprecated Action::$page

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

Change 593356 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use Action::getArticle instead of deprecated Action::$page

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

Change 584925 abandoned by Art-Baltai:
Add WikiPage::factory return type hinting

Reason:
waiting for new hooks

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

Naike changed the status of subtask T251278: Cleanup deprecated calls in production from Open to Stalled.May 22 2020, 7:11 AM
Aklapper changed the status of subtask T251278: Cleanup deprecated calls in production from Stalled to Open.May 22 2020, 11:17 AM

Change 593362 merged by jenkins-bot:
[mediawiki/extensions/Collection@master] Use WikiPage::factory() instead of new WikiPage()

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

Change 593364 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Use WikiPage::factory() instead of new WikiPage()

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

Change 573575 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use non nullable context for WikibaseRepo::getEntityDiffVisualizerFactory

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

Change 593628 merged by jenkins-bot:
[mediawiki/core@master] Add a test for WikiPage::factory

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

Helga_sf added a subscriber: Art-Baltai.
Helga_sf removed a subscriber: Art-Baltai.