serbanghita / Mobile-Detect

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
http://mobiledetect.net
MIT License
10.55k stars 2.68k forks source link

PHP 8 Support #848

Closed adlenton closed 2 years ago

adlenton commented 4 years ago

Hey,

I took the liberty to propose a minimal changeset for php 8 support and with that also drop support for unsupported php versions (https://www.php.net/supported-versions.php).

brainexe commented 3 years ago

@serbanghita I'm also waiting for this PR, as it's blocking us from a full PHP8 upgrade :)

serbanghita commented 3 years ago

@adlenton Thank you, I actually needed this! I'm review-ing it and this will be the basis of 3.0.0

serbanghita commented 3 years ago

@bogdananton can you look into this PR as well?

serbanghita commented 3 years ago

@brainexe I will move as fast as I can. There is also this PR that I have to account for https://github.com/serbanghita/Mobile-Detect/pull/823 Can you also review the current PR changes?

dereuromark commented 3 years ago

Is there any update on this?

We have tons of those

PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/runner/work/.../vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php on line 1460

in our CI system now for PHP 8.1+ etc.

serbanghita commented 2 years ago

I have opened a PR for support of PHP7 https://github.com/serbanghita/Mobile-Detect/pull/900

This PR contains shallow changes and I cannot continue with it in this state. If any of you guys want to be a reviewer on https://github.com/serbanghita/Mobile-Detect/pull/900 - let me know