Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Azure Documentdb Php Sdk Laravel Package

dreamfactory/azure-documentdb-php-sdk

PHP SDK for Azure DocumentDB (Cosmos DB) from DreamFactory. Provides a client for working with databases, collections, and documents via the DocumentDB REST API, including CRUD and query operations. Small, low-adoption package; check maintenance status before production use.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit This is a thin, framework-agnostic PHP client for what is now the Azure Cosmos DB SQL (formerly DocumentDB) REST API, published by DreamFactory for use inside their platform. It is an ingredient, not a Laravel integration: no ServiceProvider, no facade, no publishable config, no queue/event/console awareness. In a Laravel codebase the glue is entirely ours — a config file, a container binding, retry middleware, and a repository abstraction. That is not disqualifying (many good SDKs look like this), but it means the "package" delivers a transport, not an integration, and we should budget accordingly.

Integration feasibility Composer-installable and presumably PSR-4 with Guzzle underneath. The practical gate is constraint compatibility: a package with zero stars and zero dependents, born in the DreamFactory platform era, is likely pinned to older Guzzle/PHP ranges that conflict with Laravel 10/11 on PHP 8.1+. Verify installability in a throwaway branch before any design work — a composer require failure is the cheapest possible kill signal. Auth is master-key HMAC over REST, which is well-understood and does not require a bespoke security review.

Technical risk The risk is supply chain, not functionality. Zero stars and zero dependents means no external bug reports, no CVE triage, no third-party patches, and no signal that anyone has run this against a current Cosmos account. The 0.16 score reflects that accurately. Apache-2.0 at least permits a fork, which is the real mitigation. The functional surface (CRUD + query over HTTPS) is small enough that reimplementation is a realistic fallback rather than a rewrite.

Key questions

  • Which Cosmos DB REST API version does it target, and is that version still served by our provisioned account?
  • Does it install cleanly against our Laravel/PHP/Guzzle matrix without constraint aliasing?
  • Does it expose partition key headers (x-ms-documentdb-partitionkey) and cross-partition query flags? Missing partition key support is a correctness defect, not a performance one.
  • Does it surface x-ms-request-charge and honor x-ms-retry-after-ms on 429s? If not, we own throttling logic.
  • Does it handle query continuation tokens, or will large result sets silently truncate?
  • Is microsoft/azure-cosmos-php or a direct REST call via Laravel's HTTP client a better-supported substitute?
  • If we adopt it, who owns the fork when it breaks?

Integration Approach

Stack fit Treat the SDK as an implementation detail behind our own interface (e.g., DocumentClient / CosmosRepository). Bind it in our service provider, not the vendor's. Configuration lives in config/cosmos.php, hydrated from environment or Key Vault, with the connection string never in source. This keeps the vendor package swappable and is the single most important design decision here.

Migration path Sequence it as a spike, not an architecture commitment. (1) Branch spike: install, authenticate, and complete one create/read/query/delete round trip against a dev Cosmos account. (2) Wrap behind the abstraction. (3) If the spike fails on constraints, partition keys, or API version, fall back to Laravel's Http client against the Cosmos REST API — the surface we need is four verbs plus query — or the official Microsoft SDK. The abstraction is what makes that fallback a day of work instead of a sprint.

Compatibility Confirm we are on the SQL API (not Mongo, Cassandra, or Gremlin — the client is SQL-only). Validate PHP 8.x, Guzzle major version, consistency level, and partition key strategy against the account we are actually provisioned on. Pin the dependency explicitly; do not allow loose ranges on a package nobody is patching.

Sequencing Spike → abstraction layer → key management and rotation → retry/throttling middleware → observability (RU charge and latency metrics) → production cutover. Critically, do not let the SDK evaluation gate the data modeling work. Partition key design is the long-lead item and is SDK-independent.

Operational Impact

Maintenance We inherit it. Assume no upstream commits. Either vendor the fork into our namespace or pin-and-freeze with a scheduled quarterly review. Apache-2.0 makes forking legally trivial; the cost is engineering time, not licensing.

Support No support path unless we are a DreamFactory customer, and even then it would be platform-scoped. Internal on-call owns Cosmos failures end to end, including failures originating inside this client.

Scaling HTTP-based, so no connection pool concerns — the scaling story is request units and partition distribution. Implement 429 retry with jittered exponential backoff ourselves unless the SDK demonstrably does it. Watch for hot partitions and cross-partition fan-out on queries; both will show up as latency and RU spikes before they show up as errors.

Failure modes Throttling surfaced as generic exceptions; auth failures on key rotation with no graceful reload; silent API version drift after an Azure-side change; truncated query results when continuation tokens are ignored; untyped vendor exceptions bypassing Laravel's exception handler and skipping our alerting. Each needs an explicit guard in the wrapper.

Ramp-up Low for the SDK itself — it is a thin HTTP wrapper and any mid-level PHP engineer can read it in an hour. High for the domain: partition key selection, RU budgeting, and consistency levels. Staff the latter, not the former.

Bottom line: adopt only behind an internal abstraction, with a same-week fallback spike against the REST API or the official Microsoft SDK, and with an explicit owner for the fork. If the Composer constraints fail on day one, walk away — the cost of reimplementation is lower than the cost of carrying an unmaintained dependency.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin