Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support named parameter 'type' in the Cast attribute. #87

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

mickverm
Copy link
Contributor

When using #[Cast(type: 'int')] for example, I always ran into the following exception:

Undefined array key 0
vendor\wendelladriel\laravel-lift\src\Concerns\CastValues.php :106

Copy link
Owner

@WendellAdriel WendellAdriel left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Can you update one or two datasets to not use the named parameter just so we can have use cases validated against using and not using the named parameter, please?

@mickverm
Copy link
Contributor Author

mickverm commented Sep 12, 2024

Changed, I was maybe a bit too eager in adding type:. 😛

Copy link
Owner

@WendellAdriel WendellAdriel left a comment

Choose a reason for hiding this comment

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

I know it's not related to the files you worked on, but can you run the linter to fix the issues with the code style, please? I think that's because of a new rule on a newer version from Pint 😅

@mickverm
Copy link
Contributor Author

Pint errors are fixed, now PHPStan is complaining 😅

@WendellAdriel
Copy link
Owner

Pint errors are fixed, now PHPStan is complaining 😅

😅 😅 😅
Can you help me with that as well, please?

@mickverm
Copy link
Contributor Author

Fixed PHPStan errors as well!

@mickverm
Copy link
Contributor Author

The tests were also failing for me locally, but never via Github actions, until now...
The failing tests are not related to this MR, since I can reproduce them locally on the main branch as well.

@WendellAdriel
Copy link
Owner

The tests were also failing for me locally, but never via Github actions, until now... The failing tests are not related to this MR, since I can reproduce them locally on the main branch as well.

Thanks for taking a look at it.
Weird that the tests were not failing before 😓

I'll see if I have some time next week to check on the tests

@mickverm
Copy link
Contributor Author

mickverm commented Sep 13, 2024

I fixed the tests by removing RefreshDatabase::class, I also had to make a small change to make toBeFileWithContent() pass on Windows.

Copy link
Owner

@WendellAdriel WendellAdriel left a comment

Choose a reason for hiding this comment

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

Thanks a lot for all the effort in this PR! 💪

@WendellAdriel WendellAdriel merged commit 508158c into WendellAdriel:main Sep 13, 2024
5 checks passed
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.

2 participants