In task T233963: Add serialization options to RESTBagOStuff, we added new serialization options to RESTBagOStuff, including a comment at the top of the class with an example of how to use them. This comment was incorrect. Correct that comment, and backport the correction to the 1.34 branch (REL1_34) for inclusion in the upcoming 1.34 release, per https://www.mediawiki.org/wiki/Gerrit/Advanced_usage#Submitting_a_change_to_a_branch_for_review_(%22backporting%22)
The file in question is <mediawiki root>/includes/libs/objectcache/RESTBagOStuff.php. The comment currently says:
* Configuration for Kask (session storage): * @code * $wgObjectCaches['sessions'] = array( * 'class' => 'RESTBagOStuff', * 'url' => 'https://kaskhost:1234/sessions/v1/', * 'httpParams' => [ * 'readHeaders' => [], * 'writeHeaders' => [ 'content-type' => 'application/octet-stream' ], * 'deleteHeaders' => [], * 'writeMethod' => 'POST', * 'serialization_type' => 'JSON', * ], * 'extendedErrorBodyFields' => [ 'type', 'title', 'detail', 'instance' ] * ); * $wgSessionCacheType = 'sessions'; * @endcode
This is incorrect, because 'serialization_type' is not one of the 'httpParams'. The comment should instead say:
* Configuration for Kask (session storage): * @code * $wgObjectCaches['sessions'] = array( * 'class' => 'RESTBagOStuff', * 'url' => 'https://kaskhost:1234/sessions/v1/', * 'httpParams' => [ * 'readHeaders' => [], * 'writeHeaders' => [ 'content-type' => 'application/octet-stream' ], * 'deleteHeaders' => [], * 'writeMethod' => 'POST', * ], * 'serialization_type' => 'JSON', * 'extendedErrorBodyFields' => [ 'type', 'title', 'detail', 'instance' ] * ); * $wgSessionCacheType = 'sessions'; * @endcode
The only change is to move serialization_type out of the httpParams.