mcustiel/phiremock-common
Shared utilities for the Phiremock PHP ecosystem. Provides common classes, interfaces, and helpers used across related packages to simplify building and consuming Phiremock client/server components with consistent behavior and minimal duplication.
mcustiel/phiremock-common) remains aligned with Phiremock-specific utilities for HTTP mocking, but the PHP 8.2+ requirement now enforces stricter Laravel version compatibility (Laravel 10+). This is critical for:
Http::fake() remains separate).Http::fake() persists; evaluate ROI for Phiremock’s added complexity.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| PHP 8.2+ Mandate | High | Upgrade Laravel to 10+; assess team readiness for PHP 8.2 features (e.g., read-only properties). |
| Phiremock Dependency | High | Evaluate if Phiremock is essential or if alternatives (e.g., vcr/vcr, mockery) suffice. |
| Laravel Ecosystem Gaps | Medium | Abstract Phiremock behind interfaces to isolate dependencies (e.g., MockHttpServerInterface). |
| Testing Fragility | Medium | Use Phiremock’s reset features between test suites; avoid global state. |
| License (GPL-3.0) | Low | Confirm compliance with legal team; may restrict commercial use. |
| Maintenance Burden | High | Monitor Phiremock’s roadmap; prepare to fork if upstream stagnates. |
PHP/Laravel Compatibility:
Phiremock Justification:
pestphp/pest-plugin-laravel-http, mockery) that meet the same goals with lower risk?Scope of Adoption:
Long-Term Viability:
Http::fake() or Mockery for simple mocks.array_key_first() deprecation, union types).composer.json (dev dependency) after upgrading Laravel.Phiremock::route()) to abstract Phiremock’s API.Testing trait and RefreshDatabase.guzzlehttp/guzzle (Laravel’s HTTP client).symfony/http-client (default in Laravel 10+).mockery/mockery (for PHP unit mocks)..env for Phiremock settings (e.g., PHIREMOCK_HOST=localhost:8080).array_key_first() → array_key_first() with null handling).mcustiel/phiremock-common to composer.json (dev dependency).Http::fake().How can I help you explore Laravel packages today?