Skip to content

[Bug]: Same model names with different namespaces causes wrong go to declarations #1288

@oralunal

Description

@oralunal

Bug description

I use Laravel default User model and i created a model Tracker/Instagram/User. Their namespaces are different. And i created same Policies based on same folder structure:

  • Policies/UserPolicy
  • Policies/Tracker/Instagram/UserPolicy

Then I use Policies/Tracker/Instagram/UserPolicy with view permission in a formrequest. But when I click on the "view", it goes to "Policies/UserPolicy" instead of "Policies/Tracker/Instagram/UserPolicy"

Image Image Image Image Image

Plugin version

11.4.1.252

Operating system

None

Steps to reproduce

php artisan make:model Tracker/Instagram/User
php artisan make:policy UserPolicy
php artisan make:policy Tracker/Instagram/UserPolicy

Manually register them with UsePolicy attribute inside the model.

Relevant log output

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions