MODX3 - Deprecations Log - Can they be fixed?

Hello, is it possible to fix the following errors?
i use MODX 3.1.0-pl on NGINX - 1.27.3 and 8.4.2

The site actually works, but perfectionism requires that there be no errors in the logs.
Thank you!

It’s quite unrealistic to get rid of all the deprecation messages (at this current time).

Most of these deprecation messages are (usually) generated by installed extras.
If an extra uses the same code/version for MODX 2.x and MODX 3, it’s generally easier to just use the deprecated class (that works for both versions) than always checking the MODX version first.

You could create pull requests (or issues) on Github for every occurence of a deprecated class name in a MODX extra, but that would be very tedious (and quite pointless).


What you could do, is to convert your own custom code (custom snippets, custom plugins, …) to MODX 3 syntax to make it future-proof (and avoid some of the deprecation log messages).

For example if you have a line like this:

$resoure = $modx->getObject('modResource', $id);

Change it to

$resoure = $modx->getObject('MODX\\Revolution\\modResource', $id);

or

use MODX\Revolution\modResource;

...
$resoure = $modx->getObject(modResource::class, $id);

You may not want to do this, but turning off the log_deprecated System Setting should give you a nice clean Deprecations Log.