plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[Bug]: Doesn't work when Model is named "_Class"

Open robertmylne opened this issue 1 year ago • 1 comments

Bug description

We have a model named "_Class". However, it doesn't seem to parse it and essentially that model is just ignored. Running "generate helper code" ignores it essentially.

Plugin version

8.4.0.241

Operating system

Windows

Steps to reproduce

Create a model named "_Class" then try and generate helper code. It works for all other models.

class _Class extends Model
{
    protected $table = 'classes';
}

image

Relevant log output

No response

robertmylne avatar Oct 22 '24 01:10 robertmylne

Yes, Laravel Idea considers all files with the "_" prefix as internal or helper classes. Maybe better "ClassModel"?

adelf avatar Oct 22 '24 04:10 adelf

I'm sorry, but I won't be able to support files with "_." It's important for performance and to avoid including test stubs in the helper code, and your case is super rare.

adelf avatar Oct 31 '24 09:10 adelf