aurora
aurora

Reputation: 9627

How to determine the vendor/bin directory of Composer in a library?

Is there a reliable way to determine the local vendor/bin directory of an application from within a library? What I really want is the following:

I am writing a library that depends on a third library. This third library ships with a binary, that is installed in the local vendor/bin of the main application. My library needs to have the possibility to execute this binary. I could probably hack something using __DIR__/../...../bin but that feels not very good an is probably not reliable.

Upvotes: 2

Views: 1555

Answers (1)

po_taka
po_taka

Reputation: 1856

bin can be changed, two ways: changing bin dir

Here is your solution: Can Composer treat binary dependencies in PATH?

Now you have the path. You will need to figure out how(where) to store that data.

Upvotes: 1

Related Questions