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

React Phpunit Run Tests In Fiber Laravel Package

wyrihaximus/react-phpunit-run-tests-in-fiber

PHPUnit trait to run each test inside a PHP Fiber, making it easy to use ReactPHP async/await in tests. Includes optional per-test or per-class timeout attributes to fail slow tests (without stopping the running fiber).

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Async-first architecture: Validates roadmap decisions for Laravel applications leveraging ReactPHP fibers (e.g., real-time APIs, event-driven microservices, or high-concurrency systems). Enables testing of non-blocking I/O, promises, and fiber-dependent logic without custom tooling.
  • Build vs. buy: Justifies adopting this lightweight, MIT-licensed solution over building in-house fiber-aware testing infrastructure, reducing technical debt and maintenance overhead.
  • Performance-critical features: Supports testing timeouts, race conditions, and context errors in async workflows (e.g., WebSocket handlers, stream processors) where synchronous tests would fail to catch issues.
  • Laravel + ReactPHP hybrid: Bridges Laravel’s synchronous ecosystem with ReactPHP’s async capabilities, enabling incremental adoption of async patterns without rewriting tests.

When to Consider This Package

Adopt only if:

  • Your Laravel app integrates ReactPHP components (e.g., react/http, react/socket, or custom event loops) and requires testing fiber-dependent logic.
  • You’re building real-time features (e.g., live updates, WebSockets, or high-throughput APIs) where async correctness is critical.
  • Your team has PHP 8.4+ and PHPUnit 12+ (required dependencies).
  • You’re willing to accept limited community support (0 stars, 0 dependents) and validate the use case internally first.

Avoid if:

  • Your project is synchronous-only (e.g., standard CRUD apps, API routes without async dependencies).
  • You lack expertise with fibers/ReactPHP or prefer Laravel’s native async tools (e.g., queues, Guzzle).
  • You need active maintenance or long-term support (package has minimal adoption metrics).
  • Your test suite relies on Laravel-specific features (e.g., database transactions, HTTP assertions) that may conflict with the event loop.

How to Pitch It (Stakeholders)

To Engineering: "This package lets us test async ReactPHP code in Laravel without reinventing the wheel. By running tests in fibers, we catch race conditions and context errors early—critical for real-time features like live event processing or high-concurrency APIs. It’s a drop-in trait: just add use RunTestsInFibersTrait and use await() directly. No need to refactor tests or manage custom event loops. Perfect for validating async services while keeping sync tests fast."

To Executives: "For products relying on real-time performance (e.g., live dashboards, event-driven workflows), this tool ensures our async code works reliably before release. It reduces flaky tests and production bugs in high-concurrency scenarios, directly supporting our scalability goals. A lightweight investment that pays off in stability and developer productivity—especially for teams adopting async architectures."

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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata