Page MenuHomePhabricator

PHP Deprecated: The "post" source is deprecated, use "body" instead [Called from MediaWiki\Rest\Validator\ParamValidatorCallbacks::getValue]
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: The "post" source is deprecated, use "body" instead [Called from MediaWiki\Rest\Validator\ParamValidatorCallbacks::getValue]
exception.trace
from /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Validator/ParamValidatorCallbacks.php(60)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, string, array)
#1 /srv/mediawiki/php-1.43.0-wmf.1/includes/debug/MWDebug.php(379): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.43.0-wmf.1/includes/debug/MWDebug.php(350): MWDebug::sendRawDeprecated(string, boolean, string)
#3 /srv/mediawiki/php-1.43.0-wmf.1/includes/GlobalFunctions.php(798): MWDebug::deprecatedMsg(string, string, string, integer)
#4 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Validator/ParamValidatorCallbacks.php(43): wfDeprecatedMsg(string, string)
#5 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Validator/ParamValidatorCallbacks.php(60): MediaWiki\Rest\Validator\ParamValidatorCallbacks->getParamsFromSource(string)
#6 /srv/mediawiki/php-1.43.0-wmf.1/includes/libs/ParamValidator/TypeDef.php(120): MediaWiki\Rest\Validator\ParamValidatorCallbacks->getValue(string, NULL, array)
#7 /srv/mediawiki/php-1.43.0-wmf.1/includes/libs/ParamValidator/ParamValidator.php(525): Wikimedia\ParamValidator\TypeDef->getValue(string, array, array)
#8 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Validator/Validator.php(152): Wikimedia\ParamValidator\ParamValidator->getValue(string, array, array)
#9 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Handler.php(223): MediaWiki\Rest\Validator\Validator->validateParams(array)
#10 /srv/mediawiki/php-1.43.0-wmf.1/extensions/OAuth/src/Rest/Handler/AuthenticationHandler.php(99): MediaWiki\Rest\Handler->validate(MediaWiki\Rest\Validator\Validator)
#11 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Router.php(556): MediaWiki\Extension\OAuth\Rest\Handler\AuthenticationHandler->validate(MediaWiki\Rest\Validator\Validator)
#12 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/Router.php(455): MediaWiki\Rest\Router->executeHandler(MediaWiki\Extension\OAuth\Rest\Handler\AccessToken)
#13 /srv/mediawiki/php-1.43.0-wmf.1/includes/Rest/EntryPoint.php(216): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#14 /srv/mediawiki/php-1.43.0-wmf.1/includes/MediaWikiEntryPoint.php(199): MediaWiki\Rest\EntryPoint->execute()
#15 /srv/mediawiki/php-1.43.0-wmf.1/rest.php(38): MediaWiki\MediaWikiEntryPoint->run()
#16 /srv/mediawiki/w/rest.php(3): require(string)
#17 {main}
Notes

This started during the 1.43.0-wmf.1 train rollout to group1. The rate is currently about 35 per 15 minutes. I'm making this a train blocker.

The relevant deprecation warning was added in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1017491 for T358560.

Event Timeline

dancy triaged this task as Unbreak Now! priority.Wed, Apr 17, 6:43 PM
dancy updated the task description. (Show Details)
matmarex subscribed.

I'm not familiar with the code, but it looks like we just need to replace PARAM_SOURCE => 'post' with PARAM_SOURCE => 'body' in a few places? I'll prepare a patch to do that.

Similar code is also found in the GrowthExperiments extension, I suppose the train just hasn't yet reached wikis where it's enabled: https://codesearch.wmcloud.org/deployed/?q=PARAM_SOURCE+%3D>+['"]post

I'm not familiar with the code, but it looks like we just need to replace PARAM_SOURCE => 'post' with PARAM_SOURCE => 'body' in a few places? I'll prepare a patch to do that.

Thank you!

Change #1020904 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/OAuth@master] Replace deprecated PARAM_SOURCE => 'post' with 'body'

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

Change #1020905 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/GrowthExperiments@master] Replace deprecated PARAM_SOURCE => 'post' with 'body'

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

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

[mediawiki/core@master] Revert "REST: Deprecate using "post" as the parameter source"

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

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

[mediawiki/core@wmf/1.43.0-wmf.1] Revert "REST: Deprecate using "post" as the parameter source"

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

Probably best to revert for now, at least for 1.43.0-wmf.1, and then fix before Monday?

Sorry for the mess...

This may not have been such a good idea afterall. I'll think about it some more before re-submitting.

Change #1020904 abandoned by Bartosz Dziewoński:

[mediawiki/extensions/OAuth@master] Replace deprecated PARAM_SOURCE => 'post' with 'body'

Reason:

Deprecation is being reverted instead

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

Change #1020905 abandoned by Bartosz Dziewoński:

[mediawiki/extensions/GrowthExperiments@master] Replace deprecated PARAM_SOURCE => 'post' with 'body'

Reason:

Deprecation is being reverted instead

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

Change #1020739 merged by jenkins-bot:

[mediawiki/core@master] Revert "REST: Deprecate using "post" as the parameter source"

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

Change #1020910 merged by jenkins-bot:

[mediawiki/core@wmf/1.43.0-wmf.1] Revert "REST: Deprecate using "post" as the parameter source"

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

Mentioned in SAL (#wikimedia-operations) [2024-04-17T22:24:51Z] <zabe@deploy1002> Started scap: Backport for [[gerrit:1020910|Revert "REST: Deprecate using "post" as the parameter source" (T362817)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-17T22:27:58Z] <zabe@deploy1002> jforrester and zabe: Backport for [[gerrit:1020910|Revert "REST: Deprecate using "post" as the parameter source" (T362817)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-17T22:42:06Z] <zabe@deploy1002> Finished scap: Backport for [[gerrit:1020910|Revert "REST: Deprecate using "post" as the parameter source" (T362817)]] (duration: 17m 14s)