No Code Attached Yet
avatar MarkRS-UK
MarkRS-UK
24 Jun 2022

Steps to reproduce the issue

Set "Log Deprecated API" on in the "Logging" Global Configurations panel.
Run almost anything, either in the front or back end.
If running something in the back end, look in the file /administrator/logs/deprecated.php (I haven't checked the corresponding front end file)

Expected result

Deprecation messages should show the line number and file name causing the deprecation message.

Actual result

They don't.

System information (as much as possible)

Present in 4.1.5 and all previous versions (presumably).

Additional comments

In file /libraries/src/Exception/ExceptionHandler.php method handleUserDeprecatedErrors line 44, add in the file and line reference, which are supplied to that method, eg

Log::add("$errorMessage - $errorFile - Line $errorLine", Log::WARNING, 'deprecated');

I can imagine that this was excluded purposefully since the core still contains hundreds, if not thousands, of deprecation instances, but in a way that makes it even more unhelpful that this information is not printed.

avatar MarkRS-UK MarkRS-UK - open - 24 Jun 2022
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jun 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Jun 2022
avatar laoneo
laoneo - comment - 24 Jun 2022

Can you make a pull request with the suggestion. Sounds like a good addition.

avatar richard67 richard67 - change - 27 Jun 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-06-27 16:20:44
Closed_By richard67
avatar richard67 richard67 - close - 27 Jun 2022
avatar richard67
richard67 - comment - 27 Jun 2022

Closing as having a pull request. See #38158 .

Add a Comment

Login with GitHub to post a comment