Skip to content

Conversation

@Hectorhammett
Copy link
Contributor

No description provided.

@Hectorhammett Hectorhammett requested a review from a team as a code owner August 26, 2024 22:07
@Hectorhammett Hectorhammett requested a review from a team August 26, 2024 22:07
Copy link
Collaborator

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

quick review!

{
// TODO(vNext): Remove the forced addition of these `use` clauses.
$this->ctx->type(Type::fromName(\Google\ApiCore\PathTemplate::class));
$this->ctx->type(Type::fromName(\Google\ApiCore\Options\ClientOptions::class));
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should probably go in private function construct(), to keep it together with the function it goes with below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can see what you mean, my thought was to match 1 to 1 how does this gets placed in the generated file. For example, due finding Google\ApiCore\PathTemplate on the generated file, I was able to determine how this gets added.

Still, I am not completely opposed to moving it to another place.

Copy link
Collaborator

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

When these changes roll out, we'll need to pin to whatever minimum version of GAX supports the new method signatures in GapicClientTrait::buildLCientOptions (in google-cloud-php)

public function __construct(array $options = [])
public function __construct(array|ClientOptions $options = [])
{
$clientOptions = $this->buildClientOptions($options);
Copy link
Collaborator

Choose a reason for hiding this comment

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

As buildClientOptions doesn't support ClientOptions, we'll need to update this in GAX (this is somewhat handled in googleapis/gax-php#580, but should probably be separated from the changes to make the properties public).

bshaffer
bshaffer previously approved these changes Sep 15, 2025
@bshaffer bshaffer merged commit 5099c41 into main Sep 15, 2025
7 checks passed
@bshaffer bshaffer deleted the add-union-type branch September 15, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants