Comments (7)
As an alternative you can use a symlink on your host machine that mirrors your docker project directory structure like so :
ln -s "${_host_directory}" "${_container_directory}"
# example
ln -s "/home/username/project" "/var/www"
It works like a charm.
from phpstorm-url-handler.
PHP Storm says:
Cannot find file 'phpstorm://open?file=/home/www/project1/app/Models/Users/UserBookmarkGroup.php&line=63'
when I try to open a url?
from phpstorm-url-handler.
PhpStorm should not be getting the full url but only the file part. Does the original script work for you? You're not passing a project parameter so you don't need my enhanced version.
Edit: Oh snap, my pattern was missing a question mark at the end. Without it the project parameter was obligatory.
I just added it.
from phpstorm-url-handler.
The original script doesn't work either. Since i got an "ugly" url in the error message with the original one, I thought I try it with yours.
Cannot find file '%2Fhome%2Fwww%2Fproject1%plugins%2FUserBookmark%2FUserBookmarkController.php'
Btw. the url is generated by my framework (Laravel):
from phpstorm-url-handler.
Thanks. Your updated version is now working for me 👍 - the version from this repo is not.
from phpstorm-url-handler.
I made this simple version to make that work for me
#!/usr/bin/env bash
# PhpStorm URL Handler
# phpstorm://open?url=file://@file&line=@line
# phpstorm://open?file=@file&line=@line
#
# @license GPL
# @author Stefan Auditor <[email protected]>
arg=${1}
pattern=".*file(:\/\/|\=)(.*)&line=(.*)"
networkshare='/var/www/app'
projectfolder='/home/melkyfb/PhpstormProjects/app'
# Get the file path.
file=$(echo "${arg}" | sed -r "s/${pattern}/\2/")
file=${file/$networkshare/$projectfolder}
# Get the line number.
line=$(echo "${arg}" | sed -r "s/${pattern}/\3/")
# Check if phpstorm|pstorm command exist.
if type phpstorm > /dev/null; then
/usr/bin/env phpstorm --line "${line}" "${file}"
elif type pstorm > /dev/null; then
/usr/bin/env pstorm --line "${line}" "${file}"
fi
from phpstorm-url-handler.
The original script doesn't work either. Since i got an "ugly" url in the error message with the original one, I thought I try it with yours.
Cannot find file '%2Fhome%2Fwww%2Fproject1%plugins%2FUserBookmark%2FUserBookmarkController.php'
This should be fixed in environment variables e46793a
from phpstorm-url-handler.
Related Issues (10)
- Add support for pstorm:// HOT 2
- Transfer focus to the PhpStorm window HOT 4
- Nothing happens when clicking phpstorm:// links HOT 1
- stopped working, terminal true fixes it? HOT 2
- Command is pstorm or phpstorm ? HOT 7
- phpstorm:// link's opens in new phpstorm instance, instead of using *existing* instance HOT 1
- Doesn't work for me HOT 4
- Opens wrong path (prefixed with home directory) HOT 4
- phpstorm.sh is not founded HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpstorm-url-handler.