Foundation
Foundation copied to clipboard
vendor/bin/pomm.php is not a php script?
I've installed Pomm 2, as per instructions in "Quick Setup 2.0" on the homepage.
The installed vendor/bin/pomm.php
is not a PHP script - it appears to contain a shell script?
As per that page, if I enter php vendor/bin/pomm.php
, it simply outputs the contents of the shell script.
I'm on Windows, but I use Git Bash, so I am generally able to run most simple shell scripts.
Simply entering ./vendor/bin/pomm.php
works, but I believe that's because it's not actually running this through the php interpreter, but instead running it through the shell. So I guess the filename is just wrong? Probably should be just pomm
not pomm.php
, right?
Well, we encourage windows users to report such feedback because none of use use Microsoft’s OS. On Unix like OSs, composer creates the symbolic link vendor/bin/pomm.php
that points to vendor/pomm-project/cli/bin/pomm.php
which is a php script, UTF-8 Unicode text executable.
This said, I have no idea why the script is not interpreted when called with the PHP CLI because there is the <?php
tag even though it is preceded by the shebang #!/bin/env php
(I do not know if Windows uses this).
Any clue from other Windows users ?
@chanmix51 but there is no php tag - the contents of the file installed in vendor/bin/pomm.php
is:
#!/usr/bin/env sh
SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd "../pomm-project/cli/bin"
BIN_TARGET="`pwd`/pomm.php"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"
It's not a PHP script, obviously - it's named ".php", but it's clearly a shell-script?
Ok, that seems to be the composer trick to circumvent the lack of symbolic link in Windows. Agree with you, the script as auto executable should not have an extension. This is not something we can really change now as it is not really a bug and this might create regression issues with scripts using this CLI tool. What do you think ?
I have added a note on pomm project’s website about this. Is there something else we can do ?
Can we close this ticket ?
Flag for 3.0 maybe?
Wouldn't have thought about this, thank you.
@chanmix51 a solution could be to provide a new bin
script without extension, which would become the recommended one.
This is even better than doing the renaming in 3.0 only, as it allows to migrate progressively.
Btw, this issue should be moved to https://github.com/pomm-project/Cli