It can wind up logging deprecations twice if extractRequestParams() is
called with different values for 'parseLimit', for example.
Change-Id: I921777089fb8cfb4339af6fd08ee3475ed31b7f6
* @param string $feature Feature being used.
*/
public function logFeatureUsage( $feature ) {
+ static $loggedFeatures = [];
+
+ // Only log each feature once per request. We can get multiple calls from calls to
+ // extractRequestParams() with different values for 'parseLimit', for example.
+ if ( isset( $loggedFeatures[$feature] ) ) {
+ return;
+ }
+ $loggedFeatures[$feature] = true;
+
$request = $this->getRequest();
$ctx = [
'feature' => $feature,