Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] Add PHPStorm helper link format for Mac#21712

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
pierredup wants to merge0 commits intosymfony:2.7frompierredup:patch-3

Conversation

@pierredup
Copy link
Contributor

@pierreduppierredup commentedFeb 22, 2017
edited
Loading

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRsymfony/symfony-docs#7513

The current file link format is based onhttps://github.com/aik099/PhpStormProtocol, but PHPStorm supports the protocol natively using a different syntax (Since PHPStorm 8)

'emacs' =>'emacs://open?url=file://%%f&line=%%l',
'sublime' =>'subl://open?url=file://%%f&line=%%l',
'phpstorm' =>'phpstorm://open?url=file://%%f&line=%%l',
'phpstorm' =>'phpstorm://open?file=%f&line=%l',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

% must stay escaped for DIC parameters

pierredup reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Re-added the escape characters

@harcod
Copy link

I don't think you should make this modification at all.

The current file link format is based onhttps://github.com/aik099/PhpStormProtocol, but PHPStorm supports the protocol natively using a different syntax (Since PHPStorm 8)

It appears this is only true for PHPStorm 8 onMacOS. Windows and Linux versions of PHPStorm still requirehttps://github.com/aik099/PhpStormProtocol (orhttps://github.com/sanduhrs/phpstorm-url-handler on Linux). Thedocumentation even referencesPhpStormProtocol as a requirements for using the 'phpstorm' value for 'ide'.

Perhaps, there should be a new 'phpstorm-mac' value in the code with the new format ('phpstorm://open?file=%f&line=%l') and the documentation should be changed to have a generic example such as 'myide://open?url=file://%%f&line=%%l' to avoid confusion with phpstorm.

In my particular case, I would have had zero problems if I had just set the value of the 'ide' to 'phpstorm'. My mistake was seeing 'phpstorm://open..." in the example for another editor and using that misleading example instead.

@pierredup
Copy link
ContributorAuthor

I've updated the PR to only change the value in the case of Mac. I'm not close to a Windows PC at the moment, but I'll double check Windows and Linux tomorrow.

I think the docs should be updated to mention specifically usinghttps://github.com/aik099/PhpStormProtocol andhttps://github.com/sanduhrs/phpstorm-url-handler on Windows and Linux respectively (instead of just specifying that PhpStormProtocol is needed) and the examples should change tomyide like you mentioned

@harcod
Copy link

I updated the docs as suggested intosymfony/symfony-docs#7513

@pierredup
Copy link
ContributorAuthor

I double checked Windows and Linux, and this PR is ready.

Status: Needs Review

'emacs' =>'emacs://open?url=file://%%f&line=%%l',
'sublime' =>'subl://open?url=file://%%f&line=%%l',
'phpstorm' =>'phpstorm://open?url=file://%%f&line=%%l',
'phpstorm' =>'Darwin' ===PHP_OS ?'phpstorm://open?file=%%f&line=%%l' :'phpstorm://open?url=file://%%f&line=%%l',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not sure if that's really a good idea (useful at all) since this won't work anyway when Symfony is running in a virtual machine, will it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

checking the OS will indeed not play well with VMs, as phpstorm will run on the host, not on the VM.
We should have a separate config key IMO

aik099 reacted with thumbs up emoji
@pierredup
Copy link
ContributorAuthor

Changed the config to use a separate key to cater for VMs

@pierreduppierredup changed the title[FrameworkBundle] Update PHPStorm helper link format[FrameworkBundle] Add PHPStorm helper link format for MacFeb 23, 2017
harcod added a commit to harcod/symfony-docs that referenced this pull requestFeb 23, 2017
'emacs' =>'emacs://open?url=file://%%f&line=%%l',
'sublime' =>'subl://open?url=file://%%f&line=%%l',
'phpstorm' =>'phpstorm://open?url=file://%%f&line=%%l',
'phpstorm-mac' =>'phpstorm://open?file=%%f&line=%%l',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are we sure that this will only ever be supported on Mac only? If not, what aboutphpstorm-official,phpstorm-core, or something along those lines? (I'm not a phpstorm user, so not sure if that makes sense).

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I opted forphpstorm-core

@pierredup
Copy link
ContributorAuthor

@harcod Can you please make the changes to the docs PR to usephpstorm-core instead

harcod reacted with thumbs up emoji

@javiereguiluz
Copy link
Member

I'm probably too late, but ... what if we change these values as follows:

OldNew
phpstormphpstorm-protocol
phpstorm-corephpstorm

The reason is that ultimately PHPStorm will do the right thing and support their correct native format ... so that should bephpstorm and notphpstorm-<something>

@pierredup
Copy link
ContributorAuthor

pierredup commentedFeb 24, 2017
edited
Loading

Won't that be a BC break, for everyone usingphpstorm currently and now getting a different value?

I agreephpstorm should be the official value that PHPStorm supports, but there is no indication when it will be added to the other platforms. So when that happens, maybephpstorm-core can be deprecated and removed in the next major withphpstorm holding the official value?

harcod added a commit to harcod/symfony-docs that referenced this pull requestFeb 24, 2017
@fabpot
Copy link
Member

I don't think there is such a thing as BC break for such a parameter. It has no impact on user's code.

@pierredup
Copy link
ContributorAuthor

It doesn't have an impact on the code, but it has an impact on the current experience and expectations. It would still require a change in the config to keep the current experience. But if you think thats not a problem then I'm happy to make the change

@fabpot
Copy link
Member

I think that's definitely something we can do in a minor release, with a proper entry in the changelog.

@nicolas-grekasnicolas-grekas added this to the3.3 milestoneFeb 25, 2017
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

@harcod
Copy link

I have submitted PRs to the Windows and Linux versions of the phpstorm protocol handlers that would allow them to support both thenative PhpStorm Mac scheme as well as their current scheme. If these are incorporated, then this PR could just eliminate the "phpstorm-protocol" completely and only support the native PhpStorm format.

harcod added a commit to harcod/symfony-docs that referenced this pull requestFeb 27, 2017
@pierredup
Copy link
ContributorAuthor

Since both PRs have been merged, we only need to support the official format. I have updated the PR accordingly

@fabpot
Copy link
Member

So, this new version of the PR should be merged into 2.7 as a bug fix, right?

@pierreduppierredup changed the base branch frommaster to2.7March 1, 2017 14:38
@pierredup
Copy link
ContributorAuthor

pierredup commentedMar 1, 2017
edited
Loading

@fabpot Thephpstorm helper was only added in 3.2.

I stuffed up my branch, so I created a new PR to go as a bugfix against 3.2#21813

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@stofstofstof requested changes

@xabbuhxabbuhxabbuh left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

8 participants

@pierredup@harcod@javiereguiluz@fabpot@nicolas-grekas@stof@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp