googleapis / googleapis/gapic-generator-php

Snippet Gen: Prevent namespace collisions with Google\Rpc\Status

Open
#538 0 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: feature request
Dominant language
PHP
Stars
14
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I have yet to find any cases where this happens, but it would be good to safeguard against.

LRO based samples import `Google\Rpc\Status` and reference it by relative name of `Status`. It is possible for this relative name to conflict with an import for a generated proto class, (ex. `Google\Cloud\Service\Status`). Options to address this can be to use an alias or the FQNS for samples where a conflict may arise.

Reference: https://github.com/googleapis/gapic-generator-php/blob/main/tests/Unit/ProtoTests/BasicLro/out/samples/BasicLroClient/method1.php#L59

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.