Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPRECATED warnings when calling getName() on a Secret or SecretVersion #7575

Open
smoopins opened this issue Aug 2, 2024 · 2 comments
Open
Assignees

Comments

@smoopins
Copy link

smoopins commented Aug 2, 2024

Environment details

  • OS: MacOS Sonoma 14.5 (M1 series)
  • PHP version: 8.2.21
  • Package name and version: cloud-secret-manager: v1.15.2

Steps to reproduce

Call the getName() method of either a Secret or a SecretVersion.

Code example

        $projectId = 'beetlejuice-example';
        $client = new SecretManagerServiceClient();
        $parent = $client->projectName($projectId);

        $secretId = 'harry-belafonte-example';
        $createSecretRequest = (new CreateSecretRequest())
            ->setParent($parent)
            ->setSecretId($secretId)
            ->setSecret(new Secret([
                'replication' => new Replication([
                    'automatic' => new Automatic(),
                ]),
            ]));

        $secret = $this->client->createSecret($createSecretRequest);
        echo $secret->getName();

The above code outputs many copies of the following pair of deprecation warnings:

   DEPRECATED  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php on line 1890.


   DEPRECATED  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in vendor/google/protobuf/src/Google/Protobuf/Internal/GPBJsonWire.php on line 23.
@bshaffer
Copy link
Contributor

bshaffer commented Aug 8, 2024

I believe this is the same issue as we've documented in protocolbuffers/protobuf#13428

I will try to fix this shortly

@bshaffer bshaffer self-assigned this Aug 8, 2024
@bshaffer
Copy link
Contributor

This has been fixed in the main branch of protobuf, and will be fixed in the next protobuf release (protocolbuffers/protobuf@6d84da5)

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

No branches or pull requests

2 participants