Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backports for 5.2.8 #558

Merged
merged 14 commits into from
Jan 14, 2019
Merged

Backports for 5.2.8 #558

merged 14 commits into from
Jan 14, 2019

Conversation

erayd
Copy link
Contributor

@erayd erayd commented Jan 10, 2019

Bugfixes from 6.0.0 that can be backported to 5.2.8 without breaking backwards-compatibility.

Backported PRs

Skipped PRs

erayd and others added 14 commits January 10, 2019 17:01
Fixes jsonrainbow#441.

The bug in jsonrainbow#441 was caused by refactoring of the optimisation which
introduced a type-checking error. Noting the performance impact is
negligible for all cases other than large arrays of strings or numbers,
and introduces significant cognitive complexity to a project that is
extremely short of maintainers, removing it seems like the best course
of action.

The performance improvement provided by this optimisation was
approximately 40%, however it also carried a number of other problematic
bugs - if it were to be reintroduced at a later date with those bugs
fixed (mainly the skipping of much of the validation logic for optimised
items, even in cases where that logic might be necessary), it would not
have such a significant impact.
PHP's fmod has some quirks.  The private fmod function wraps it to iron out some of those quirks but ultimately it's better to just not use it.
Now that the private fmod function is not using PHP's fmod we can remove the code which was working around it's quirks.
- Change stripos to strpos to match case-insensitive
- Rename $mediaTypeBlacklist to $allowedInvalidContentTypeEndpoints
- Refactor for to foreach
@erayd
Copy link
Contributor Author

erayd commented Jan 10, 2019

@bighappyface Could you please merge this when you have a moment?

@bighappyface
Copy link
Collaborator

@erayd erayd deleted the backport-528 branch September 25, 2019 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants