When ./composer self-update is executed, it gets replaced with a phar instead of replacing the actual phar; as a result the working directory ends up containing 2 phars: a newer one named composer and an older one named composer.phar.
Both composer's self-update should be taken a look at to possibly accommodate for this, or the wrapper should avoid including phar when running self-update, and just start a new process passing the arguments to it. This might as well be a better option because probably nobody expects that a phar is included/required (although it's still the most convenient option to preserve all the bits of the call environment, which is not only environment variables but also PHP interpreter settings).
When
./composer self-updateis executed, it gets replaced with a phar instead of replacing the actual phar; as a result the working directory ends up containing 2 phars: a newer one namedcomposerand an older one namedcomposer.phar.Both composer's self-update should be taken a look at to possibly accommodate for this, or the wrapper should avoid including phar when running self-update, and just start a new process passing the arguments to it. This might as well be a better option because probably nobody expects that a
pharis included/required (although it's still the most convenient option to preserve all the bits of the call environment, which is not only environment variables but also PHP interpreter settings).