Upgrade to latest version fails: unexpected '?' in snappymail /Application.php line 7

PHP Parse error:  syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in /usr/local/CyberCP/public/snappymail/snappymail/v/2.25.3/app/libraries/RainLoop/Config/Application.php on line 7

I also saw a bunch of these lines:

sed: -e expression #1, char 89: unterminated `s' command
sed: -e expression #1, char 89: unterminated `s' command
sed: -e expression #1, char 89: unterminated `s' command
sed: -e expression #1, char 89: unterminated `s' command
sed: -e expression #1, char 89: unterminated `s' command
sed: -e expression #1, char 89: unterminated `s' command

and this:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
aiohttp-jinja2 1.5 requires jinja2>=3.0.0, but you have jinja2 2.11.3 which is incompatible.

and then it wraps up with this:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0  1247    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0

Seems something wrong with upgrade, please check...

can you tell me which os you have?

CloudLinux8