Coder Social home page Coder Social logo

Comments (7)

TangoMan75 avatar TangoMan75 commented on April 27, 2024 1

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.

bernhardh avatar bernhardh commented on April 27, 2024

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.

xpavp03 avatar xpavp03 commented on April 27, 2024

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.

bernhardh avatar bernhardh commented on April 27, 2024

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):

image

from phpstorm-url-handler.

bernhardh avatar bernhardh commented on April 27, 2024

Thanks. Your updated version is now working for me 👍 - the version from this repo is not.

from phpstorm-url-handler.

melkyfb avatar melkyfb commented on April 27, 2024

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.

sanduhrs avatar sanduhrs commented on April 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.