When you are using the Command line for things like Composer, you may need to make the same extension changes to the CLI version of the php.ini
By that I mean that when you are using the CLI ( Command Line Interface ) PHP loads a different php.ini it is found in the \wamp\bin\php\phpx.y.z
folder and called php.ini.
So add the same extension=????
and any others that you may require to this php.ini file and it should work.