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

Handle optional fields correctly in Message_get method #18982

Closed
wants to merge 4 commits into from

Conversation

s2x
Copy link
Contributor

@s2x s2x commented Oct 24, 2024

Refactor the Message_get method to accurately handle optional fields with presence checks by returning NULL if the field is not set. Also, add new unit tests in WellKnownTest.php to ensure correct behavior of reflection properties for optional fields with various data types.

should fix #18966

Refactor the Message_get method to accurately handle optional fields with presence checks by returning NULL if the field is not set. Also, add new unit tests in WellKnownTest.php to ensure correct behavior of reflection properties for optional fields with various data types.
@s2x s2x requested a review from a team as a code owner October 24, 2024 09:27
@s2x s2x requested review from bshaffer and removed request for a team October 24, 2024 09:27
s2x and others added 2 commits October 25, 2024 09:08
Replaced preg_replace_callback with implode and array_map using ucwords to simplify and improve readability of the property to function name conversion. This change ensures more consistent behavior and makes the code shorter and more maintainable.
@acozzette acozzette added php 🅰️ safe for tests Mark a commit as safe to run presubmits over and removed wait for user action 🅰️ safe for tests Mark a commit as safe to run presubmits over labels Nov 26, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Nov 26, 2024
@acozzette acozzette added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Nov 26, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Nov 26, 2024
@copybara-service copybara-service bot closed this in f1aa92a Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP - Different class property values ​​with and without php extension
4 participants