To switch to module installation via Composer, it is necessary to remove module package(s) from the app/code/Amasty directory and install them from scratch into the vendor/amasty directory using Composer. Such process only moves extension files from one location to another and doesn't affect module settings or gathered data.
Follow the steps below to do that:
Step 4. Install extensions from scratch using Composer
, following our official guide. During this step, you might come across the following error:
"Autoload error: Module 'Amasty_<Name> from '/app/code/Amasty/<Name>' has been already defined in '/vendor/amasty/<name>'"
It means that the same extension is installed at app/code/Amasty and at vendor/amasty, which is not allowed by Magento. Remove the package mentioned in the error message from app/code/Amasty to successfully execute Magento commands;
Step 5. Once installation is finished,
re-apply patches for the installed packages, if you have any, according to
the following article.