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

Negotiation Laravel Package

willdurand/negotiation

HTTP content negotiation library for PHP. Parses Accept* headers to match the best media type, language, charset, or encoding, with flexible matchers and prioritization. Handy for APIs and middleware to select response formats based on client preferences.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package is framework-agnostic and integrates seamlessly with Laravel's HTTP layer, complementing native request/response handling by providing granular control over RFC-compliant content negotiation (e.g., Accept, Accept-Language). It enhances Laravel's default behavior for multi-format APIs without conflicting with core components.

Integration feasibility: High. Composer installation is trivial, and integration requires minimal code changes (e.g., middleware to parse headers and inject negotiated types into requests). Laravel's service container supports easy binding of the negotiation logic.

Technical risk: Moderate. Last release was in 2022, raising concerns about PHP 8.x compatibility and security patching. The "unknown repository" status limits visibility into code quality, issue tracking, and community support. Potential for unaddressed edge cases in header parsing.

Key questions:

  • How does it handle malformed headers (e.g., invalid q-values) or conflicting Accept directives?
  • Does it interoperate cleanly with Laravel's route model binding and response macros?
  • Are there known issues with PHP 8.1+ or Laravel 10+?
  • Is the MIT license compliant with our internal security policies?

Integration Approach

Stack fit: Ideal for Laravel's API-focused workflows. Works with existing middleware pipelines, controller responses, and exception handling. No dependency conflicts expected

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.
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager