Weave Code
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 Amqp Stubs Laravel Package

empi89/php-amqp-stubs

Provides PHP stub files for AMQP-related extensions, improving IDE autocomplete, static analysis, and type hints in projects that use AMQP functions/classes without bundling the actual extension. Useful for CI, analysis, and editor support.

Deep Wiki
Context7

Product Decisions This Supports

  • Developer Productivity: Accelerates local development by providing type hints and autocompletion for php-amqp without requiring a running RabbitMQ server, reducing onboarding friction for new engineers.
  • CI/CD Optimization: Enables faster unit/integration tests by mocking AMQP dependencies, cutting test suite execution time and resource usage.
  • Technical Debt Reduction: Justifies adopting php-amqp (a lower-level alternative to Laravel Queues) for high-throughput messaging systems where fine-grained control is critical.
  • Roadmap Alignment: Supports future plans to migrate from Laravel’s built-in queue system to a custom AMQP-based solution for scalability or multi-tenant isolation.
  • Build vs. Buy: Avoids reinventing AMQP stubs in-house, leveraging community-maintained tooling to focus engineering effort on core business logic.

When to Consider This Package

  • Avoid if:
    • Your team uses Laravel’s built-in queue system (e.g., laravel-queue) with Redis/SQS—this package adds unnecessary complexity.
    • You lack PHP 8.0+ (type hints/stubs require modern PHP).
    • Your AMQP usage is minimal (e.g., 1–2 queues for simple tasks); stubs won’t justify the setup overhead.
    • You’re already using mocking libraries (e.g., Mockery, PHPUnit) that handle AMQP dependencies natively.
  • Look elsewhere if:
    • You need full AMQP functionality in tests (e.g., simulating broker failures)—combine this with a test container (e.g., pestphp/test-container).
    • Your stack uses non-PHP languages (e.g., Go, Node.js) for AMQP; this is PHP-specific.

How to Pitch It (Stakeholders)

For Executives: "This package lets our PHP team develop and test AMQP-based messaging systems 30% faster by eliminating the need for local RabbitMQ setups. It’s a low-risk way to adopt php-amqp for high-scale use cases (e.g., real-time notifications, event sourcing) while keeping CI/CD costs down. Think of it as ‘stubbing’ the AMQP broker—like using a fake credit card for testing payments, but for message queues."

For Engineering: *"We’re adding empi89/php-amqp-stubs to:

  1. Speed up local dev: No more ‘works on my machine’ issues with missing AMQP dependencies.
  2. Clean up tests: Replace flaky php-amqp mocks with type-safe stubs.
  3. Future-proof: If we migrate from Laravel Queues to raw AMQP, we’re already set up. Tradeoff: Minimal setup (composer require), but requires PHP 8.0+. Let’s trial it on the [X] microservice first."*

For Developers: *"This gives you:

  • Autocompletion for php-amqp classes (e.g., Connection, Consumer) in your IDE.
  • No RabbitMQ needed for local dev—stubs simulate the API.
  • Faster tests by avoiding container spin-up. How to use:
composer require empi89/php-amqp-stubs

Then mock AMQP in tests like:

$stub = $this->createStub(Connection::class);
// ... assert interactions without a real broker.
```"
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4