8000 ide setting on path replace fails · Issue #24129 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

ide setting on path replace fails #24129

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

Closed
AntonioCS opened this issue Sep 7, 2017 · 7 comments
Closed

ide setting on path replace fails #24129

AntonioCS opened this issue Sep 7, 2017 · 7 comments

Comments

@AntonioCS
Copy link
Q A
RFC? yes
Symfony version 3.3.8

Hey,

I am trying to use the ide setting with paths replaced but I just can't get it to accept the paths and the documentation is not very clear.

So initially I had this:

ide: "netbeans://open?file=%%f&line=%%l"

But since this is giving me an incorrect path (running it on docker) I tried to do what the documentation tells me to do (guest_path>host_path) like so:

ide: "netbeans://%f:%l&/application/>/host-path/&open?file=%%f&line=%%l"

But this just leads to an error:

(1/1) ParameterNotFoundException

You have requested a non-existent parameter "f:".

I tried a few variations of that string but I just can't get it to work.
Can someone please point me in the right direction and also update the documentation to make this a bit clearer?

Thanks!

@ro0NL
Copy link
Contributor
ro0NL commented Sep 10, 2017

The value used in docs 'myide://%f:%l&/path/to/guest/>/path/to/host/&/foo/>/bar/&...' needs to be escaped if used as a config value, as then %...% has special meaning. It doesnt mention that :)

So should be ide: "netbeans://%%f:%%l&/application/>/host-path/&open?file=%%f&line=%%l"

But you need to apply path mappings as last to preserve a valid URL, as it basically uses special query params for this.

So ide: "netbeans://open?file=%%f&line=%%l&/application/>/host-path/" works as expected.

@aik099
Copy link
aik099 commented Sep 18, 2017

@AntonioCS, just stumbled upon same issue. Turned out the value of xdebug.file_link_format in my php.ini file was always used instead of framework.ide config option. The documentation said it works the opposite. I've sent PR (see symfony/symfony-docs#8405) to update the documentation.

@aik099
Copy link
aik099 commented Sep 18, 2017

@ro0NL , the documentation attempts to display, that several path prefixes can be specified, but it indeed confuses people. In reality it's ways one path prefix pair (guest to host).

@aik099
Copy link
aik099 commented Sep 18, 2017

@AntonioCS , I have this for framework.ide value and it works:

phpstorm://open?file=%%f&line=%%l&/home/alex/web/>/Volumes/web/

@AntonioCS
Copy link
Author

@aik099 Yes that is what @ro0NL suggested and it's working great and yes that documentation is a bit tricky.
Thanks @ro0NL

@aik099
Copy link
aik099 commented Sep 18, 2017

@AntonioCS , @ro0NL , maybe you can send a PR to documentation to have 2 examples:

  • one for common use, when there is only one path prefix
  • advanced one if several path prefixes are used

?

@Apologiz
Copy link
Apologiz commented May 24, 2018

This works for PhpStorm in linux :)

$ git clone https://github.com/sanduhrs/phpstorm-url-handler.git
# cp phpstorm-url-handler/phpstorm-url-handler /usr/bin/phpstorm-url-handler
# desktop-file-install phpstorm-url-handler/phpstorm-url-handler.desktop
# update-desktop-database
$ rm -rf phpstorm-url-handler
$ echo "APP_HOME=$(pwd)" >> .env
$ echo "ide: 'phpstorm://open?file=%%f&line=%%l&/var/www/myProject>%env(APP_HOME)%'" >> $(pwd)/config/packages/framework.yaml

replace myProject with the name of your project

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

30F9 4 participants
0