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

Call symfony in vagrant #33

Open
st-schneider opened this issue Feb 28, 2019 · 14 comments
Open

Call symfony in vagrant #33

st-schneider opened this issue Feb 28, 2019 · 14 comments

Comments

@st-schneider
Copy link

would be nice if this would be an option.

@st-schneider
Copy link
Author

ok I found the docker example and adjusted my command but i get the following

  The "-t" option does not exist.  
                                   
debug:router [--show-controllers] [--format FORMAT] [--raw] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<name>]


@TheNouillet
Copy link
Owner

Hello,

What command did you put in the Shell Command setting ? When calling the debug:router command, the extension doesn't add any argument beside --format=json. Do you have the same problem when only refreshing services ?

@st-schneider
Copy link
Author

st-schneider commented Mar 1, 2019

    "symfony-vscode.consolePath": "/var/www/app/console",
    "symfony-vscode.shellExecutable": "/bin/bash",
    "symfony-vscode.shellCommand": "vagrant ssh -t -c 'cd /var/www && php \"$@\"' d8d52c5 -- "

Yes I get that for all the view, then with debug:container

@st-schneider
Copy link
Author

btw doesnt matter if the -t for vagrant is there or not

@igorsinkovec
Copy link

igorsinkovec commented Apr 9, 2019

I have the same problem; both on load and when refreshing services. I did not include -t switch in symfony-vscode.shellCommand config.

@igorsinkovec
Copy link

Solved by ssh-ing to the Vagrant box directly. First I created a ssh config file from Vagrant config:
vagrant ssh-config > vagrant-ssh-config
The shell command config then looks like this:
"symfony-vscode.shellCommand": "cd /path/to/vagrant-dir; ssh -F vagrant-ssh-config <vagrant-box-name>; 'cd /path/to/symfony-app; php \"$@\"' -- "

@st-schneider
Copy link
Author

[2019-04-10 17:23:18.826] [exthost] [error] [TheNouillet.symfony-vscode] provider FAILED
[2019-04-10 17:23:18.826] [exthost] [error] TypeError: Cannot read property 'find' of undefined

@st-schneider
Copy link
Author

this is what I get with that

@igorsinkovec
Copy link

Yes, I get that too, but I don't think it's related.

@st-schneider
Copy link
Author

shouldn't it be?:
ssh -F vagrant-ssh-config 'cd /path/to/symfony-app; php "$@"'

@igorsinkovec
Copy link

igorsinkovec commented Apr 11, 2019

shouldn't it be?:
ssh -F vagrant-ssh-config 'cd /path/to/symfony-app; php "$@"'

Not in my environment. SSH does not connect without the host machine name.

@st-schneider
Copy link
Author

ehh of coursem my point was actuall the ;

@st-schneider
Copy link
Author

st-schneider commented Apr 11, 2019

ssh -t -F vagrant-ssh-config default 'cd /var/www; php `$@`' --
but then I get
[2019-04-11 09:38:29.810] [exthost] [error] [TheNouillet.symfony-vscode] provider FAILED
[2019-04-11 09:38:29.811] [exthost] [error] Error: Illegal argument: character must be non-negative

@st-schneider
Copy link
Author

This works for me.

"symfony-vscode.shellCommand": "cd /path/to/vagrant-dir && vagrant ssh-config > vagrant-ssh-config && ssh -t -F vagrant-ssh-config <vagrant-box-name> 'cd /path/to/symfony-app && php `$@`' ",

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

No branches or pull requests

3 participants