Page MenuHomePhabricator

PHP Deprecated: Use of MediaWiki\Extension\AbuseFilter\BlockedDomains\CustomBlockedDomainStorage::validateDomain was deprecated in MediaWiki 1.44. [Called from MediaWiki\Extension\VisualEditor\EditCheck\ApiEditCheckReferenceUrl
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Use of MediaWiki\Extension\AbuseFilter\BlockedDomains\CustomBlockedDomainStorage::validateDomain was deprecated in MediaWiki 1.44. [Called from MediaWiki\Extension\VisualEditor\EditCheck\ApiEditCheckReferenceUrl
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.1/extensions/VisualEditor/editcheck/includes/ApiEditCheckReferenceUrl.php(52)
#0[internal function]MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, string)
#1/srv/mediawiki/php-1.45.0-wmf.1/includes/debug/MWDebug.php(386)trigger_error(string, int)
#2/srv/mediawiki/php-1.45.0-wmf.1/includes/debug/MWDebug.php(357)MediaWiki\Debug\MWDebug::sendRawDeprecated(string, bool, string)
#3/srv/mediawiki/php-1.45.0-wmf.1/includes/debug/MWDebug.php(238)MediaWiki\Debug\MWDebug::deprecatedMsg(string, string, string, int)
#4/srv/mediawiki/php-1.45.0-wmf.1/includes/GlobalFunctions.php(782)MediaWiki\Debug\MWDebug::deprecated(string, string, string, int)
#5/srv/mediawiki/php-1.45.0-wmf.1/extensions/AbuseFilter/includes/BlockedDomains/CustomBlockedDomainStorage.php(132)wfDeprecated(string, string)
#6/srv/mediawiki/php-1.45.0-wmf.1/extensions/VisualEditor/editcheck/includes/ApiEditCheckReferenceUrl.php(52)MediaWiki\Extension\AbuseFilter\BlockedDomains\CustomBlockedDomainStorage->validateDomain(string)
#7/srv/mediawiki/php-1.45.0-wmf.1/extensions/VisualEditor/editcheck/includes/ApiEditCheckReferenceUrl.php(37)MediaWiki\Extension\VisualEditor\EditCheck\ApiEditCheckReferenceUrl->isInBlockedExternalDomains(string)
#8/srv/mediawiki/php-1.45.0-wmf.1/includes/api/ApiMain.php(2010)MediaWiki\Extension\VisualEditor\EditCheck\ApiEditCheckReferenceUrl->execute()
#9/srv/mediawiki/php-1.45.0-wmf.1/includes/api/ApiMain.php(948)MediaWiki\Api\ApiMain->executeAction()
#10/srv/mediawiki/php-1.45.0-wmf.1/includes/api/ApiMain.php(919)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#11/srv/mediawiki/php-1.45.0-wmf.1/includes/api/ApiEntryPoint.php(152)MediaWiki\Api\ApiMain->execute()
#12/srv/mediawiki/php-1.45.0-wmf.1/includes/MediaWikiEntryPoint.php(198)MediaWiki\Api\ApiEntryPoint->execute()
#13/srv/mediawiki/php-1.45.0-wmf.1/api.php(44)MediaWiki\MediaWikiEntryPoint->run()
#14/srv/mediawiki/w/api.php(3)require(string)
#15{main}
Notes

Started with 1.45.0-wmf.1 group0. Low volume so far.

Code calling method deprecated in 1.44

Event Timeline

Looks like it was deprecated in T393240 (2 days ago). So we'll want to update that call at some point.

(I.e. I think it's actually wrong about when it was deprecated in the warning. We're in 1.45 currently.)

This has gotten pretty noisy after fully rolling out 1.45 to production. We probably want to prioritize this sooner rather than later:

image.png (569×903 px, 83 KB)

Change #1146561 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/AbuseFilter@master] CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist

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

I had forgot to merge https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/1142508 which was to update the name. I've +2'd that now, but it's probably better to undo the hard deprecation until that patch has ben deployed normally via the train.

On a side note, it would be nice if the VisualEditor repo could depend on other extensions in Phan. Because it follows the pattern of skipping the Phan errors, it wasn't clear immediately that the method was used elsewhere when the commit the hard-deprecated it.

On a side note, it would be nice if the VisualEditor repo could depend on other extensions in Phan. Because it follows the pattern of skipping the Phan errors, it wasn't clear immediately that the method was used elsewhere when the commit the hard-deprecated it.

If you want AF to depend on VE so that AF breaks when making such changes, we can do that, but phan won't generally complain about other extensions' code, only the local repo.

The point of CI is to stop people merging broken patches. Errors after the fact in generaly aren't value-adding, they're just noise.

Change #1146568 had a related patch set uploaded (by Dreamy Jazz; author: Jforrester):

[mediawiki/extensions/AbuseFilter@wmf/1.45.0-wmf.1] CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist

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

Backporting the undo on the hard deprecation to avoid noise.

Change #1146568 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@wmf/1.45.0-wmf.1] CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist

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

Mentioned in SAL (#wikimedia-operations) [2025-05-15T11:57:05Z] <dreamyjazz@deploy1003> Started scap sync-world: Backport for [[gerrit:1146568|CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist (T394267)]]

Change #1146561 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist

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

Mentioned in SAL (#wikimedia-operations) [2025-05-15T12:03:41Z] <dreamyjazz@deploy1003> dreamyjazz: Backport for [[gerrit:1146568|CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist (T394267)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-05-15T12:10:35Z] <dreamyjazz@deploy1003> Finished scap sync-world: Backport for [[gerrit:1146568|CustomBlockedDomainStorage::validateDomain: Undo hard-deprecation whilst prod callers exist (T394267)]] (duration: 13m 30s)

Dreamy_Jazz assigned this task to Jdforrester-WMF.

Logs appear to have stopped. Thanks for making the fix and apologies for missing this when code reviewing.