Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Issue #1171: Allow client to pass PHP and XDEBUG environemnt variables over SSH #1189

Merged
merged 4 commits into from
Jun 2, 2017

Conversation

oxyc
Copy link
Collaborator

@oxyc oxyc commented Feb 28, 2017

todo: docs

@geerlingguy
Copy link
Owner

@oxyc - Can you document somewhere how to use this?

@oxyc
Copy link
Collaborator Author

oxyc commented Mar 16, 2017

I'll try and play around with some examples for this during the weekend but I'm now thinking that maybe it's useful to have this set by a config option instead. It could be useful outside the realm of xdebug and seems odd that it's depending on it.

Maybe add ssh_accept_php_vars: true. And check

when: ssh_accept_php_vars and not extra_security_enabled

Or simply toggle it off if extra_security_enabled is truthy, I'm guessing most don't really care. The ones who do care, want it on.

@FinBoWa
Copy link

FinBoWa commented Mar 16, 2017

@oxyc just hit me that i commented on the #716 (comment) and that was closed all ready.

So wouldn't it be better that ansible generated those lines to the vagrant users bashrc and based them on the config.yaml settings.

@oxyc
Copy link
Collaborator Author

oxyc commented Mar 16, 2017

I don't think they should be hardcoded to be honest. I feel it's better if especially PHP_OPTIONS is set only when required, and not on every CLI request.

@oxyc
Copy link
Collaborator Author

oxyc commented Mar 16, 2017

I applied for a PhpStorm OpenSource license, let's see if I get it before the weekend and I can do some testing.

@oxyc
Copy link
Collaborator Author

oxyc commented Mar 19, 2017

I quickly remembered why I'm still using vim... I have to postpone getting into this whole IDE thing...

@geerlingguy
Copy link
Owner

@oxyc - You and me both. Getting Xdebug happy through an IDE with PHP reminds me of developing for Java... way overcomplicated just to print out a variable :P

@FinBoWa
Copy link

FinBoWa commented Mar 19, 2017

For me getting xdebug working with Vim would be problematic also :). Anyways the phpstorms https://www.jetbrains.com/help/phpstorm/2016.3/zero-configuration-debugging.html is quite a breez to configure but the documentation for it is way overly verbose.

I could translate my guide on getting phpstorm to work somewhat right in 5 steps tomorrow.

@geerlingguy
Copy link
Owner

Is this still necessary/required? I have things working with Sublime Text 3 without needing to set any additional vars like those in the PR... I'm still not entirely clear on why this is required... but I also don't use PHPStorm much.

@thom8
Copy link
Collaborator

thom8 commented May 24, 2017

I think this PR is for CLI XDEBUG via SSH.

@geerlingguy
Copy link
Owner

@thom8 - Oh, I was totally misreading that. In that case, does anyone have any objections to the way @oxyc implemented this? I figure we could sneak it into the 4.5.0 release as well.

@bdone
Copy link

bdone commented May 24, 2017

no objections. it would be helpful and appreciated. thanks!

@geerlingguy
Copy link
Owner

I'd like some form of docs (even if it's just inline in a comment on this PR) before merging, though.

@oxyc
Copy link
Collaborator Author

oxyc commented May 30, 2017

I verified that the above examples work (after stumbling around because the ssh service isn't restarted on changes).

@oxyc
Copy link
Collaborator Author

oxyc commented May 30, 2017

Probably better to use default_enable in the examples as that's the more likely use case. I just verified that it worked by checking that the /tmp/cachegrind.out.* files were generated correctly when using profiler_enable.

@geerlingguy
Copy link
Owner

Restarted build, hopefully it comes back all green this time.

@geerlingguy geerlingguy merged commit dafde81 into geerlingguy:master Jun 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants