Error installing silverstripe.

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

I got this error. I am using PHP 7.2.

[13-Aug-2020 03:31:52 UTC] PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/xxx/public_html/xxxx/vendor/silverstripe/recipe-plugin/src/RecipePlugin.php on line 133

That’s a bit of a curious one. The code referred to in the error is just this:

 return [
            CommandProvider::class => RecipeCommandProvider::class

Are you certain of your PHP version? If this is command-line / composer, then php -v should show you the full version in use.