SemanticMediaWiki / SemanticMediaWiki/SemanticSignup

Avoid deprecated `SiteStatsUpdate` constructor, use `SiteStatsUpdate::factory()` instead

Open
#35 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
PHP
Stars
8
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The code here: https://github.com/SemanticMediaWiki/SemanticSignup/blob/5d9d23c174ef7823de9e82fe66ca37ba0f47c4d6/src/SpecialSemanticSignup.php#L114 should be updated to something like:

$ssUpdate = SiteStatsUpdate::factory( [
	'edit' =>       0,
	'articles' => 0,
	'pages' =>   0,
	'users' =>    1,
] );

Per the Wikimedia Code Search tool, this is the only repo doing this: https://codesearch.wmcloud.org/search/?q=new%20SiteStatsUpdate&i=nope&files=&excludeFiles=&repos=

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read src/SpecialSemanticSignup.php at line 114 and compare the issue's suggested SiteStatsUpdate::factory() form. Replace the deprecated constructor while preserving the shown counter values, then verify that the file no longer constructs SiteStatsUpdate with new.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.