Di:compile fails because of syntax error. Upgrading from 2.4 to 2.4.3

I think I have for the most part managed to upgrade from 2.4 to 2.4.3

However, when running setup:di:compile I get this. I have see in one thread that this is an error cause by an old PHP version, but I have 7.4.27, in magento CLI and when checking outside magento on Ubuntu droplet.

I have tried everything but cannot get it to work or even find a direction to look in…

syntax error, unexpected '=', expecting variable (T_VARIABLE)#0 /var/www/html/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile() #1 [internal function]: Composer\Autoload\ClassLoader->loadClass() #2 [internal function]: spl_autoload_call() #3 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(134): class_exists() #4 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass() #5 /var/www/html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract() #6 /var/www/html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList() #7 /var/www/html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation() #8 /var/www/html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process() #9 /var/www/html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute() #10 /var/www/html/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run() #11 /var/www/html/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand() #12 /var/www/html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun() #13 /var/www/html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun() #14 /var/www/html/bin/magento(23): Symfony\Component\Console\Application->run() #15 {main}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.