Via @mwjames:
Code like `Hooks::run( 'WantedPages::getQueryInfo', [ &$this, &$query ] );` will trigger warnings in PHP 7.1. The solution is to remove the `&`Ideally the solution would be to remove `&`, which hasn't been needed since PHP 4, however that breaks backwards-compatibility.
Instead, we can rename $this to a different variable, and then pass it by reference. Example:
```lang=php
// Avoid PHP 7.1 warning of passing $this by reference
$editPage = $this;
Hooks::run( 'EditPage::showEditForm:initial', [ &$editPage, which hasn't been needed since PHP 4.&$out ] );
```
See https://bugs.php.net/bug.php?id=73751 / https://wiki.php.net/rfc/this_var
Example commit to fix this issue: https://gerrit.wikimedia.org/r/#/c/328387/
We need to just grep for `&$this` I guess and remove all the ampersands. So basically this is just about removing one character, but you should check if the reference is actually needed/used. In nearly all cases, `&` is not needed.
More information:
* https://blog.pascal-martin.fr/post/php71-en-a-few-bc-breaks-and-conclusion.html
* https://secure.php.net/manual/en/migration71.incompatible.php