cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax error when compiling / Upgrade from 2.4 to 2.4.3

Syntax error when compiling / Upgrade from 2.4 to 2.4.3

Hi!

 

I am getting this error when compiling my updated MCE 2.4.3 install. I have php 7.4.27 in magento and outside in the shell. I have read that this might be connected to wrong version of php but i checked everywhere and I am on 7.4.27 which should be fine. What am I missing?

 

1/9 [===>------------------------]  11% < 1 sec 125.0 MiBsyntax 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}
php --ini

Configuration File (php.ini) Path: /etc/php/7.4/cli

Loaded Configuration File:         /etc/php/7.4/cli/php.ini

Scan for additional .ini files in: /etc/php/7.4/cli/conf.d

I have also set all of these to 7.4 to make sure it's consistent

 

sudo update-alternatives --config php

sudo update-alternatives --config phar

3 REPLIES 3

Re: Syntax error when compiling / Upgrade from 2.4 to 2.4.3

Hello,

Did you found solution for this issue?

Re: Syntax error when compiling / Upgrade from 2.4 to 2.4.3

Yes! this one actually was a syntax error, we traced it to the Layered navigation module that had to be up to date

Re: Syntax error when compiling / Upgrade from 2.4 to 2.4.3

Would you mind sharing what are the steps of tracing back? I have this issue too but I'm not quite sure how to solve this