The latest Magento 2.4 is released on July 28’20.
No doubt, any store owner will be prompted to download Magento 2.4.0 and install it to leverage the latest features like:
- 2FA in Magento admin
- Seller assisted shopping
- New media gallery
- In-store pickup
Not forgetting the 98 new features, 68 bug fixes, 50 security changes, and Php 7.4 support!
However, merchants are facing a syntax error – Unexpected ‘)’ while installing Magento 2.4.
Developers at Meetanshi immediately jumped on this error and here’s the solution:
Solution for Syntax Error – Unexpected ‘)’ while installing Magento 2.4:

If you witness the above error, open setupsrcMagentoSetupModule.php file
At line number 81, remove the “,” at last.
Your getConfig function code is as below:
public function getConfig() { // phpcs:disable $result = array_merge_recursive( include __DIR__ . '/../../../config/module.config.php', include __DIR__ . '/../../../config/router.config.php', include __DIR__ . '/../../../config/di.config.php', include __DIR__ . '/../../../config/states.install.config.php', include __DIR__ . '/../../../config/languages.config.php' ); // phpcs:enable return $result; }
That’s it.
You can simply skip this error and opt for Meetanshi’s Magento 2 Upgrade Service to upgrade your store to the latest Magento 2.4.3 version.
Please share the solution with the Magento community via social media.
Thank you.