Skip to content
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] Improves dd clickable link on multiple editors and docker environments #44406

Merged
merged 8 commits into from
Oct 3, 2022

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Sep 30, 2022

This pull request addresses both #44378, and #44360, and it provides 4 new things:

  1. Offers better native support for the URLs protocols: sublime, textmate, emacs, macvim, phpstorm, idea, vscode, vscode-insiders, vscode-remote, vscode-insiders-remote, vscodium, atom, nova, netbeans, xdebug. Note, operating system still need to support these protocols in order this to work.
// As usual, people may define their editor on the `config/app.php`:
'editor' => 'phpstorm', // phpstorm://open?file=/my-work-directory/laravel/routes/web.php&line=17

// Yet, if editor is `vcode`, the generated URL will be different:
'editor' => 'vscode', // vscode://file//Users/nunomaduro/Work/Code/laravel/routes/web.php:17
  1. Next, if people are using docker, they may now define the project's base_path. Not that now, people need to use the array format, and not a simple string:
'editor' => [
    'name' => 'phpstorm',
    'base_path' => '/my-pc-directory/laravel', // phpstorm://open?file=//my-pc-directory/laravel/laravel/routes/web.php&line=17
],
  1. Finally, for people who are using something very different, they may now define their own custom href format — instead of specifying the editor's name:
'editor' => [
    'href' => 'vscode://vscode-remote/wsl+Ubuntu-20.04{file}:{line}',
    'base_path' => '/my-pc-directory/laravel',  '/my-pc-directory/laravel', // vscode://vscode-remote/wsl+Ubuntu-20.04/my-pc-directory/laravel/laravel/routes/web.php&line=17
],
  1. Makes the dd output on console equally use the href approach we are using on the HTTP layer.

@sirmathays
Copy link

For me with the following configuration it indeed worked on WSL2 👌

'editor' => [
    'href' => 'vscode://vscode-remote/wsl+Ubuntu-20.04{file}:{line}'
],

@nunomaduro nunomaduro changed the title [9.x] Adds support for base_path and custom href on dd source output [9.x] Improves dd clickable link on multiple editors and docker environments Oct 3, 2022
@nunomaduro nunomaduro self-assigned this Oct 3, 2022
@nunomaduro nunomaduro marked this pull request as ready for review October 3, 2022 13:43
@taylorotwell taylorotwell merged commit df474f6 into 9.x Oct 3, 2022
@taylorotwell taylorotwell deleted the feat/better-dd-editor-support branch October 3, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants