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

Client Laravel Package

bitbucket/client

A PHP client for the Bitbucket REST API, giving Laravel and plain PHP apps programmatic access to repositories, pull requests, webhooks, users, and teams. Supports OAuth and access-token authentication over PSR-18 HTTP clients.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

bitbucket/client remains a framework-agnostic PHP SDK over the Bitbucket Cloud REST API 2.0, distributed as a Composer package with no Laravel service provider, facade, or config publishing. That is still a feature: it slots into a Laravel codebase as an infrastructure adapter behind a domain-level interface (e.g. BitbucketRepositoryGateway), confining the vendor surface to one or two classes. 5.1.0 widens the native surface in exactly the areas we previously expected to hand-roll HTTP for — project permissions config, repository permissions config, effective branching model, repository pipelines config subresources, and workspace pull requests for selected users — so more of the wrapper can delegate to the SDK rather than reach for Guzzle directly. The same release deprecates a cluster of pass-through methods (top-level pull requests, repository listing, current-user workspaces pass-through, current-user team permissions), which reinforces the intended design: bind workspaces and repositories explicitly and call scoped endpoints, not top-level conveniences. Do not call the SDK from controllers or queued jobs; bind a singleton, feed credentials from config/services.php, and expose intention-revealing methods.

Integration feasibility

Still low effort, and marginally lower than before: composer require, auth, first request is an afternoon, and 5.1.0 removes some of the custom endpoint work (permissions, branching model, pipelines config) that the previous estimate assumed we would write ourselves. The real effort is unchanged — choosing the auth model (OAuth 2.0 vs. app passwords vs. repository access tokens) and building the wrapper, retry policy, and pagination handling. One new, cheap task belongs in the estimate: a deprecation audit of 5.1.0 against our intended scope, so we never write new code against a method already marked for removal.

Technical risk

Maturity risk improves but does not disappear. A minor release that adds PHP 8.5 support, fixes pagination, and annotates sensitive parameters for redaction signals an active maintainer with security awareness — that is real evidence of health, not just a recent commit date. The community is still small (~103 stars, negligible dependent count), support is community-only, and the fork-and-own contingency stays on the books as an accepted, documented risk — tolerable at MIT license and this code size.

Two risks move. Pagination risk drops: ResultPager fixes for partial response fields and previous-page navigation address two of the exact defects flagged previously. Deprecation risk rises and becomes the dominant near-term item: deprecating native issue tracker methods, snippets listing/watchers, addon linker methods, and several pass-throughs is the standard pre-major signal, so a 6.0 that removes them should be assumed. That is manageable only if we audit our scope now and avoid deprecated calls from day one.

Residual risks unchanged: endpoint coverage gaps (Code Insights, some workspace-level endpoints — verify against this release), 429/Retry-After semantics left to the caller, and webhook signature verification that remains our responsibility. Note also that some deprecations (issues, snippets) reflect Atlassian withdrawing the underlying API, so the surface can erode from the platform side as well as the SDK side.

Key questions

  • Does our intended scope touch any method deprecated in 5.1.0 — native issues, snippets, addon linker, top-level PR/repository pass-throughs, workspace code search? If yes, redesign now rather than at 6.0.
  • Are we tracking Bitbucket's own deprecation of the issue tracker, and what replaces issues in our workflows — Jira linkage, or drop the feature?
  • What is our PHP 8.5 timeline, and does our Laravel version support it, or is 8.5 support merely future-proofing?
  • Does the sensitive-parameter annotation actually cover our logging path — i.e. does our logger/handler redact on the annotation, or is redaction still ours to implement?
  • Do we rely on the ResultPager behaviours that were fixed? Any paging code using partial response fields should be re-tested, since a bug fix can change observed page contents.
  • Does the pinned minor still cover Pipelines, webhooks, PR merge/decline, branch permissions, and workspace membership, and what is the maintainer's tagged release cadence?
  • Guzzle direct vs. PSR-18/PSR-7 — can we still inject retry and cache middleware?
  • Bitbucket Cloud's current rate-limit and deprecation posture for the endpoints we depend on.

Integration Approach

Stack fit

Compatible with Laravel 9+ on PHP 8.1 through 8.5 with Guzzle 7 (confirm the exact constraints in composer.json before pinning; 8.5 support does not imply every Laravel line runs on 8.5). It coexists fine with Laravel's HTTP client — keep them separate so the SDK boundary stays legible. Register one singleton binding, one config block, one interface. Mock the interface you wrote, not the SDK; use Http::fake() only for code that goes through Laravel's client.

