-
Notifications
You must be signed in to change notification settings - Fork 68
Add support for the PhpStorm Mac scheme #22
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
Conversation
I have also submitted a similar PR for the Linux version of the handler in sanduhrs/phpstorm-url-handler#2 |
PhpStorm 8 you say. This was how much years ago considering latest PhpStorm version is 2016.3? |
If you're using PhpStorm 8+ Mac, then you don't need to use this url handler at all. Isn't that right? Why we need to support url format, that is already handled by PhpStorm itself and therefore create alternative url handler for same url format, that would conflict with PhpStorm's one? |
According to the comment referenced in the README of this project it was in June 2014. The issues lies in the fact that symfony/symfony#21712 is going to prioritize the Macintosh version of the URL scheme since it is the "native" format from the publisher of PhpStorm. |
That is reply to both my comments or only to #22 (comment) ? |
Correct -- If you are using Mac, then you don't need this handler. However, symfony/symfony#21712 is going to have to support both format on their end and the user will have to choose the correct one. In addition, they are changing the "default" format from the version that you currently support to the one that JetBrains created for the Mac. This will cause a backwards-compatibility break for all symfony users of your handler as they will have to change If you accept this PR, then symfony will probably just choose to eliminate (or deprecate) the 'phpstorm-protocol' selector below. Old symfony setting was: New symfony settings are: |
Now I see the whole picture. Thanks for explaining. One more thing though. Seems that there is support for PhpStorm < v8 and https://github.com/aik099/PhpStormProtocol/blob/master/PhpStorm%20Protocol.app/Contents/bin/parse_url.sh needs to be updated to have support for both link formats as well. |
I added the regex change to the parse_url.sh script noted above. I should point out that I don't have a Macintosh to test this particular change. |
You can test it on Linux, because it's Bash script. |
The update to parse_url.sh works on Linux |
Merging, thanks you @harcod . |
PhpStorm 8 (Mac) provided native support for the "phpstorm:" protocol. However, they implemented a different format for the the URL.
PhpStorm Mac uses: phpstorm://open?file=@file&line=@line
This handler uses phpstorm://open?url=file://@file&line=@line
symfony/symfony#21712 is going to change the default format to be the Macintosh format.
This PR contains the necessary modifications to support both formats simultaneously. This would standardize the system so that you would not need two different configurations if you are working on different platforms (i.e. Windows vs Mac)