PackageTrack
Sign in Get early access

willdurand/negotiation

Content Negotiation tools for PHP provided as a standalone library.

3.1.0 133M downloads/mo #448 most downloaded on Packagist willdurand/Negotiation

What this package is like to depend on

Last release 5 years ago

no release in 18 months

Ships unpredictably

gaps range from 1 weeks to 3.4 years

Rarely documented

notes for 7 of 41 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

45 releases · first in 2013

0 releases in the last 12 months

see the full history below

Release timeline

45 releases · Jan 2013 to Jan 2022
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 45
  1. 3.1.0 30 Jan 2022
    Release notes

    This new release should be fully compatible with PHP 8.1.

    What's Changed

    • Added: add missed fallback to generic language (in LanguageNegotiator) by @rtm-ctrlz in #113
    • Fixed: invalid PHPDocs return comment by @michalbundyra in #112
    • Fixed: incompatibilities with some null values for PHP 8.1 by @W0rma in #114
    • Fixed: switch from travis to github actions by @willdurand in #116

    New Contributors

    Full Changelog:

    See 3.0.0...3.1.0

    Open source →
  2. 3.0.0 25 Sep 2020
    Release notes

    👋 Hi! It's been a long time.

    This new major version is very similar to the 2.x version. In fact, the only main benefit is to support PHP 8, which required some changes that might be considered backward incompatible (see #106).

    Upgrade should be safe and it's recommended. This library has been very stable over the years so we didn't change a lot of things between the versions 2 and 3. Have fun!

    Open source →
  3. 3.0.0-alpha3 14 May 2017 pre-release
    Release notes
    • Fixed: do not compare + segments unless wildcards in either accept or priority (cf. #93 / #94)
    Open source →
  4. 3.0.0-alpha2 04 May 2017 pre-release
    Release notes
    • Added: handle wildcard "+" segments (cf. #92)
    Open source →
  5. 3.0.0-alpha1 04 Mar 2017 pre-release
    Release notes

    This is the very first alpha release of the next major version of this library. This version works almost like the current major version (v2) but fixes a sort of regression for some users that could not be merged into the v2 (cf. version 2.2.1).

    💬 Everyone is encouraged to migrate to the v3.


    • Added: Implement getOrderedElements() (cf. #90)
    • Added: a third optional (boolean) parameter is now available in the getBest($header, array $priorities, $strict = false) method. This parameter allows to throw exceptions if the Accept header is incorrect (default behavior is to silently ignore this case, cf. release 2.0.3).
    Open source →
  6. v2.3.1 14 May 2017
    Release notes

    Fixed: do not compare + segments unless wildcards in either accept or priority (cf. #93 / #94)

    Open source →
  7. v2.3.0 04 May 2017
    Release notes
    • Added: handle wildcard "+" segments (cf. #92)
    Open source →
  8. v2.2.1 14 Oct 2016
    Release notes

    I revert the code introduced in version 2.2.0 about 2 hours after having released it because the code changed the public API, and therefore introduced a BC break. This version fixes the issue and I am going to publish a new major version for the code previously introduced in 2.2.0.

    Please use this version and not 2.2.0

    Open source →
  9. v2.2.0 14 Oct 2016
    Release notes

    ⚠️ PLEASE DO NOT USE THIS VERSION, USE 2.2.1 INSTEAD. SORRY 😕

    Added: a third optional (boolean) parameter is now available in the getBest($header, array $priorities, $strict = false) method. This parameter allows to throw exceptions if the Accept header is incorrect (default behavior is to silently ignore this case, cf. release 2.0.3).

    ⚠️ PLEASE DO NOT USE THIS VERSION, USE 2.2.1 INSTEAD. SORRY 😕

    Open source →
  10. v2.1.0 21 Sep 2016
    Release notes
    • Added: support for quality-of-source factor (cf. #77)
    Open source →
  11. v2.0.3 30 Aug 2016

    Nothing published for this version

  12. v2.0.2 21 Nov 2015

    Nothing published for this version

  13. v2.0.1 02 Oct 2015

    Nothing published for this version

  14. v2.0.0 03 Sep 2015

    Nothing published for this version

  15. v2.0.0-alpha1 29 Jul 2015 pre-release
    Release notes

    d26d6b0

    UPDATE: Negotiation 2.0.0 has been released on October 1st, 2015.

    Hi! It's been a long time, right?

    Negotiation is stable for years now, and it works like a charm for most of the common use cases. It has been installed more than two million times. Yes! 2,000,000 . That's awesome!

    However, we found tricky edge cases we could not fix easily, and our interpretation of the specification has changed over time. That is why I am proud to announce the immediate availability of Negotiation 2.0 (not entirely stable yet).

    This new version is a full rewrite , and therefore it is not backward compatible with Negotiation 1.0. However, migrating should not be too complicated as the API has been drastically simplified : there is only one single method to use now ( getBest() ), and different classes ( Negotiator and *Negotiator ) for different needs.

    Here is the first pre-release ( 2.0.0-alpha1 ) of Negotiation 2.0 . Please test it, and report feedback, ideas, bugs so that we can work on providing the best content negotiation library written in PHP ever!

    Human Readable Changelog

    • Support for wildcard priorities has been removed ( #49 ).

    • Register formats have been removed, as well as the logic to retrieve a format given a media type. Hence, isMediaRange() method has been removed. It has been considered out of scope of the library, and it will avoid missing formats, adding too many mapping formats, etc.

    • Header parsing has been improved both in term of speed, strictness, and design (for instance, it now accepts quoted parameter).

    • Support for partial media ranges has been added.

    • The overall negotiation logic has changed ( #45 , #48 , #51 ).

    • More named exceptions ( #50 ).

    • And, of course, even more tests!

    All the commits can be found here: 4dd4643...v2.0.0-alpha1 or in #60 .

    Last but not the least, THANK YOU to @neural-wetware for his huge contribution on this new major version! 💛 💙 ❤️ 💚 🚢 ⭐ 🌟 💙 🌠 💝

    Let's celebrate now!

    Open source →
  16. 1.5.0 01 Oct 2015

    Nothing published for this version

  17. 1.4.0 28 Jul 2015

    Nothing published for this version

  18. 1.3.4 02 Oct 2014

    Nothing published for this version

  19. 1.3.3 16 May 2014

    Nothing published for this version

  20. 1.3.2 26 Feb 2014

    Nothing published for this version

  21. 1.3.1 06 Feb 2014

    Nothing published for this version

  22. 1.3.0 20 Jan 2014

    Nothing published for this version

  23. 1.2.5 02 Oct 2014

    Nothing published for this version

  24. 1.2.4 16 May 2014

    Nothing published for this version

  25. 1.2.3 28 Feb 2014

    Nothing published for this version

  26. 1.2.2 11 Feb 2014

    Nothing published for this version

  27. 1.2.1 09 Jan 2014

    Nothing published for this version

  28. 1.2.0 14 Dec 2013

    Nothing published for this version

  29. 1.1.2 16 May 2014

    Nothing published for this version

  30. 1.1.1 11 Feb 2014

    Nothing published for this version

  31. 1.1.0 06 Dec 2013

    Nothing published for this version

  32. 1.0.5 16 May 2014

    Nothing published for this version

  33. 1.0.4 06 Feb 2014

    Nothing published for this version

  34. 1.0.3 26 Nov 2013

    Nothing published for this version

  35. 1.0.2 21 Nov 2013

    Nothing published for this version

  36. 1.0.1 01 Aug 2013

    Nothing published for this version

  37. 1.0.0 27 Jul 2013

    Nothing published for this version

  38. 0.0.8 26 Jul 2013

    Nothing published for this version

  39. 0.0.7 26 Jul 2013

    Nothing published for this version

  40. 0.0.6 26 Jul 2013

    Nothing published for this version

  41. 0.0.5 26 Jul 2013

    Nothing published for this version

  42. 0.0.4 19 Jul 2013

    Nothing published for this version

  43. 0.0.3 19 Jul 2013

    Nothing published for this version

  44. 0.0.2 20 Jan 2013

    Nothing published for this version

  45. 0.0.1 20 Jan 2013

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive