Parse Syntax Error on install

Installing to a subdirectory of my site. As soon as files uploaded I get this error. Anyone know why?

 

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/xxxxxxxxx/public_html/social/vendor/elgg/elgg/engine/classes/Elgg/Di/ServiceProvider.php on line 112

this is the line:

$this->setClassName('actions', \Elgg\ActionsService::class);

Installing 2.2.1