Merged
Conversation
Contributor
There was a problem hiding this comment.
3 issues found across 11 files
Prompt for AI agents (all 3 issues)
Understand the root cause of the following 3 issues and fix them.
<file name="src/Template.php">
<violation number="1" location="src/Template.php:13">
`$published_at` can be null for draft templates, so this docblock should allow null to keep type information accurate for consumers.</violation>
</file>
<file name="tests/Fixtures/Template.php">
<violation number="1" location="tests/Fixtures/Template.php:21">
The first list entry uses the variable ID instead of the template ID, so the fixture data is inconsistent with template() and can break tests or clients relying on matching IDs.</violation>
</file>
<file name="tests/Transporters/HttpTransporter.php">
<violation number="1" location="tests/Transporters/HttpTransporter.php:215">
The UnserializableResponse thrown for an empty JSON body uses the message 'Empty response body', but this assertion expects 'Empty', so the test will always fail. Update the expected message to match the actual exception text.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| 'text' => 'Hello, world!', | ||
| 'variables' => [ | ||
| [ | ||
| 'id' => 'e169aa45-1ecf-4183-9955-b1499d5701d3', |
Contributor
There was a problem hiding this comment.
The first list entry uses the variable ID instead of the template ID, so the fixture data is inconsistent with template() and can break tests or clients relying on matching IDs.
Prompt for AI agents
Address the following comment on tests/Fixtures/Template.php at line 21:
<comment>The first list entry uses the variable ID instead of the template ID, so the fixture data is inconsistent with template() and can break tests or clients relying on matching IDs.</comment>
<file context>
@@ -0,0 +1,58 @@
+ 'text' => 'Hello, world!',
+ 'variables' => [
+ [
+ 'id' => 'e169aa45-1ecf-4183-9955-b1499d5701d3',
+ 'key' => 'user_name',
+ 'type' => 'string',
</file context>
CarolinaMoraes
approved these changes
Oct 28, 2025
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
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
templatesAPI.Summary by cubic
Add full support for the Templates API, including CRUD, publish, and duplicate operations. Also adds stricter ID validation for single-resource requests.
New Features
Bug Fixes
Written for commit 04a3612. Summary will update automatically on new commits.