laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
176 stars 7 forks source link

[Bug]: Smart go to didn't take me to real implementations. #781

Open YunshuaiPeng opened 1 year ago

YunshuaiPeng commented 1 year ago

Bug description

Smart go to didn't take me to real implementations.

Plugin version

7.1.4.231

Idea version

IntelliJ IDEA 2023.1.3 (Ultimate Edition) Build #IU-231.9161.38, built on June 20, 2023 Runtime version: 17.0.7+10-b829.16 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.4 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 8 Metal Rendering is ON Registry: ide.disable.editor.tooltips=true toolwindow.disable.overlay.by.double.key=true debugger.new.tool.window.layout=true documentation.show.toolbar=true ide.experimental.ui=true eslint.additional.file.extensions=svelte

Non-Bundled Plugins: org.rust.lang (0.4.196.5423-231) com.jetbrains.php (231.9161.38) de.beyondco.tinkerwell.tinkerwell (2.5.1) com.jetbrains.php.blade (231.9161.38) zielu.gittoolbox (500.0.10+213) Pythonid (231.9161.38) ru.adelf.idea.dotenv (2023.1) com.laravel_idea.plugin (7.1.4.231)

Kotlin: 231-1.8.21-IJ9161.38

Operating system

MacOS

Steps to reproduce

  1. check this option and restart ide

    image
  2. hold command and click the attribute

    image
  3. I was taken to this file

    image

Relevant log output

No response

adelf commented 1 year ago

Hello. Where do you want to redirect this GoTo? To the migration file with this field? Makes sense, but much more useful to use this field. You can find all usages of this field by using the usual Find Usages feature(Cmd(Ctrl)-Click or B).

adelf commented 1 year ago

Oh. This is an Attribute? You're right. I'll fix it. Sorry)

YunshuaiPeng commented 1 year ago

Oh. This is an Attribute? You're right. I'll fix it. Sorry)

Yes, it is a laravel accessor. The real definition like this:

image
adelf commented 1 year ago

I've checked. It works. Have you generated a helper code? main menu > Laravel > Generate Helper Code?

YunshuaiPeng commented 1 year ago

I've checked. It works. Have you generated a helper code? main menu > Laravel > Generate Helper Code?

Yes, I record a video to show.

https://github.com/laravel-idea/plugin/assets/44765369/8b593d7d-61da-473e-86a4-630cee8128a3

adelf commented 1 year ago

That's weird.

Do you have all options turned on here? Preferences | Languages & Frameworks | Laravel Idea | Smart GoTo

YunshuaiPeng commented 1 year ago

That's weird.

Do you have all options turned on here? Preferences | Languages & Frameworks | Laravel Idea | Smart GoTo

Yes, It's always enabled.

image
withrs commented 1 year ago

I noticed that when I click $this->otherModel->some_attribute, laravel-idea takes me to the getSomeAttribute function. However, when I click $this->some_attribute, laravel-idea takes me to _ide_helper_models_fcbef240bab02b28bcdf663e7b60a935.php.

This means that clicking directly on the accessors of the current model does not work.