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

Http Static Provider Laravel Package

boson-php/http-static-provider

Laravel/PHP package that provides a static HTTP provider for Boson, useful for serving fixed responses in tests, mocks, or offline scenarios. Simple setup to return predefined status, headers, and body without making real network requests.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Development:

    • Enable static HTTP response mocking for API testing, reducing reliance on external services during development.
    • Support rapid prototyping of API-driven features by simulating backend responses without full backend integration.
    • Facilitate offline testing of frontend components (e.g., React/Vue) by providing static HTTP responses.
  • Roadmap Prioritization:

    • Accelerate MVP delivery by mocking dependencies early, allowing parallel frontend/backend work.
    • Reduce flakiness in CI/CD pipelines by replacing unreliable external APIs with deterministic static responses.
    • Enable A/B testing or feature flag validation by simulating different API responses per environment.
  • Build vs. Buy:

    • Buy: Prefer this over building a custom solution if the team lacks time/resources to maintain a robust HTTP mocking framework.
    • Build: Consider custom solutions if the package lacks critical features (e.g., dynamic response templating, auth simulation) or if the team needs deep integration with existing tooling (e.g., Laravel’s HTTP client).
  • Use Cases:

    • Frontend Teams: Isolate frontend development from backend instability.
    • QA/DevOps: Create reproducible test environments without hitting live APIs.
    • Legacy System Integration: Mock deprecated or third-party APIs during migration phases.

When to Consider This Package

  • Adopt if:

    • Your team frequently tests frontend components or APIs offline or in isolated environments.
    • You need a lightweight, PHP-native solution (no Node.js/JS dependencies) for HTTP mocking.
    • Your project uses Laravel or a PHP-based stack and requires seamless integration with Laravel’s HTTP client (Http::fake() or similar).
    • You prioritize simplicity over advanced features (e.g., no need for request/response transformation logic).
    • Your license requirements allow for MIT-licensed open-source dependencies.
  • Look Elsewhere if:

    • You need dynamic response generation (e.g., randomizing data, simulating delays, or complex auth flows).
    • Your team requires cross-language support (e.g., mocking APIs for non-PHP clients like Python/JS).
    • You lack PHP expertise and prefer a GUI-based tool (e.g., Postman Mock Servers, WireMock).
    • The package’s lack of stars/maintenance raises concerns about long-term viability (evaluate alternatives like mockery or vcr for PHP).
    • You need advanced protocol support (e.g., WebSockets, GraphQL, or gRPC mocking).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets our teams mock HTTP APIs statically—think of it as a 'fake backend' for PHP/Laravel. By simulating API responses during development, we can:

  • Ship faster: Frontend and backend teams work in parallel without waiting on each other.
  • Reduce costs: Eliminate flaky CI tests caused by external API dependencies.
  • Lower risk: Test edge cases (e.g., error responses) without hitting live systems. It’s a lightweight, open-source tool that integrates with Laravel, requiring minimal maintenance. The trade-off? We sacrifice some dynamic response flexibility for simplicity and speed—ideal for our current MVP phase."*

For Engineering:

*"boson-php/http-static-provider is a subtree-split component from the Boson framework, offering a read-only HTTP response mocking solution for PHP. Key benefits:

  • Laravel-friendly: Works with Laravel’s HTTP client (e.g., Http::fake()).
  • Zero dependencies: Pure PHP, no external services or complex setup.
  • Use cases:
    • Mock APIs for frontend testing (e.g., React/Vue components).
    • CI/CD stability: Replace unreliable APIs with static responses.
    • Offline development: Test without network calls.
  • Limitations:
    • Static responses only (no dynamic data generation).
    • Minimal community adoption (evaluate alternatives if this is a blocker). Proposal: Pilot this for [specific feature/team], then assess if we need to extend it (e.g., add dynamic templating) or switch to a more feature-rich tool like vcr."*

Note: Emphasize the package’s Laravel compatibility and MIT license to address legal/integration concerns upfront.

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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor