Skip to content

fix: rebase PR #104 - Taqnyat SMS adapter - #139

Closed
deepshekhardas wants to merge 1 commit into
utopia-php:mainfrom
deepshekhardas:fix/pr-104-rebase
Closed

fix: rebase PR #104 - Taqnyat SMS adapter#139
deepshekhardas wants to merge 1 commit into
utopia-php:mainfrom
deepshekhardas:fix/pr-104-rebase

Conversation

@deepshekhardas

Copy link
Copy Markdown

Replacement for #104. Original by @ali-alharthi.

Rebased on latest main. Fixed:

  • Added parent::__construct() call
  • Made properties private readonly
  • Aligned with v2.0.0 conventions

Original by @ali-alharthi.

Fixed:
- Added parent::__construct() call
- Made properties private readonly
- Aligned with v2.0.0 conventions
@github-actions

Copy link
Copy Markdown

Thanks for contributing! This repository is a read-only mirror; development for this library happens in packages/messaging in the utopia-php monorepo. Please open this pull request there instead.

@github-actions github-actions Bot closed this Jul 23, 2026
@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown

Greptile Summary

Adds a Taqnyat SMS provider adapter and a live-credential integration test.

  • Sends JSON batches of up to 1,000 recipients through Taqnyat's messages endpoint.
  • Converts provider HTTP results into the standard messaging response structure.
  • Adds an environment-gated test for sending through the provider.

Confidence Score: 4/5

The PR appears safe to merge, with the non-blocking concern that normal CI does not exercise the new adapter.

The adapter follows existing loading, request serialization, and response conventions, but its only test is skipped whenever live Taqnyat credentials are unavailable.

tests/Messaging/Adapter/SMS/TaqnyatTest.php

Important Files Changed

Filename Overview
src/Utopia/Messaging/Adapter/SMS/Taqnyat.php Adds the Taqnyat adapter with conventional initialization, batching, JSON request construction, and response mapping.
tests/Messaging/Adapter/SMS/TaqnyatTest.php Adds a live integration test, but its credential-dependent skip leaves the adapter without deterministic CI coverage.

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
tests/Messaging/Adapter/SMS/TaqnyatTest.php:16-18
**Live credentials leave adapter untested**

The sole Taqnyat test skips when live credentials are unavailable, so normal CI never exercises recipient normalization, JSON payload construction, or success and error response handling. Add deterministic client-backed tests for these paths so adapter regressions are detected without contacting the provider.

Reviews (1): Last reviewed commit: "fix: rebase PR #104 - Taqnyat SMS adapte..." | Re-trigger Greptile

Comment on lines +16 to +18

if (!$apiKey || !$senderId || !$to) {
$this->markTestSkipped('TAQNYAT credentials not configured');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Live credentials leave adapter untested

The sole Taqnyat test skips when live credentials are unavailable, so normal CI never exercises recipient normalization, JSON payload construction, or success and error response handling. Add deterministic client-backed tests for these paths so adapter regressions are detected without contacting the provider.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/Messaging/Adapter/SMS/TaqnyatTest.php
Line: 16-18

Comment:
**Live credentials leave adapter untested**

The sole Taqnyat test skips when live credentials are unavailable, so normal CI never exercises recipient normalization, JSON payload construction, or success and error response handling. Add deterministic client-backed tests for these paths so adapter regressions are detected without contacting the provider.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

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

Successfully merging this pull request may close these issues.

1 participant