Why?
Simpler mapping to how you might execute phpunit, phpstan, etc.
I keep having to jump back into the docs and remembering the ./dr.sh php exec command.
When we developers use thirdparty tools like vendor/bin things, they should be able to follow the documentation and just prefix ./dr.sh
How?
- If $cmd contains at start of first argument "vendor/bin/"
- If "vendor/bin" folder exists, proceed to next step, if not show message:
- "Error, unable to find vendor/bin folder. Have you run
composer install? Is this a PHP project?"
- Drop into phpcli and execute that command.
Why?
Simpler mapping to how you might execute
phpunit,phpstan, etc.I keep having to jump back into the docs and remembering the
./dr.sh php execcommand.When we developers use thirdparty tools like vendor/bin things, they should be able to follow the documentation and just prefix
./dr.shHow?
composer install? Is this a PHP project?"