Skip to content

refactor(tool/cmd/migrate): move hardcoded PHP starter configuration to yaml - #6826

Merged
zhumin8 merged 4 commits into
googleapis:mainfrom
zhumin8:php-migrate-refact
Jul 15, 2026
Merged

zhumin8 merged 4 commits into
googleapis:mainfrom
zhumin8:php-migrate-refact

Conversation

@zhumin8

@zhumin8 zhumin8 commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

The hardcoded PHP starter configuration values in the migration tool are moved to an embedded librarian_php.yaml file for better readability. Making it easier to update default and tool section for future migrations.

The new librarian_php.yaml file is embedded into php.go and unmarshaled at runtime to initialize the configuration. Added the synthtool section to the new librarian_php.yaml referencing internal/librarian/python/librarian.yaml.

Explanatory comments have been added to the YAML file to document its purpose and usage.

For #6773

@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 refactors the PHP migration tool to load its default configuration from an embedded YAML file (librarian_php.yaml) instead of using hardcoded Go structs. Feedback suggests modifying how cfg.Sources is populated to avoid overwriting other potential default sources defined in the YAML template.

Comment thread tool/cmd/migrate/php.go Resolved
@zhumin8
zhumin8 marked this pull request as ready for review July 15, 2026 14:50
@zhumin8
zhumin8 requested a review from a team as a code owner July 15, 2026 14:50
@zhumin8
zhumin8 requested review from JoeWang1127 and sofisl July 15, 2026 14:50
@zhumin8
zhumin8 enabled auto-merge (squash) July 15, 2026 15:01
@zhumin8
zhumin8 merged commit 20adc8b into googleapis:main Jul 15, 2026
35 of 37 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