Hi there,
I attempted to upgrade a site running 4.5.19 to 4.5.32. The site is no longer working
[2021-02-09 03:48:10] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError [0] : /data/www//vendor/symfony/translation/Translator.php [Line 91] => Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE)
Line 91 reads:
public function __construct(?string $locale, MessageFormatterInterface $formatter = null, string $cacheDir = null, bool $debug = false, array $cacheVary = [])
As far as I know ?string is not valid PHP so I’ve started fixing what I think is not correct. After replacing a couple of ?string with string, I am now stuck at:
[2021-02-09 04:05:16] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError [0] : /data/www//vendor/doctrine/inflector/lib/Doctrine/Inflector/Language.php [Line 9] => Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE)
Line 9 is the line with “public const ENGLISH”, see below.
<?php declare(strict_types=1);<?php declare(strict_types=1); namespace Doctrine\Inflector; final class Language { public const ENGLISH = 'english'; namespace Doctrine\Inflector; final class Language { public const ENGLISH = 'english'; Any suggestions what is going on here? regards, Jan