Closed backbone87 closed 7 years ago
Can anyone explain why composer adds these launcher scripts? They wouldn't be there if they were not useful for something?
thats just the way how composer treats binaries, if the binary relies on its location it would be no good to copy or link it from the bundle to the vendor/bin dir. so instead composer places launcher scripts in vendor/bin which will just call the real binary inside the package. this has also the benefit of providing a .bat for windows users.
there are basically 2 ways to call the binaries:
./vendor/bin/contao-console ...
executes the launcher script as a php shell script directly (its a shell feature to interpret the hashbang), iirc this works only on unix shells, in windows you should do ./vendor/bin/contao-console.bat
which is the launcher script for windows cmd shell or power shellphp vendor/bin/console-console
uses the php interpreter to execute the launcher script. the php interpreter ignores the hashbang (? at least it seems that way, i am not sure on this) and just executes it as a regular php scripti dont think so because bin/console
isnt a "third party binary" (binaries from vendor packages), but a real binary from the application (contao standard edition for example)
whats the difference between the contao-console and the symfony console? why arent there just contao commands for the symfony console? like php bin/console contao:do-something-fancy
edit: just checked that out, contao-console is something specific to managed edition where there is no bin/console?
It is exactly the same, just another location.
I still don't unterstand why we don't want to use the Composer script?
because its a shell script and not a php script
As mentioned in #25, could this be back ported into 4.3.11 please?
insteadof composers vender/bin one, because under windows these are launcher scripts for the package command and not symlinks of it