Reputation: 43
After upgrading to magento 2.4.5-p1 and to php 8.1
I get this error while I try to compile
I tried to delete the vendor folder and did composer update but same results.
any way to solve this issue?
public_html$ bin/magento setup:di:compile
Compilation was started.
Repositories code generation... 1/9 [===>------------------------] 11% < 1 sec 115.0 MiBsyntax error, unexpected token "readonly", expecting identifier#0 /home/0.cloudwaysapps.com/bmd/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(117): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClass()
#1 /home/0.cloudwaysapps.com/bmd/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php(87): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract()
#2 /home/0.cloudwaysapps.com/bmd/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php(61): Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList()
#3 /home/0.cloudwaysapps.com/bmd/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php(56): Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
#4 /home/0.cloudwaysapps.com/bmd/public_html/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php(216): Magento\Setup\Module\Di\App\Task\Manager->process()
#5 /home/0.cloudwaysapps.com/bmd/public_html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DiCompileCommand->execute()
#6 /home/0.cloudwaysapps.com/bmd/public_html/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run()
#7 /home/0.cloudwaysapps.com/bmd/public_html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#8 /home/0.cloudwaysapps.com/bmd/public_html/vendor/magento/framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun()
#9 /home/0.cloudwaysapps.com/bmd/public_html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun()
#10 /home/0.cloudwaysapps.com/bmd/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#11 {main}
Thanks alot
Kobi
Upvotes: 0
Views: 859
Reputation: 54
It seems like a syntax error in your code, please check the last code that you added before deployment.
go to the Magento root folder and open the var/log folder, here you can check the log files, and you will find the error records here.
after that run, all deployment commands with di: compile one by one.
Thanks.
Upvotes: -1