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

Php Thrift Laravel Package

leric/php-thrift

Apache Thrift PHP library for building cross-language RPC clients and servers. Includes generated PHP types, TBinaryProtocol serialization, PSR-4 class loading, and optional APCu caching for sockets. Requires PHP 5+.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Interop with an existing Thrift-based service estate. The core decision this unlocks: can a PHP service participate in an internal SOA where the contract is defined in Thrift IDL and the other side is Java/Go/Python? If yes, this package is the wiring that lets generated Types.php / Service.php classes serialize on the wire.
  • Build vs. integrate vs. buy on the transport layer. Nobody should hand-roll Thrift's binary protocol, framed transport, or socket handling. Using the compiler's runtime library is the "buy" answer for protocol plumbing; this package is just the distribution mechanism (Composer instead of copy-pasting thrift/lib/php/lib).
  • Data-platform access paths. Historic HBase and Cassandra Thrift gateways are still in production in a lot of orgs. This supports the decision "our PHP reporting/admin tool talks to the warehouse through the existing Thrift gateway" versus "stand up a new REST proxy."
  • Composer-native hygiene for legacy runtimes. If the alternative is a copied-in blob under vendor_manual/, adopting this is a small but real maintainability decision: version pinning, composer.lock provenance, autoloading consistency with the rest of the app.
  • Migration sequencing. This supports using Thrift as a bridge — ship the PHP integration now, keep the gRPC/JSON migration on the roadmap as a separate, schedulable workstream rather than a blocker.
  • Scope gating for a PHP service. Useful negative signal too: if the only way to reach a downstream system is Thrift and no one on the team owns the IDL or the compiler toolchain, that's a "don't build this service in PHP yet" answer.

When to Consider This Package

Adopt when:

  • Downstream or upstream services already publish Thrift IDL, and you have the thrift compiler in your build pipeline to generate PHP bindings.
  • You need the PHP runtime classes (TSocket, TBufferedTransport, TBinaryProtocol, TProtocolException, server types) that generated code requires but does not include.
  • You want that runtime managed by Composer with a pinned version rather than vendored into the repo.
  • The integration is scoped, internal, and read-mostly — a back-office tool, a migration shim, an admin console.
  • You can accept the runtime as code you effectively own. Treat it as an internal fork with an upstream.

Look elsewhere when:

  • Greenfield. gRPC/protobuf, REST/JSON, or an event broker is the default; Thrift's ecosystem momentum is not on your side.
  • You need modern PHP support confidently. The README explicitly targets PHP 5, and generated code from older compiler versions frequently trips on PHP 8 type and deprecation changes. Verify generated output against your actual PHP version before committing.
  • Maintenance and security posture matter. 38 stars and 0 dependents is a strong signal you are the only operator; there is no release cadence, no CI signal, no security response. If you need an LTS-style dependency, vendor Apache Thrift's PHP library yourself and pin it.
  • You only need Cassandra or HBase — use the native driver or a REST gateway rather than inheriting a Thrift surface you don't otherwise need.
  • You require async/non-blocking I/O, connection pooling, or observability hooks. This is a thin protocol runtime, not a resilient RPC client; you'd be building retries, timeouts, and tracing on top.
  • Your team cannot own the compiler toolchain. Without the thrift binary in CI, this package is inert.

Note on the adoption metric: "0 dependents" likely undercounts reality — Thrift's own README tells users to copy the library into their codebase, so much real usage is invisible to package registries. Still, plan for solo operation.

How to Pitch It (Stakeholders)

For executives (one paragraph): This is a small, free connector that lets one of our PHP applications talk to systems that already speak Thrift — the protocol our platform services use. It avoids either (a) rebuilding the PHP app on a different stack or (b) standing up a new translation service. Cost is effectively zero and it ships in days, not a quarter. The honest caveat: it's a low-maintenance, low-activity open-source package, so we should treat it as code we own — pin the version, review it once, and keep the eventual move to our standard RPC stack on the roadmap rather than treating this as a long-term platform bet.

For engineering leads: It's the Composer-packaged Apache Thrift PHP runtime — not a framework, not an SDK. You still need the thrift compiler and your team's IDL to generate Types.php and Service.php; this package provides the transport and protocol classes those files depend on. It replaces vendoring lib/php/lib by hand. Assume the README's PHP 5 orientation is accurate until proven otherwise: smoke-test the generated bindings on our PHP version in a spike before we size the work. Plan to pin an exact version in composer.lock, mirror the repo internally, and budget a day or two for a read-through — that's the whole ongoing cost. If the spike fails, the fallback is vendoring Apache Thrift's PHP library directly, which is the same code with worse ergonomics.

Decision requested: approve as a tactical dependency for the specific integration, not as a standards-track choice; no dedicated headcount, one-time review, and an explicit exit path to gRPC if the platform roadmap goes that direction.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums