How to upgrade a Mage2.PRO extension?

You should do all these command in the Magento 2 root folder!
Be careful of it.
Otherwise, you will get an error like «mage2pro/core requires magento/framework >=100.0.0 -> no matching package found».
You can check the current folder with the standard Unix pwd command.

Step 0 (advisable, but not necessary)

sudo composer self-update

Step 1

composer update --prefer-source

Step 2

bin/magento setup:upgrade

Step 3

rm -rf pub/static/* && bin/magento setup:static-content:deploy <locale, e.g.: en_GB>

How to deploy the static files for a custom locale?

Step 4

rm -rf var/di var/generation generated/code && bin/magento setup:di:compile
1 Like

Is there a way to update on composer only this vendor or extension without requesting an update of all libraries?
e.g. “composer update mage2pro/square”

Yes, you can learn it from the official composer update documentation.