graham-campbell/bitbucket
A Laravel/PHP package by Graham Campbell that provides a clean, configurable Bitbucket Cloud API v2 client, with service provider and facade integration for working with repositories, pull requests, users, webhooks, and related resources.
Architecture fit. The package is a thin Laravel adapter over bitbucket/client: a service provider, a publishable config file, a Bitbucket facade, and container bindings. It introduces no persistence, no domain model, and no queue or cache opinions — it occupies the infrastructure-adapter layer and composes with the framework rather than competing with it. From a TPM lens that shape is the whole story: the contract our application depends on is a handful of container resolutions and facade calls, so the package is replaceable. The real coupling is to the upstream SDK, and v11.1.0 makes that coupling explicit by requiring bitbucket/client ^5.1. Treat the SDK, not the wrapper, as the dependency of record.
Integration feasibility. Greenfield is roughly half a day: composer require, publish config, populate env credentials, resolve from the container. Brownfield is where the planning cost lives. The SDK floor moves from the 4.x line to 5.x — a transitive major bump and the only materially risky line in these release notes. PHP 8.5 and Laravel 13 support are additive compatibility. The planning consequence is that an upgrade here is a code change with a dependency-review gate, not a lockfile refresh.
Technical risk.
bitbucket/client 4→5 can break client construction, exception hierarchy, pagination iterators, and resource namespaces. Any call site that catches SDK exceptions, type-hints SDK classes, or walks paginated results directly is exposed. The dangerous failure is silent behavioral drift — same call, different response shape — not the fatal that CI catches.composer.json constraints. A widened-but-untested constraint is worse than an honest exclusion, because Composer resolves into an unverified combination without complaint.config:cache behavior is documented, since a cached config is a plaintext secret at rest.Key questions.
bitbucket/client 4.x and 5.x, and is there an upstream upgrade guide citable in the change record?bitbucket/client 5.1, and does it conflict with our pinned Guzzle and PSR-7 versions?Stack fit. Laravel 11–13 on PHP 8.2–8.5 is the presumptive window, subject to the support-matrix check above. The decision to record is not "adopt this package" but "adopt it behind our own interface." One thin internal gateway — get repository, list pull requests, post commit status, read pipeline — makes the next SDK major a one-file change and keeps a vendor swap a realistic option instead of a rewrite. This is the single highest-leverage architectural instruction in the whole assessment, and it costs a day.
Migration path. For anyone already on 11.0.x, a routine composer update silently pulls a new SDK major. Sequence it as deliberate work:
bitbucket/client usage — imports, catch blocks, instanceof checks, type hints, pagination loops. This inventory is the effort estimate; do it before committing a date.Compatibility. Run composer why-not bitbucket/client ^5.1 before scheduling anything; blockers almost always come from Guzzle or PSR-7 pins elsewhere in the tree. If a blocker is genuinely immovable, pin the package to the last 4.x-compatible release and raise the SDK migration as its own backlog item — do not let one adapter hold the application's upgrade cadence hostage.
Sequencing.
Maintenance. Steady-state cost is near zero: small codebase, stable API, conventional Laravel idiom. But the cost is lumpy — it arrives whenever upstream ships an SDK major or a new Laravel line. Budget an annual SDK-migration spike and a v12 jump when Laravel 14 lands, and put both in the yearly dependency review rather than discovering them mid-framework-upgrade. Frame this for finance as a low, infrequent, predictable cost rather than a flat one.
Support. Community OSS, no SLA, effectively a single maintainer. That is the real exposure: one person sits between us and a business-critical API. Mitigations are cheap and worth funding explicitly — keep the internal wrapper thin, keep a fork-and-patch path warm, pin versions deliberately rather than floating, and avoid building on Bitbucket endpoints the package itself does not exercise.
Scaling. Throughput is bounded by Bitbucket's rate limits and pagination semantics, not by this package. The adapter will not queue, batch, cache, or back off for us. Any repository-scale enumeration must be designed as paginated, queued work with explicit 429 handling from day one; retrofitting that after a rate-limit incident is materially more expensive than building it in.
Failure modes.
Ramp-up. Any Laravel developer can consume the facade productively in under a day, because there is nothing new to learn beyond the Bitbucket API surface itself. That is the package's core value proposition and should be the headline in the decision record: it converts an integration project into configuration plus mapping logic, maintainable by the team rather than by the one engineer who wrote it. The ramp-up risk sits with ops, not engineering — whoever owns secrets, rate limits, and the dependency register needs the runbook from step 5 above.
How can I help you explore Laravel packages today?