Skip to content

Comments

[php][ext] Support NULL values conversion#21239

Open
FabioBatSilva wants to merge 1 commit intoprotocolbuffers:mainfrom
ChessCom:php-ext-convert
Open

[php][ext] Support NULL values conversion#21239
FabioBatSilva wants to merge 1 commit intoprotocolbuffers:mainfrom
ChessCom:php-ext-convert

Conversation

@FabioBatSilva
Copy link
Contributor

  • Handle NULL values in the PHP extension's conversion functions.
  • Tests that verify the behavior of converting supported types.

Should fix : #20000

* Handle NULL values in the PHP extension's conversion functions.
* Tests that verify the behavior of converting supported types.

Should fix : protocolbuffers#20000
@FabioBatSilva FabioBatSilva requested a review from a team as a code owner April 11, 2025 15:41
@FabioBatSilva FabioBatSilva requested review from bshaffer and removed request for a team April 11, 2025 15:41
@zhangskz zhangskz added php 🅰️ safe for tests Mark a commit as safe to run presubmits over labels Apr 18, 2025
@github-actions github-actions bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Apr 18, 2025
@haberman
Copy link
Member

I just left a comment on #20000, I think we generally don't want to support $msg->setFoo(null).

@github-actions
Copy link

github-actions bot commented Sep 5, 2025

We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.

This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Sep 5, 2025
@FabioBatSilva
Copy link
Contributor Author

FabioBatSilva commented Sep 8, 2025

Please don't dismiss it.
PR is still relevant, waiting for the maintainers.

@FabioBatSilva
Copy link
Contributor Author

I just left a comment on #20000, I think we generally don't want to support $msg->setFoo(null).

#20649 (comment)

@github-actions github-actions bot added untriaged auto added to all issues by default when created. and removed inactive Denotes the issue/PR has not seen activity in the last 90 days. labels Sep 9, 2025
@googleberg googleberg removed the untriaged auto added to all issues by default when created. label Oct 3, 2025
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.

This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.

@github-actions github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Jan 2, 2026
@FabioBatSilva
Copy link
Contributor Author

PR is still relevant, waiting for the maintainers. 😞

@github-actions github-actions bot added untriaged auto added to all issues by default when created. and removed inactive Denotes the issue/PR has not seen activity in the last 90 days. labels Jan 3, 2026
@JasonLunn JasonLunn added blocked and removed untriaged auto added to all issues by default when created. labels Feb 23, 2026
@JasonLunn
Copy link
Contributor

Marking this issue blocked rather than untriaged since the discussion in #20000 seems to be centered around introducing an (as of yet unimplemented) breaking change in the 2027 release

@JasonLunn JasonLunn added the keep open keep inactive issues open for janitor label Feb 23, 2026
@bshaffer
Copy link
Contributor

@JasonLunn I believe this can be closed. From the linked issue:

if we instead add the first-class type on it public function setMyField(string $var) the behavior is that it will coerce to string before our logic runs. Our minimum PHP version support is high enough now that it looks like we should be able to do it.

I've added types to setters in #25296, so the discussed solution has been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked keep open keep inactive issues open for janitor php

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP Extension - Cannot convert optional to string

6 participants