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

fix: do not throw deprecated warning on field getters for default values #17788

Closed

Conversation

bshaffer
Copy link
Contributor

fixes #13428

Wraps deprecated field getters in a conditional to see if the value has been set before throwing the warning. This is because this method is used internally, so users can get deprecated warnings even when they are not using the field.

@bshaffer bshaffer requested a review from a team as a code owner August 12, 2024 18:37
@bshaffer bshaffer requested review from anandolee and removed request for a team August 12, 2024 18:37
@bshaffer bshaffer added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 12, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 12, 2024
@bshaffer bshaffer requested a review from googleberg August 12, 2024 18:38
@bshaffer bshaffer added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 12, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 12, 2024
Copy link
Contributor Author

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

there's enough complexity around getting the field to even check if it's default... for instance, $this->readOneof should be called instead of the property name for "OneOf fields", and $this->readWrapperValue should be called for "wrapped" fields

@bshaffer bshaffer added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 13, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 13, 2024
@bshaffer bshaffer added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 13, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 13, 2024
@bshaffer bshaffer added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 20, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 20, 2024
@bshaffer bshaffer added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 20, 2024
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Aug 20, 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.

PHP: Deprecation message for "return_immediately" is thrown which is impossible to fix
2 participants