Skip to content

Do all 3rd party extensions need to be installed via composer or can I install 1 via FTP and others through composer?

Magento ver. 2.4.5-p1
Smartwave Porto theme

I am trying to install the ‘Multiple Shipping Flat Rates’ extension from Mageplaza as per a recommendation here:

Easiest way to add a second flat rate shipping method on Magento 2?

I’ve gone through steps ordering it and downloaded the version for Magento Community 2.4.x so I think I should be able to upload it via FTP and follow installation instructions.

I have already and will, however, install additional extensions from Amasty via composer. If that is the case, should I just try to install everything via composer rather than installing some extensions via FTP upload?

The reason I am asking is – I tried to install this extension via composer as per instructions here:

https://packagist.org/packages/mageplaza/module-multi-flat-rates

by running the following command:

composer require mageplaza/module-multi-flat-rates

But it gives me this Error:

Parse error: syntax error, unexpected 'RewriterInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /home/mymagentosite/public_html/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPluginDelegator.php on line 27

I then thought maybe I first need to install the repositories (or whatever it’s called), so I tried to run this command:

composer config repositories.mageplaza composer https://repo.mageplaza.com

as per the instructions on this page here:

https://www.mageplaza.com/kb/how-to-install-magento-extension-via-composer.html

but I get the same Error:

Parse error: syntax error, unexpected 'RewriterInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /home/mymagentosite/public_html/vendor/laminas/laminas-dependency-plugin/src/DependencyRewriterPluginDelegator.php on line 27

1. Do I need to keep everything installed via composer or can I install some extensions via composer and others through an FTP upload?
2. Any ideas on how to resolve the Error?

The extension is here:

https://www.mageplaza.com/magento-2-multi-flat-rates-shipping/