Composer does not work properly and does not report an error

problem description

appears

when using composer install or other commands
-sharp!/usr/bin/env php
<?%

even if you use -vvv to print the log

as shown in the figure

clipboard.png

php environment is 7.2
system is OSX 10.13.3

used to be quite normal, but this is the problem today.

find a solution

Mar.25,2021

reinstall composer


The

composer command is actually a php file, but it does not have a .php suffix and adds executable permissions.
if you want to know why, it's best to find out where your composer command is and open it to see if there's something wrong with the file.
look at the source code of github

https://github.com/composer/c.

If the figure is simple, just reinstall one.


I don't know why I just removed the php installed by brew.

it may be a php soft connection except for the problem

Menu