Giter Site home page Giter Site logo

Bin conflicts about composer-bin-plugin HOT 4 CLOSED

bamarni avatar bamarni commented on May 25, 2024
Bin conflicts

from composer-bin-plugin.

Comments (4)

theofidry avatar theofidry commented on May 25, 2024 1

What about adding an isolated-bins option, which would disable passing the COMPOSER_BIN_DIR variable? Then you could run ./vendor-bin/laravel/bin/phpunit and ./vendor-bin/symfony/bin/phpunit.

Looks like a good compromise. Less elegant but I don't see a better solution to solve this problem.

from composer-bin-plugin.

bamarni avatar bamarni commented on May 25, 2024

Given how this plugin works (it's just a simple wrapper), that'd be very tricky to implement.

Nonetheless I think that this could be a feature request to ask for in composer, it can be useful outside of the scope of this plugin. Maybe a config for a bin-pattern (with its associated COMPOSER_BIN_PATTERN env) would be more flexible than a prefix, for instance if people use different composer projects linked to the same bin-dir which is in their $PATH, they could install different versions of a given tool easily (prefix-{name} or {name}-5 for the version as a suffix).

from composer-bin-plugin.

theofidry avatar theofidry commented on May 25, 2024

AFAIK integrating such things to Composer itself is out of question (Jordi
was quite against it and I don't feel like pressuring him to do so is right
either, he already expressed his view on it and I would rather respect it
than constantly re-questioning it).

Isn't the symlink done in this plugin? I don't mind taking a look at it but
I may need you to point me out a thing or two :)

On Wednesday, 7 September 2016, Bilal Amarni [email protected]
wrote:

Given how this plugin works (it's just a simple wrapper), that'd be very
tricky to implement.

Nonetheless I think that this could be a feature request to ask for in
composer, it can be useful outside of the scope of this plugin. Maybe a
config for a bin-pattern (with its associated COMPOSER_BIN_PATTERN env)
would be more flexible than a prefix, for instance if people use different
composer projects linked to the same bin-dir which is in their $PATH, they
could install different versions of a given tool easily (prefix-{name} or
{name}-5 for the version as a suffix).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE76gYN52WNwQbjxQ9n2zonuDGVUcFfRks5qnv7igaJpZM4J2CAX
.

from composer-bin-plugin.

bamarni avatar bamarni commented on May 25, 2024

Well, the symlink is not made from here at all. The plugin just acts as a helper :

composer bin namespace require vendor/package

Will basically run behind the scene something like :

mkdir -p vendor-bin/namespace
cd vendor-bin/namespace
COMPOSER_BIN_DIR=/bin/dir/from/main/project require vendor/package
cd ../../

And the all namespace will loop through all directories in vendor-bin instead and run the command in each of them. So symlinks are made by Composer.

What about adding an isolated-bins option, which would disable passing the COMPOSER_BIN_DIR variable? Then you could run ./vendor-bin/laravel/bin/phpunit and ./vendor-bin/symfony/bin/phpunit.

from composer-bin-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.