26B / php-pre-commit

Pre-commit git hook to help keep code within PHP standards.
MIT License
7 stars 1 forks source link

Composer Bin Proxy #10

Open goncaloasimoes opened 2 years ago

goncaloasimoes commented 2 years ago

There appears to be some behaviour of composer (unverified if old or new) that creates proxy files in the /vendor/bin folder that calls the actual bin file in the lib folder.

It is added via this https://github.com/composer/composer/blob/main/src/Composer/Installer/BinaryInstaller.php (see end of file)

This causes the php-pre-commit file to fail when moving pre-commit to .git/hooks since it expects to be in /vendor/bin when running.

We need to make the file path building more robust in php-pre-commit in order to combat these issues.