willdurand / Negotiation

Content Negotiation tools for PHP.
https://williamdurand.fr/Negotiation/
MIT License
1.41k stars 62 forks source link

Do not compare + segments unless wildcards in either accept or priority #94

Closed weierophinney closed 7 years ago

weierophinney commented 7 years ago

Fixes #93. If there are no wildcard segments in either the subtype or + segment of either the Accept header or priority, do not attempt to compare them.

Adds more tests for #92 as well, using * subtypes in both the Accept header and priorities, to validate that different combinations work as expected.

weierophinney commented 7 years ago

@willdurand , @meyerbaptiste — ready to review!

weierophinney commented 7 years ago

And @dunglas !

dunglas commented 7 years ago

Our test suite is green with this patch (see https://github.com/api-platform/core/pull/1104), thanks @weierophinney!

dunglas commented 7 years ago

@willdurand do you think you'll soon have time soon to merge this patch and create a new release? It's currently breaking all API Platform projects when running composer update but we can prevent this by tagging a release on our side preventing to install 2.3+.

willdurand commented 7 years ago

@willdurand do you think you'll soon have time soon to merge this patch and create a new release? It's currently breaking all API Platform projects when running composer update but we can prevent this by tagging a release on our side preventing to install 2.3+.

doing this right now, was on holidays earlier this week..

willdurand commented 7 years ago

@dunglas just tagged 2.3.1

willdurand commented 7 years ago

Thanks everyone! ❤️