Skip to content

Magento 2 error: MiBsyntax error, unexpected ‘)’, expecting variable in vendor/composer/ClassLoader.php(428)

I am a bigginer in magento 2
I came across with this error when hit

sudo php bin/magento setup:di:compile

enter image description here

Looks like the issue is inside the ClassLoader.php file so i remove the classLoader.php and past the code from this link https://github.com/composer/composer/blob/main/src/Composer/Autoload/ClassLoader.php into ClassLoader.php file which should work after this command but could not resolve the issue.

Please give me your suggesstion

Composer -v is 2.4.4