[DEPRECATED] hashed_account_id is deprecated. in VENDORPATH/google/cloud-recaptcha-enterprise/src/V1/Event.php on line 372.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start at APPPATH/Validation/Captcha.php line 80 and VENDORPATH/google/cloud-recaptcha-enterprise/src/V1/Event.php line 372, then follow the protobuf JSON parsing frames in the report. Reproduce the assessment after a clean Composer install and identify why hashed_account_id is being populated. Done means the documented assessment flow completes without this deprecation notice.
Written by the indexing model from the issue text.
Description
I am getting a deprecation error about hashed_account_id even though I just installed the latest version of google/cloud-recaptcha-enterprise through composer.
[DEPRECATED] hashed_account_id is deprecated. in VENDORPATH/google/cloud-recaptcha-enterprise/src/V1/Event.php on line 372.
1 VENDORPATH/google/cloud-recaptcha-enterprise/src/V1/Event.php(372): trigger_error('hashed_account_id is deprecated.', 16384)
2 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(1323): Google\Cloud\RecaptchaEnterprise\V1\Event->setHashedAccountId('')
3 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(1228): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl([...], true)
4 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(856): Google\Protobuf\Internal\Message->mergeFromJsonArray([...], true)
5 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(1308): Google\Protobuf\Internal\Message->convertJsonValueToProtoValue([...], Object(Google\Protobuf\Internal\FieldDescriptor), true)
6 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(1228): Google\Protobuf\Internal\Message->mergeFromArrayJsonImpl([...], true)
7 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(1347): Google\Protobuf\Internal\Message->mergeFromJsonArray([...], true)
8 VENDORPATH/google/protobuf/src/Google/Protobuf/Internal/Message.php(782): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream), true)
9 VENDORPATH/google/gax/src/Transport/RestTransport.php(145): Google\Protobuf\Internal\Message->mergeFromJsonString('{
I'm omitting this part because it contains sensitive information like keys
10 VENDORPATH/guzzlehttp/promises/src/Promise.php(209): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response))
11 VENDORPATH/guzzlehttp/promises/src/Promise.php(158): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), null)
12 VENDORPATH/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
13 VENDORPATH/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(167): GuzzleHttp\Promise\TaskQueue->run()
14 VENDORPATH/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(206): GuzzleHttp\Handler\CurlMultiHandler->tick()
15 VENDORPATH/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
16 VENDORPATH/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn()
17 VENDORPATH/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
18 VENDORPATH/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
19 VENDORPATH/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending()
20 VENDORPATH/google/cloud-recaptcha-enterprise/src/V1/Client/RecaptchaEnterpriseServiceClient.php(477): GuzzleHttp\Promise\Promise->wait()
21 APPPATH/Validation/Captcha.php(80): Google\Cloud\RecaptchaEnterprise\V1\Client\RecaptchaEnterpriseServiceClient->createAssessment(Object(Google\Cloud\RecaptchaEnterprise\V1\CreateAssessmentRequest))
24 SYSTEMPATH/Controller.php(151): CodeIgniter\Validation\Validation->run([...], null, null)
25 APPPATH/Controllers/PublicServices/MyController.php(510): CodeIgniter\Controller->validateData([...], [...])
26 SYSTEMPATH/CodeIgniter.php(933): App\Controllers\PublicServices\MyController->submitCheckout()
27 SYSTEMPATH/CodeIgniter.php(507): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\PublicServices\MyController))
28 SYSTEMPATH/CodeIgniter.php(354): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
29 SYSTEMPATH/Boot.php(363): CodeIgniter\CodeIgniter->run()
30 SYSTEMPATH/Boot.php(68): CodeIgniter\Boot::runCodeIgniter(Object(CodeIgniter\CodeIgniter))
31 FCPATH/index.php(114): CodeIgniter\Boot::bootWeb(Object(Config\Paths))
Environment details
- OS: Debian GNU/Linux 12 (bookworm)
- PHP version: 8.2.33
- Package name and version: google/cloud-recaptcha-enterprise
Steps to reproduce
- clean install of cloud-recaptcha-enterprise with
composer require google/cloud-recaptcha-enterprise - do a recaptcha assessment with php code
Code example
# example
$client = new RecaptchaEnterpriseServiceClient($clientOptions);
$formattedParent = RecaptchaEnterpriseServiceClient::projectName($config->projectId);
$userAgent = $request->getUserAgent() ? $request->getUserAgent()->getAgentString() : '';
$event = (new Event())
->setSiteKey($config->siteKey)
->setToken($value)
->setExpectedAction($expectedAction)
->setUserIpAddress($ip)
->setUserAgent($userAgent);
$assessment = (new Assessment())
->setEvent($event);
$assessmentRequest = (new CreateAssessmentRequest())
->setParent($formattedParent)
->setAssessment($assessment);
$response = $client->createAssessment($assessmentRequest);
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 464
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 103
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-cloud-php
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
googleapis/google-cloud-php#9730 ·
-
type: feature request
Difficulty 1/5 Under an hour Newbie friendliness 75/100
googleapis/google-cloud-php#9716 · 11 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
googleapis/google-cloud-php#9725 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
googleapis/google-cloud-php#9675 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
googleapis/google-cloud-php#9674 · 1 comment ·
All issues in googleapis/google-cloud-php
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
HttpClient
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
symfony/symfony-docs#23092 ·
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 95/100