-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[9.x] Update dd function when running on virtualized dev environments #44360
Conversation
@@ -133,10 +133,11 @@ protected function getDumpSourceContent() | |||
$source = sprintf('%s%s', $relativeFile, is_null($line) ? '' : ":$line"); | |||
|
|||
if ($editor = $this->editor()) { | |||
$editorProjectPath = $this->editorProjectPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to infer the project's path, so the user don't have to hardcode it on his configuration file / environment variables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can get the host path from inside a docker container. Also, this feature would be useful for opening local files from a dd() on a remote server
Maybe it could be useful to use a single env value for both ingnition and dd() features (for ignition is currently used IGNITION_LOCAL_SITES_PATH
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is no way to automatically infer the project's path as the editor that the users use.
That's why I have the user hardcode it.
Unfortunately, I have no idea.
Do you have any solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabio-ivona
It sounds good!
IGNITION_EDITOR
and IGNITION_LOCAL_SITES_PATH
is suitable for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use a more general key, like (EDITOR_BASE_PATH) and ask to Spatie to support that one as well
using "IGNITION" for this feature doesn't seem consistent to me
I made a pull request (#44378) that seems to overlap with this one at least a little bit:
Then in |
Closing this pull request, as I will be working on this format: #44378 (comment). |
@jevouslue Do you mind of try to use the branch #44406 locally, and let me know if it works for you in both the terminal and browser please. |
@nunomaduro
In the terminal, it just displays the file path as before, and it's non-clickable, right? (I mean the color)
You're always doing great! |
@jevouslue isn't the second one clickable? which terminal are you using? |
@fabio-ivona The second one is also clickable! |
This PR enhances the recently added feature, dd function output (#44211).
The great feature "clickable file path" doesn't work when running on virtualized dev environments, including Laravel Sail.
You just add the
app.editor_project_path
configuration, and the source link will work properly even on your virtualized dev environments.config/app.php
Of course, this is optional.
And I also think the params should be in the .env file.
.env(example)
This is my first PR for any OSS projects, maybe something weird...