laravel-idea / plugin

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

[Bug]: can't deduct vue components and gives warning #491

Open amshehzad opened 2 years ago

amshehzad commented 2 years ago

Bug description

image I'm using a vue component inside the blade see warnings on attribute

Plugin version

4.4.6.213

Operating system

Windows

Steps to reproduce

No response

Relevant log output

No response

adelf commented 2 years ago

You can choose how PhpStorm will interpret these :attributes: as Vue component parameters or Blade component parameters: Preferences | Languages & Frameworks | Laravel Idea | Blade | HTML :attributes owner

amshehzad commented 2 years ago

Isn't all blade components starts starts with "x-" ? In the current project, I'm using only this 1 vue component so of course I can't change the settings to interpret the :attributes as Vue components parameter, so I think there should be some other work around like for example may be we can "mark" a component as a vue component may be ?

adelf commented 2 years ago

Sorry, but the Vue plugin allows only to filter a whole file. Not specific tags.

amshehzad commented 2 years ago

Perhaps, we can go the other way around and mark only those tags which are starting with "x-" as Laravel components ?

adelf commented 2 years ago

That's strange actually. Because it shouldn't inject PHP code to these tags... Do you have the blade-x package installed? image

amshehzad commented 2 years ago

You mean Blade? yes that's installed. (couldn't find blade-x)

adelf commented 2 years ago

Could you say what is the file name? And what errors are there?

amshehzad commented 2 years ago

Yes I'm in the blade file and here is what the warning says: :media attribute image

image

image

image

I'm using this package (file-uploader)

amshehzad commented 2 years ago

I used this component in a previous project and it didn't complained there . Laravel version there is 8.1

image