You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(internal/tool/composer): use entrypoint configuration instead of package names (#7156)
This change replaces the hardcoded `gapic-generator-php` package name
checks in composer tool installation with a declarative `entrypoint`
configuration field. If a tool defines an `entrypoint` (e.g.
`src/Main.php`), a bash wrapper script is generated for it in the bin
directory. If the `entrypoint` is omitted, no wrapper is generated.
This refactoring prepares the composer installation logic to generically
support PHP tools that require different entrypoints, or tools that act
strictly as dependencies and do not require executable wrappers.
### Merge Order & PR Relationship
This PR is the foundational step of a three-part refactoring effort and
should be merged **first**:
1. **Merge this PR first:** It introduces the generic `Entrypoint` logic
and removes the hardcoded checks that previously blocked non-generator
tools from being installed.
2. **Merge PR #7122 second:** With this PR merged, PR #7122 can cleanly
install `google-cloud-php/dev`. Because `google-cloud-php/dev` will not
specify an `entrypoint`, Librarian will safely run `composer install` on
it without attempting (and failing) to generate an executable wrapper
for it.
3. **Merge PR #7141 third:** Now that wrapper generation is decoupled
from the `gapic-generator-php` package name, PR #7141 can safely remove
the hardcoded `--side_loaded_root_dir` flag from the wrapper script
template. This will make the PHP wrapper logic fully generic and
reusable for any future tool.
0 commit comments