Merged
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 10 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="src/Webhook.php">
<violation number="1" location="src/Webhook.php:8">
The PHPDoc on $created_at still describes an email instead of the webhook, which makes the new resource documentation misleading. Please update it to describe the webhook timestamp.</violation>
</file>
<file name="src/Service/Webhook.php">
<violation number="1" location="src/Service/Webhook.php:88">
Passing null tolerance into WebhookSignature::verify triggers a TypeError, breaking webhook verification.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| */ | ||
| public function verify(string $payload, array $headers, string $secret, ?int $tolerance = null): bool | ||
| { | ||
| return WebhookSignature::verify($payload, $headers, $secret, $tolerance); |
Contributor
There was a problem hiding this comment.
Passing null tolerance into WebhookSignature::verify triggers a TypeError, breaking webhook verification.
Prompt for AI agents
Address the following comment on src/Service/Webhook.php at line 88:
<comment>Passing null tolerance into WebhookSignature::verify triggers a TypeError, breaking webhook verification.</comment>
<file context>
@@ -0,0 +1,90 @@
+ */
+ public function verify(string $payload, array $headers, string $secret, ?int $tolerance = null): bool
+ {
+ return WebhookSignature::verify($payload, $headers, $secret, $tolerance);
+ }
+}
</file context>
Suggested change
| return WebhookSignature::verify($payload, $headers, $secret, $tolerance); | |
| return WebhookSignature::verify($payload, $headers, $secret, $tolerance ?? 300); |
Collaborator
Author
There was a problem hiding this comment.
I have updated the default value from null to 300.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
jayanratna
commented
Oct 28, 2025
lucasfcosta
approved these changes
Oct 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the
webhooksAPI and also adds averifyhelper method to thewebhooksservice.Summary by cubic
Adds full Webhooks API support with CRUD endpoints and request verification, so you can manage webhooks and securely handle incoming events. Bumps SDK version to 0.23.0.