Skip to content

feat(internal/librarian/php): implement add command support#6974

Merged
zhumin8 merged 1 commit into
googleapis:mainfrom
zhumin8:php-add-1
Jul 22, 2026
Merged

feat(internal/librarian/php): implement add command support#6974
zhumin8 merged 1 commit into
googleapis:mainfrom
zhumin8:php-add-1

Conversation

@zhumin8

@zhumin8 zhumin8 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Initial support PHP for librarian add command. The default library name (component name) is derived from the API path by stripping known prefixes and version suffixes, and converting the remaining path to CamelCase (e.g., google/cloud/security/privateca/v1 becomes SecurityPrivateca).
PHP-specific default configurations like staging_subdir and migration_mode are automatically populated.

We are aware that this naive deriving logic is problematic for PHP. This provides a base skeleton to evolve on according to decision in #6972 (comment).

For #6972

@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 PHP support to the librarian tool, including logic for deriving default library names and populating PHP-specific configurations. It also adds corresponding unit tests. Feedback on the changes suggests adding a defensive nil check for the lib parameter in the Add function to prevent potential nil pointer dereferences.

Comment thread internal/librarian/php/add.go
@zhumin8
zhumin8 marked this pull request as ready for review July 22, 2026 19:09
@zhumin8
zhumin8 requested a review from a team as a code owner July 22, 2026 19:09
@zhumin8
zhumin8 requested review from JoeWang1127 and sofisl July 22, 2026 19:09
@zhumin8
zhumin8 merged commit df5ce1e into googleapis:main Jul 22, 2026
34 of 36 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