Utilize composer's 'bin' property for global installs.#41
Conversation
9e117de to
a64a668
Compare
| } | ||
| } | ||
| }, | ||
| "bin": ["bin/dorgflow"] |
There was a problem hiding this comment.
Can't we just leave the dorgflow file where it is, and give a different value to composer in the 'bin' property? Looking at how the bin/ part is given here, it doesn't look like the bin/ folder is magic in any way.
There was a problem hiding this comment.
Oh, good idea! I'll make that change--I think the changes to the binary's require statements will still be needed as this gets symlinked into composer's bin directory.
There was a problem hiding this comment.
That's fine -- the DIR is generally better practice anyway, as it makes it explicit that it's the current directory. Without it, the code would break if it were to be moved to go after a chdir().
a64a668 to
4d5d90a
Compare
|
I think the necessary changes have been made here. Anything left to do? |
This change makes use of composer's
binproperty so that when installing globally, or as part of another project, the binary is properly symlinked into the bin directory (typicallyvendor/bin).I wonder if for backward compatibility if we should symlink the binary back into the root directory?