How to determine the vendor/bin directory of Composer in a library? <p>Is there a reliable way to determine the local <code>vendor/bin</code> directory of an application from within a library? What I really want is the following:</p> <p>I am writing a library that depends on a third library. This third library ships with a binary, that is installed in the local <code>vendor/bin</code> of the main application. My library needs to have the possibility to execute this binary. I could probably hack something using <code>__DIR__/../...../bin</code> but that feels not very good an is probably <em>not</em> reliable.</p>