The errors are:
PHP Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting end of
file in /etc/mediawiki/LocalSettings.php on line 186
I think "public static function" goes inside classes, and in LocalSettings.php just "function" might work. That gets rid of the error, but I haven't upgraded to 1.35 so can't check whether the code works.
PHP Fatal error: Uncaught Error: Class 'WebRequest' not found in
/usr/share/mediawiki/includes/HeaderCallback.php:63\nStack trace:\n#0 [internal
function]: MediaWiki\\HeaderCallback::callback()\n#1 {main}\n thrown in
/usr/share/mediawiki/includes/HeaderCallback.php on line 63
Best wishes
Jonathan