8000 [Phpstorm Plugin Support] Remote Call · Issue #24218 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Phpstorm Plugin Support] Remote Call #24218

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
pquerner opened this issue Sep 15, 2017 · 10 comments
Closed

[Phpstorm Plugin Support] Remote Call #24218

pquerner opened this issue Sep 15, 2017 · 10 comments

Comments

@pquerner
Copy link
pquerner commented Sep 15, 2017
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 3.3.8

There is a PHPStorm plugin called "Remote call" [1] which can be used to open files in your IDE if you click on a special hyperlink. This could be used for example in the Symfony Profiler section, where you can check your templates used on your current page.
A hyperlink on that twig template can be used to open the file automatically in your IDE.

A popular Magento1 module [2] uses this plugin to help you to open the templates in your IDE faster.

There is also a bundle for this [3], but its outdated according to their composer.json.

[1] https://plugins.jetbrains.com/plugin/6027-remote-call
[2] https://github.com/AOEpeople/Aoe_TemplateHints
[3] https://github.com/darles/RemoteCallBundle

@ro0NL
Copy link
Contributor
ro0NL commented Sep 16, 2017

Just wondering.. cant you already achieve this with the framework.ide setting? Assuming the plugin is enabled on phpstorm side.

@pquerner
Copy link 8000
Author

I dont know what you mean. The Hyperlink must be specially crafted (see docs on the Remote Call plugin for more information) so the IDE (with enabled plugin) can intercept it.

@ro0NL
Copy link
Contributor
ro0NL commented Sep 16, 2017

@pquerner
Copy link
Author

"Symfony turns file paths seen in variable dumps and exception messages"

No words about the profiler.

@ro0NL
Copy link
Contributor
ro0NL commented Sep 16, 2017

Dumps in profiler benefit the same feature. Twig bridge provides file_link for specialized links, i.e. the dispatched controller in WDT is linked that way.

This could be used for example in the Symfony Profiler section, where you can check your templates used on your current page.

IIUC you propose a new feature where for each twig template rendered, we'd somewhere render a link to it. Right? That's souds nice and can be done in the twig panel perhaps 👍

@pquerner
Copy link
Author

I mean, in the Profiler Template section you can see what templates were parsed (and the name of the template). I propose that these templates names also get a special crafted hyperlink onto them, so I can be lazy and click on that hyperlink to have my IDE open the file for me.

I guess that can be easily forged with your file_link function, if twig knows more than the file name (ie its path on the file system).

@ro0NL
Copy link
Contributor
ro0NL commented Sep 16, 2017

See #24236

fabpot added a commit that referenced this issue Sep 27, 2017
…es (ro0NL)

This PR was squashed before being merged into the 3.4 branch (closes #24236).

Discussion
----------

[WebProfilerBundle] Render file links for twig templates

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #24218
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

![image](https://user-images.githubusercontent.com/1047696/30515418-8c4615c6-9b27-11e7-8e26-8caa30ff7cbb.png)

Also tweaked default code color a bit for yaml, twig and the like.

Before
![image](https://user-images.githubusercontent.com/1047696/30515499-2231d768-9b29-11e7-8cab-a61537e83343.png)

After
![image](https://user-images.githubusercontent.com/1047696/30515504-354ea218-9b29-11e7-9457-518e9413e6f9.png)

Commits
-------

860575a [WebProfilerBundle] Render file links for twig templates
@fabpot fabpot closed this as completed Sep 27, 2017
@pquerner
Copy link
Author

I have found a bug with the proposed change from @ro0NL . It has been reported here #24236 (comment)

@fabpot

@nicolas-grekas
Copy link
Member

@pquerner please open a new issue: comments on closed PR/issues can easily get lost.

@pquerner
Copy link
Author

@nicolas-grekas I have created a new issue here #24355
I hope its fine how I created it, since I wasnt sure how to report stuff which is still in a -dev branch.

ostrolucky pushed a commit to ostrolucky/symfony that referenced this issue Mar 25, 2018
…templates (ro0NL)

This PR was squashed before being merged into the 3.4 branch (closes symfony#24236).

Discussion
----------

[WebProfilerBundle] Render file links for twig templates

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | symfony#24218
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

![image](https://user-images.githubusercontent.com/1047696/30515418-8c4615c6-9b27-11e7-8e26-8caa30ff7cbb.png)

Also tweaked default code color a bit for yaml, twig and the like.

Before
![image](https://user-images.githubusercontent.com/1047696/30515499-2231d768-9b29-11e7-8cab-a61537e83343.png)

After
![image](https://user-images.githubusercontent.com/1047696/30515504-354ea218-9b29-11e7-9457-518e9413e6f9.png)

Commits
-------

860575a [WebProfilerBundle] Render file links for twig templates
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

4 participants
0