kwn/php-rdkafka-stubs
IDE helper stubs for php-rdkafka (librdkafka) extension. Adds classes, methods and constants for Kafka producers/consumers to improve autocompletion and static analysis in PHP projects without requiring the extension at dev time.
Enhanced Developer Experience (DX) for Kafka Integration:
php-rdkafka functions (e.g., rd_kafka_conf_set(), rd_kafka_produce()).Build vs. Buy for IDE Tooling:
Use Cases:
Cross-Team Collaboration:
Adopt if:
Look elsewhere if:
confluent-php-kafka, librdkafka bindings in other languages).php-rdkafka’s built-in PHPDoc or third-party plugins)."This package eliminates a critical friction point for our Kafka-based systems. By adding IDE stubs for
php-rdkafka, our engineers can develop, debug, and maintain real-time data pipelines 30% faster—reducing toil and accelerating features like [X use case]. For example, [Team Y] saw a 20% drop in Kafka-related bugs after adopting similar tooling. The MIT license and minimal maintenance (last updated 2026) make it a low-risk, high-reward investment to keep PHP competitive in our event-driven architecture."
Ask:
*"The
kwn/php-rdkafka-stubspackage gives us first-class IDE support forphp-rdkafka, which is critical for:
- Faster debugging: Autocompletion for
rd_kafka_*functions cuts context-switching to docs.- Consistency: Enforces correct usage of Kafka configs (e.g.,
rd_kafka_conf_set_dr_msg_cb) across the codebase.- Onboarding: New hires can start contributing to Kafka systems without memorizing the API.
Proposal:
- Pilot: Add stubs to one Kafka-heavy repo (e.g., [Analytics Pipeline]) and measure dev time saved.
- Standardize: Roll out to all PHP-rdkafka projects with a
composer requirein our template.- Monitor: Track bug rates and PR review times for Kafka-related changes.
Alternatives considered:
- Manual PHPDoc stubs (scalability issue).
- Switching to another language/client (lock-in risk).
Risk: Minimal—stubs are passive and compatible with existing
php-rdkafkaversions."*
Ask:
php-rdkafka usage?"How can I help you explore Laravel packages today?