symfony/http-client, symfony/process, etc.) allows partial adoption. The core concept—mocking HTTP requests—aligns with Laravel’s testing needs (e.g., Http::fake() in Laravel), but the implementation is not natively Laravel-compatible without abstraction.Http::fake() is more mature, but this bundle offers YAML-driven mocks, which could appeal to teams preferring declarative configurations over PHP-based fakes.test bundle flag. Laravel’s Http::fake() also enforces this, but the bundle’s service decoration approach is more explicit and configurable.HttpClient, but Laravel’s GuzzleHttp/SymfonyHttpClient can be bridged via custom decorators or service providers. Feasible but requires wrapper logic to intercept Laravel’s HTTP calls.Http::fake() with closures) or JSON/XML stubs. YAML is less common but could be parsed via spatie/array-to-xml or similar for hybrid setups.symfony/http-client, symfony/yaml), but Laravel projects may already have conflicting versions of these packages (e.g., Symfony 6.x vs. Laravel’s older symfony/process).Http::fake() is the de facto standard; this bundle adds another layer of abstraction.tests/mocks/ directory), which may clash with Laravel’s convention of inline test data (e.g., tests/Feature/ApiTest.php).test => true.Http::fake()?
Http::fake() can’t handle?HttpClient directly (breaking Laravel conventions) or wrap Guzzle?vcrphp/vcr, laravel-mockhttp) with better Laravel support?Laravel Compatibility Layer:
symfony/http-client as a secondary HTTP client in tests, decorated by the bundle.Http facade.HttpClient with a decorated version that checks for mocks.Configuration Strategy:
Http::fake().
spatie/array-to-xml or custom loader to convert YAML to Laravel-compatible stubs.tests/
├── mocks/ # YAML files (bundle default)
└── Http/ # Laravel's Http::fake() stubs (optional fallback)
Http::fake().Http::fake() calls with YAML mocks for stable APIs.php artisan mock:record).HttpClient changes).Http::fake() to YAML.Http::fake() for new API tests.legacy_mocks/ directory.composer.json or use platform configs.v1/mock_payment.yml).Http::fake() (no IDE autocompletion for YAML).How can I help you explore Laravel packages today?