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

Allow to fetch union data properties in unified way #403

Merged
merged 2 commits into from
Apr 7, 2023

Conversation

Jampire
Copy link
Contributor

@Jampire Jampire commented Apr 3, 2023

This PR came from the discussion #379 . It allows to fetch lazy and non-lazy properties in the same way (regardless the fact how DTO was created - lazy or not).

it('can fetch lazy union data', function () {
$data = UnionData::from(1);

expect($data->id)
Copy link
Member

Choose a reason for hiding this comment

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

I would make separate expectations. Imho the and makes it less readable to see what is actually being tested.

@rubenvanassche
Copy link
Member

Looking good, ping me if you have updated the tests like Freek asked and then I'll tag a new release

@Jampire
Copy link
Contributor Author

Jampire commented Apr 7, 2023

Looking good, ping me if you have updated the tests like Freek asked and then I'll tag a new release

@rubenvanassche , it's updated.

@rubenvanassche
Copy link
Member

Thanks!

@rubenvanassche rubenvanassche merged commit 557d4bf into spatie:main Apr 7, 2023
@francoism90
Copy link
Contributor

#354

Hmm, I hope this fixes this on Livewire as well. :)

@Jampire Jampire deleted the resolve_lazy_properties branch April 7, 2023 10:13
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.

4 participants