[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

SubjectRepoBranchLines +/-
mediawiki/coremaster+4 -2
mediawiki/coremaster+60 -704
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 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

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 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

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

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.

Change 674635 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Drop most hard-deprecated methods in Article

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

Change 674635 merged by jenkins-bot:
[mediawiki/core@master] Drop most hard-deprecated methods in Article

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

Removing task assignee due to inactivity as this open task has been assigned for more than two years. See the email sent to the task assignee on August 22nd, 2022.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome!
If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!

Change #1049649 had a related patch set uploaded (by Novem Linguae; author: Novem Linguae):

[mediawiki/core@master] remove "implements Page" from classes

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

Change #1049649 abandoned by Novem Linguae:

[mediawiki/core@master] remove "implements Page" from classes

Reason:

probably needs to be hard deprecated first before removing

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

The Page class is currently soft deprecated, and git blame for the deprecation line is 4 years old.

Are we ready to hard deprecate it by announcing it to wikitech-l and adding a @warning to it? If so I can perform those steps, but want to check with the group first.