Page MenuHomePhabricator

Argument 3 passed to CodeRevisionView::__construct() must be an instance of User, string given, called in /srv/mediawiki/php-1.35.0-wmf.16/extensions/CodeReview/includes/ui/SpecialCode.php on line 134
Closed, ResolvedPublic

Description

Error

MediaWiki version: 1.35.0-wmf.16

message
Argument 3 passed to CodeRevisionView::__construct() must be an instance of User, string given, called in /srv/mediawiki/php-1.35.0-wmf.16/extensions/CodeReview/includes/ui/SpecialCode.php on line 134

Impact

Fatal exception on GET for URL.

Notes

6 of these since deploy of 1.35.0-wmf.16 to group0.

Details

Request ID
XideeQpAIDEAACSkotYAAACS
Request URL
https://www.mediawiki.org/wiki/Special:Code/pywikipedia/11203
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.16/extensions/CodeReview/includes/ui/SpecialCode.php(134): CodeRevisionView->__construct(CodeRepository, User, string)
#1 /srv/mediawiki/php-1.35.0-wmf.16/extensions/CodeReview/includes/ui/SpecialCode.php(49): SpecialCode->getViewFrom(string)
#2 /srv/mediawiki/php-1.35.0-wmf.16/includes/specialpage/SpecialPage.php(575): SpecialCode->execute(string)
#3 /srv/mediawiki/php-1.35.0-wmf.16/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(string)
#4 /srv/mediawiki/php-1.35.0-wmf.16/includes/MediaWiki.php(298): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#5 /srv/mediawiki/php-1.35.0-wmf.16/includes/MediaWiki.php(967): MediaWiki->performRequest()
#6 /srv/mediawiki/php-1.35.0-wmf.16/includes/MediaWiki.php(530): MediaWiki->main()
#7 /srv/mediawiki/php-1.35.0-wmf.16/index.php(46): MediaWiki->run()
#8 /srv/mediawiki/w/index.php(3): require(string)
#9 {main}
Related Gerrit Patches:
mediawiki/extensions/CodeReview : wmf/1.35.0-wmf.16Follow-Up 81f5fb: Remove use of global $wgUser (part 10)
mediawiki/extensions/CodeReview : masterFollow-Up 81f5fb: Remove use of global $wgUser (part 10)

Event Timeline

brennen created this task.Jan 21 2020, 8:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 21 2020, 8:47 PM

By way of changelog for wmf.16, maybe this is related to @DannyS712's work on T159299?

brennen moved this task from Backlog to Logs/Train on the User-brennen board.

By way of changelog for wmf.16, maybe this is related to @DannyS712's work on T159299?

Indeed. This is T242677: CodeReview needs uses of global $wgUser removed / rECREebbc00a882698d42dcd7e2608115a00068f53190

Llooking at the current version[1] of Special:Code, line 134 is

$view = new CodeRevisionView( $repo, $user, $params[1] );

with $user coming from

$user = $this->getUser();

[1] https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/CodeReview/+/ebbc00a882698d42dcd7e2608115a00068f53190/includes/ui/SpecialCode.php

Change 566360 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CodeReview@master] Follow-Up 81f5fb: Remove use of global $wgUser (part 10)

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

DannyS712 moved this task from Unsorted to Awaiting review and deployment on the User-DannyS712 board.

I guess possibly the deployment blocker relationship is overkill here - it doesn't seem high impact enough to warrant rolling group0 back, and I'm not sure it has much impact beyond group0?

Change 566360 merged by jenkins-bot:
[mediawiki/extensions/CodeReview@master] Follow-Up 81f5fb: Remove use of global $wgUser (part 10)

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

Change 566385 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/CodeReview@wmf/1.35.0-wmf.16] Follow-Up 81f5fb: Remove use of global $wgUser (part 10)

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

Change 566385 merged by jenkins-bot:
[mediawiki/extensions/CodeReview@wmf/1.35.0-wmf.16] Follow-Up 81f5fb: Remove use of global $wgUser (part 10)

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

Mentioned in SAL (#wikimedia-operations) [2020-01-22T22:19:55Z] <catrope@deploy1001> Synchronized php-1.35.0-wmf.16/extensions/CodeReview/: T243337 (duration: 01m 06s)