Migration path

Entry points are unchanged — greenfield, replacement of raw Guzzle/cURL calls, or replacement of gentle/bitbucket-api (near drop-in on method names, expect namespace and auth-construction differences) — but 5.1.0 adds a deprecation-driven path that should be the default for new work: call workspace- and repository-scoped endpoints rather than the newly deprecated top-level pass-throughs, use the new permissions and branching-model resources instead of bespoke HTTP, and avoid native issue tracker and snippet methods entirely. The release also ships documented Bitbucket API migration paths; read them before mapping our scope, since they tell us which deprecations are the SDK catching up to Atlassian rather than cosmetic clean-up. Migrate endpoint-by-endpoint, read paths first.

Compatibility

Three seams remain: PSR-7/PSR-18 conflicts in the lockfile, Guzzle major-version pinning colliding with Laravel's constraints, and auth-mode differences between workspace access tokens, app passwords (being phased down), and OAuth 2.0 three-legged flows. Pin explicitly with a documented bump procedure — prefer ~5.1.0 over a floating ^ — and treat the deprecation list as the input to a 6.0 readiness review rather than something discovered at upgrade time. Any paging code that passes partial response fields should be regression-tested against the ResultPager fix before we rely on it.

Sequencing

  1. Deprecation audit of 5.1.0 against our endpoint scope; record anything we must avoid and any replacement path.
  2. Spike: authenticate against a sandbox workspace, exercise the five endpoints we actually need plus one new resource (repository permissions config or effective branching model), confirm pagination and error shapes.
  3. Define the interface and DTOs; write the adapter against scoped endpoints only.
  4. Land auth + config + service-provider binding with a feature test against a faked transport, including token redaction in logs.
  5. Migrate read paths before write paths; writes (PR merge, webhook creation, branch restrictions) get idempotency and audit logging from day one.
  6. Add observability and rate-limit handling, then cut over.

Operational Impact

Maintenance

The recurring line item grows slightly and becomes more predictable: dependency bumps, quarterly changelog review, and now an explicit deprecation backlog with a target date ahead of 6.0. Because the package is small and MIT-licensed, the worst case is still vendoring or forking — a few days of engineering, not a re-platforming. Add one standing rule: no new code against a deprecated method, enforced at review, so the 6.0 upgrade is a deletion exercise rather than a refactor.

Support

Community-only, no SLA, no escalation path. Internal ownership must be explicit — one named engineer or team accountable for the wrapper and upstream triage. Document the fork procedure before it is needed. The sensitive-parameter annotations are a genuine security assist but do not substitute for verifying redaction end-to-end in our own logging stack.

Scaling

The SDK is stateless; Bitbucket's quotas are the constraint. Expect per-workspace rate limits, 429 with Retry-After, and cursor pagination that must be drained deliberately. The new permissions, branching-model, and repository-config endpoints are slow-changing reference data and are strong caching candidates — cache them aggressively and refresh on webhook or scheduled sweep. Push bulk operations onto queued jobs with backoff and jitter, cap concurrency per workspace, and keep sync features incremental and resumable rather than full re-scans.

Failure modes

The recurring set: expired or mis-scoped tokens (silent 401s mid-job), rate-limit exhaustion during batch runs, partial page failures leaving inconsistent local state, unverified webhook payloads creating a spoofing surface, and transient 5xx/timeouts on writes producing duplicates absent an idempotency key. Two 5.1.0-specific additions: paging behaviour has changed for partial-field requests and previous-page navigation, so re-verify any code that depends on it; and deprecated endpoints may stop working because Atlassian removed the API, not because we upgraded — watch for upstream-driven breakage in issues and snippets. Mitigate with a retry policy limited to idempotent verbs, a token-refresh path with alerting, webhook signature validation, structured logging of request IDs with redacted credentials, and an outbox or dedupe table for writes. Normalise SDK exceptions into a small internal error taxonomy so callers are not coupled to vendor types.

Ramp-up

Low for anyone comfortable with Guzzle and Laravel container wiring — roughly half a day to first productive commit, a week to a well-instrumented adapter. The learning cost sits in Bitbucket's domain model (workspaces, repository permissions, app passwords vs. OAuth scopes), not the package, and the new permissions and branching-model resources make that model more discoverable from the SDK itself. The release's documented migration paths are useful onboarding material. Capture it all in a short internal runbook — including the deprecation list — so the knowledge is not single-threaded.

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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package