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

feat(generator): allow skipping uninitialized property when skipping null values #44

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

joelwurtz
Copy link
Member

@joelwurtz joelwurtz commented Mar 8, 2024

Fixes #43

Instead of getting the value we do a check on whether the value is null or undefined, this allow skipping mapping uninitialized property also.

Without this change it php would throw an error as we try to get a uninitialized property value

@joelwurtz joelwurtz force-pushed the feat/allow-to-skip-uninit-props branch from 3629c12 to 53fc76f Compare March 8, 2024 14:14
@joelwurtz joelwurtz force-pushed the feat/allow-to-skip-uninit-props branch from 53fc76f to 94cf750 Compare March 8, 2024 14:15
Copy link
Member

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Collaborator

@nikophil nikophil left a comment

Choose a reason for hiding this comment

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

LGTM 👍

src/Extractor/ReadAccessor.php Show resolved Hide resolved
src/Generator/PropertyConditionsGenerator.php Show resolved Hide resolved
@joelwurtz joelwurtz merged commit 166385c into main Mar 11, 2024
10 checks passed
@joelwurtz joelwurtz deleted the feat/allow-to-skip-uninit-props branch March 11, 2024 08:09
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.

Handle non-initialized properties
3 participants