changing from composer version 1 to version 2 code example
Example 1: composer switch to version 1
sudo composer self-update --1
Example 2: composer switch to version 1
composer self-update --1
sudo composer self-update --1
composer self-update --1