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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport