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

3.9.21 and PHP 7.4.x compatibility issues with built in LESS compiler #30569

Closed
Quark-Zimmerman opened this issue Sep 4, 2020 · 19 comments
Closed
Labels
No Code Attached Yet PHP 8.x PHP 8.x deprecated issues

Comments

@Quark-Zimmerman
Copy link

Quark-Zimmerman commented Sep 4, 2020

Steps to reproduce the issue

  1. Install 3.9.21
  2. Install PHP 7.4.10
  3. Install Kunena Forum 5.1.19
  4. Install "Blue Eagle 5" Kunena template and make it default
  5. Enable PHP error reporting
  6. Browse to Forum's index page

Expected result

Forum displayed without problems

Actual result

Got following errors:
Deprecated: Array and string offset access syntax with curly braces is deprecated in <site_path>\libraries\vendor\leafo\lessphp\lessc.inc.php on line 749

Deprecated: Array and string offset access syntax with curly braces is deprecated in <site_path>\libraries\vendor\leafo\lessphp\lessc.inc.php on line 1860

Deprecated: Array and string offset access syntax with curly braces is deprecated in <site_path>\libraries\vendor\leafo\lessphp\lessc.inc.php on line 2519

Deprecated: Array and string offset access syntax with curly braces is deprecated in <site_path>\libraries\vendor\leafo\lessphp\lessc.inc.php on line 2573

System information (as much as possible)

Additional comments

Basically the problem is with "lessc.inc.php" that uses old/deprectaed syntax like "$subProp[1]{0}" to address arry elements instead of "$subProp[1][0]".
Not the major issue by far, but since this LESS compiler is distributed with Joomla and Joomla recommends to upgrade to 7.4 ... looks bad :)

@Quark-Zimmerman
Copy link
Author

Attached the version of the file that fixes the issue.
Very simple , I just do not like doing core "hacking" , if this distributed with Joomla - everyone should get it as part of the install.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30569.

@Quark-Zimmerman
Copy link
Author

Attached the version of the file that fixes the issue.
Very simple , I just do not like doing core "hacking" , if this distributed with Joomla - everyone should get it as part of the install.

lessc.inc.php.txt
(just remove the .txt from extension)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30569.

@ReLater
Copy link
Contributor

ReLater commented Sep 4, 2020

The issue has been "discussed" already here: #30452

The only reliable solution (because it's a vendor library) would be to use another, still maintained less-php repo or provide a maintained one as replacement for the current one. BTW: As far as I know less has been removed from Joomla 4 (?).

(I used my custom system plugin in the past to load my fixed less library very early instead of the joomla less library. But that was a "very individual solution", not appropriate for Joomla core.)

@Quy
Copy link
Contributor

Quy commented Sep 4, 2020

See upstream PR leafo/lessphp#647

@alikon
Copy link
Contributor

alikon commented Sep 4, 2020

What's the point on submitting a pr on a upstream dead project ??
surely we should consider to fork this , if we really think we need to really support j.3 for 2 years after the release of j4 stable

@zero-24
Copy link
Contributor

zero-24 commented Sep 4, 2020

An topic for this issue (backporting combat fixes for dead projects) has been added to the production department meeting agenda to be held on 08.09.2020

@alikon
Copy link
Contributor

alikon commented Sep 4, 2020

well then we can simply close this

@alikon alikon closed this as completed Sep 4, 2020
@zero-24
Copy link
Contributor

zero-24 commented Sep 4, 2020

Why should we close this here? Has there been an decision made? It was just me that added that to the document.

@alikon alikon reopened this Sep 4, 2020
@alikon
Copy link
Contributor

alikon commented Sep 4, 2020

No,
sorry for being in hurry then let this be reopened and waiting for Godot

@SharkyKZ
Copy link
Contributor

SharkyKZ commented Sep 7, 2020

This errors fatally on PHP 8.

@zero-24
Copy link
Contributor

zero-24 commented Sep 8, 2020

To foreshadow the meeting report to be published this is an acknowledged issue where it seems we got an agreement on how we want to backport the changes. Details will follow once that thing is finalized.

@brianteeman
Copy link
Contributor

As there hasnt been a published report from the department for 60 days is there any chance of an update here

@HLeithner HLeithner added the PHP 8.x PHP 8.x deprecated issues label Oct 7, 2020
@HLeithner
Copy link
Member

We will fork the repository and fix it for j3 packages. The meeting reports will come soon because of personal things they got delayed...

@brianteeman
Copy link
Contributor

Thanks for the update

@Hackwar
Copy link
Member

Hackwar commented Oct 7, 2020

This is the repo where we will do the fixes: https://github.com/joomla-projects/lessphp
Help is appreciated.

@Quy
Copy link
Contributor

Quy commented Nov 19, 2020

@HLeithner OK to close per PR #31428?

@HLeithner
Copy link
Member

Yes

@Quy Quy closed this as completed Nov 19, 2020
@mattab
Copy link

mattab commented Nov 27, 2020

fyi wikimedia maintains a fork at https://github.com/wikimedia/less.php#transitioning-from-leafolessphp

@HLeithner
Copy link
Member

Thanks for the info @mattab we will look into it, latest versions seems to require php 7.2.9 and in case of j3 we have minimum requirement of 5.3.10. So 1.8.1 is the only option.

For j4 we don't include a less compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Code Attached Yet PHP 8.x PHP 8.x deprecated issues
Projects
None yet
Development

No branches or pull requests