Skip to content

refactor(internal/librarian/php): add protoc.RunOrSystem helper and use it in generator - #6719

Merged
zhumin8 merged 1 commit into
googleapis:mainfrom
zhumin8:php-protoc-run
Jul 9, 2026
Merged

refactor(internal/librarian/php): add protoc.RunOrSystem helper and use it in generator#6719
zhumin8 merged 1 commit into
googleapis:mainfrom
zhumin8:php-protoc-run

Conversation

@zhumin8

@zhumin8 zhumin8 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Use protoc.Run in php generate.
Followup to #6703.

For #6629

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new helper function RunOrSystem in the protoc package to execute either a configured protoc tool or fall back to the system's protoc. This helper is integrated into both the Java and PHP generation packages, simplifying the code and removing manual fallback logic. The feedback suggests simplifying a redundant nil check in internal/librarian/php/generate.go since protoc.RunOrSystem already handles nil pointers gracefully.

Comment thread internal/librarian/php/generate.go
@zhumin8
zhumin8 marked this pull request as ready for review July 9, 2026 15:56
@zhumin8
zhumin8 requested a review from a team as a code owner July 9, 2026 15:56
@zhumin8
zhumin8 requested a review from JoeWang1127 July 9, 2026 15:56
@zhumin8
zhumin8 merged commit 39ea6e6 into googleapis:main Jul 9, 2026
32 of 34 checks passed
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.

2 participants