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

Deprecated stuff under PHP 8.1 #660

Open
ca-dsgn opened this issue Aug 23, 2022 · 3 comments
Open

Deprecated stuff under PHP 8.1 #660

ca-dsgn opened this issue Aug 23, 2022 · 3 comments

Comments

@ca-dsgn
Copy link

ca-dsgn commented Aug 23, 2022

I just updated my local environment to PHP 8.1 and checked that there are several issues:

Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /lessphp/lessc.inc.php on line 3608
Deprecated: Implicit conversion from float 19789.30078125 to int loses precision in /lessphp/lessc.inc.php on line 1672

Any plans on updating the existing code to support 8.1? Is there anybody who already forked the current code and updated it?

@ca-dsgn
Copy link
Author

ca-dsgn commented Aug 23, 2022

I forked the current code from https://github.com/mjphaynes/lessphp and updated it to run under PHP 8.1. You can install it via composer:

composer require ca-dsgn/lessphp

The code under packagist will also be auto-updated to support future releases of PHP.

@Klap-in
Copy link

Klap-in commented Sep 1, 2022

This PR contains also a few others. The isset is not included there yet, maybe that PR can be updated too?
#657

@labylo
Copy link

labylo commented May 31, 2023

Juste replace
if (preg_match($r, $this->buffer, $out, null, $this->count)) {
by
if (preg_match($r, $this->buffer, $out, PREG_UNMATCHED_AS_NULL, $this->count)) {

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

No branches or pull requests

3 participants