News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Use of "parent" in callables is deprecated

Started by Randem, June 14, 2024, 11:37:33 PM

Previous topic - Next topic

Randem

Hi,

We are using SMF 2.1.4 on Apache 2.4, PHP 8.2.20 and get the error message "Use of "parent" in callables is deprecated" in our log file many times.

Here is the line of code that causes the issue:



Here is the back trace:


BotBanish - The Ultimate Bot Firewall
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

shawnb61

This is very interesting...  I run PHP 8.2 in production, and have js/css minimization enabled, and do not get this error.

Note that this was in fact deprecated in 8.2.  This probably belongs on the bug reports board.  A fix is definitely needed.

Related issue & thread up on GitHub:
https://github.com/SimpleMachines/SMF/issues/8244

In the meanwhile, if the errors are a problem, you may need to go back to PHP 8.1.
A question worth asking is born in experience & driven by necessity. - Fripp

Tyrsson

Very odd since the line numbers do not match the current release-2.1 and this is the line in question I believe...
call_user_func_array(array('\\MatthiasMullie\Minify\\Minify', '__construct'), func_get_args());
PM at your own risk, some I answer, if they are interesting, some I ignore.

Randem

This is the version that we have... If there is a different version it is not in 2.1.4...
BotBanish - The Ultimate Bot Firewall
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Tyrsson

PM at your own risk, some I answer, if they are interesting, some I ignore.

Randem

Thanks, I will try it. Github must have different versions than the SMF site... I checked all the way back to version 2.1.1 and the file is the same as the one in 2.1.4.
BotBanish - The Ultimate Bot Firewall
Scams - How to Protect Yourself
Why Professionals Should Not Use Free Email Accounts

Always ignore those who attempt to tell you what to think and believe those who will allow you think for yourself

Tyrsson

Yea, Im not sure when that got merged. I'm not a real big fan of the git model that SMF uses. But it should have been built against this tag:

https://github.com/SimpleMachines/SMF/releases/tag/v2.1.4
PM at your own risk, some I answer, if they are interesting, some I ignore.

shawnb61

The bug is in 2.1.4 (& 3.0).

Yes, a fix went in for 2.1.5 to attempt to address.  That's why the line in error doesn't match current GH.

But as you can see in the issue referenced above, there is still an open issue with this logic even with the current fix slated for 2.1.5.
https://github.com/SimpleMachines/SMF/issues/8244

It needs more work.
A question worth asking is born in experience & driven by necessity. - Fripp

Tyrsson

Quote from: shawnb61 on June 15, 2024, 11:50:28 PMYes, a fix went in for 2.1.5 to attempt to address.  That's why it doesn't match current GH.

But as you can see in the issue referenced above, there is still an open issue with this logic even with the current fix slated for 2.1.5.
https://github.com/SimpleMachines/SMF/issues/8244

Which is why I do not like the git strategy that is used :P I prefer a "merge up strategy" based on a 2.1.x working branch. I mean is there going to be a 2.1.5 release? Who knows...
PM at your own risk, some I answer, if they are interesting, some I ignore.

Advertisement: