Skip to content

Conversation

@robchett
Copy link
Contributor

This adds support for checking the data passed into the components so phpstan can analyze the attributes.
This fixes previously undetected issues like:

 <x-some-component :undefinedVar :b="$undefinedVar" c="{{ $undefinedVar }}"></x-some-component>

It does NOT verify any of the attributes match the requirement of the component

Regexes and surrounding code for parsing the tags has been taken from the Blade & Livewire projects.

Copy link
Collaborator

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work, this is a big step for the tool 👍

Any chance you could add a test for some of this?

@robchett
Copy link
Contributor Author

Sure can, tests now added.

@robchett
Copy link
Contributor Author

Fixed the CI issues.

@TomasVotruba
Copy link
Contributor

Thank you 👏

@TomasVotruba TomasVotruba merged commit 391055f into bladestan:main Apr 29, 2024
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.

3 participants