willdurand / Negotiation

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

Fix incompatibilities with some null values for PHP 8.1 #114

Closed W0rma closed 2 years ago

W0rma commented 2 years ago

Fixes #115

W0rma commented 2 years ago

Are there any plans to switch from travis to github actions for this repo?

Edit: This PR adds a config for github actions

usox commented 2 years ago

@willdurand sorry to disturb but are there any chances of getting this merged soon?

mnapoli commented 2 years ago

This is indeed blocking PHP 8.1 support for me as well.

ElisDN commented 2 years ago

@willdurand sorry to disturb but are there any chances of getting this merged soon?

alexandrbarabolia commented 2 years ago

@willdurand please accept pr

willdurand commented 2 years ago

ha, oops. Let me see. I am not too much into GitHub actions so I'll need to take a closer look at ths proposed changes (or see if I can use Circle instead).

IIUC the actual 8.1 incompatibilities are related to some functions not accepting non-string params anymore?

ElisDN commented 2 years ago

IIUC the actual 8.1 incompatibilities are related to some functions not accepting non-string params anymore?

Yes, strcasecmp is not accepting null values now.

usox commented 2 years ago

ha, oops. Let me see. I am not too much into GitHub actions so I'll need to take a closer look at ths proposed changes (or see if I can use Circle instead).

If it helps: From my pov, the action is looking good so far.

IIUC the actual 8.1 incompatibilities are related to some functions not accepting non-string params anymore?

Exactly. maybe a string cast could also do the trick.

willdurand commented 2 years ago

alright, so I moved the second commit to its own PR (see: https://github.com/willdurand/Negotiation/pull/116) given it isn't strictly related to PHP 8.1. I filed an issue for these incompatibilities here: #115.

willdurand commented 2 years ago

hey @W0rma, thanks for your patch. Could you please rebase your PR so that CI can run? I cherry-picked your second commit and landed it on the main branch already.

willdurand commented 2 years ago

Nevermind, I can do it myself. You waited long enough on me to review this PR so let me finish the work here.

willdurand commented 2 years ago

https://github.com/willdurand/Negotiation/releases/tag/3.1.0 (please test it)