Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHPStan Error in google/cloud-recaptcha-enterprise #8372

Open
@ykbt

Description

@ykbt

Since the package is deprecated, I was unsure which issue type would be appropriate, but I am submitting this as aBug Report because a PHPStan error occurs.

Environment details

  • OS: Debian GNU/Linux 12 (bookworm)
  • PHP version: 8.3.22
  • Package name and version:google/cloud-recaptcha-enterprise:2.1.1,google/protobuf:4.31.1

Steps to reproduce

  1. Create an instance ofRecaptchaEnterpriseServiceClient.
  2. Create aCreateAssessmentRequest object.
  3. Send the request using the client.
  4. Access theRiskAnalysis of the returnedAssessment and callgetReasons().
  5. Attempt to callgetIterator() on the result ofgetReasons().
  6. A PHPStan error occurs.

Code example

useGoogle\Cloud\RecaptchaEnterprise\V1\Assessment;useGoogle\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient;useGoogle\Cloud\RecaptchaEnterprise\V1\CreateAssessmentRequest;// Credentials are actually passed when creating the client$client =newRecaptchaEnterpriseServiceClient();// Omitted: building the Assessment instance$assessment =newAssessment();$assessmentRequest = CreateAssessmentRequest::build($parent,$assessment);$createdAssessment =$client->createAssessment($assessmentRequest);$createdAssessment->getRiskAnalysis()?->getReasons()->getIterator();// Call to an undefined method Google\Protobuf\Internal\RepeatedField::getIterator().

I’ve been following the protobuf updates and it appears this issue may be due to changes introduced here:

protocolbuffers/protobuf-php@9a6ad10#diff-f4adb7d6333d82634864e3424d178a65e8c6e413c257198fd8371622e1e0b303

I understand that this package is deprecated and things still function for now, but I wanted to report this for future compatibility and also because this causes a PHPStan error. I’d appreciate it if you could consider addressing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp