Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phar Binaries doesn't work with php cli after update to 2.1.x #9958

Closed
blankse opened this issue Jun 9, 2021 · 5 comments · Fixed by #9959
Closed

Phar Binaries doesn't work with php cli after update to 2.1.x #9958

blankse opened this issue Jun 9, 2021 · 5 comments · Fixed by #9959
Milestone

Comments

@blankse
Copy link
Contributor

blankse commented Jun 9, 2021

My composer.json:

{
    "require": {
        "deployer/dist": "^6.8"
    }
}

When I run this command:

php composer.phar install
php vendor/bin/dep

I get the following output (Version 2.1.2):

dir=$(cd "${0%[/\\]*}" > /dev/null; cd '../deployer/dist' && pwd)

if [ -d /proc/cygdrive ]; then
    case $(which php) in
        $(readlink -n /proc/cygdrive)/*)
            # We are in Cygwin using Windows php, so the path must be translated
            dir=$(cygpath -m "$dir");
            ;;
    esac
fi

"${dir}/dep" "$@"

And I expected this to happen (Version 2.0.14):

Deployer 6.8.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -f, --file[=FILE]     Specify Deployer file
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  autocomplete  Install command line autocompletion capabilities
  help          Displays help for a command
  init          Initialize deployer in your project
  list          Lists commands
  run           Run any arbitrary command on hosts
  self-update   Updates deployer.phar to the latest version
  ssh           Connect to host through ssh
 debug
  debug:task    Display the task-tree for a given task
@blankse
Copy link
Contributor Author

blankse commented Jun 9, 2021

I'm working on WSL. Seems to be a regression from #9855
Can we add a "symlink" option for "bin-compat" to set the old behavior?

@Seldaek
Copy link
Member

Seldaek commented Jun 9, 2021

You don't need php prefix there. You can simply run vendor/bin/dep. We can add a new option for sure but IMO you really don't need it here :)

@blankse
Copy link
Contributor Author

blankse commented Jun 9, 2021

@Seldaek But I have on some servers no global php binary or the global one has an outdated version. I must set the php cli before.

Edit: But the server not have WSL... So it can be enough :) But I think we can add the new option :)

@Seldaek
Copy link
Member

Seldaek commented Jun 9, 2021

Yeah then in that case sure you need the prefix, but those servers won't have the WSL fallback behavior I suppose so it shouldn't be a problem.

@Seldaek Seldaek added this to the 2.1 milestone Jun 9, 2021
@blankse
Copy link
Contributor Author

blankse commented Jun 9, 2021

@Seldaek When I remove the PHP CLI I get now a permission error:
vendor/bin/dep deploy live
vendor/bin/dep: 14: vendor/bin/dep: /var/www/html/vendor/deployer/dist/dep: Permission denied

When Composer creates the proxy file, can it set the permissions to the target?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants