Right now, mwscript produces the warning about running maintenance scripts directly on group0 and group1 (though not yet on group2):
lucaswerkmeister-wmde@mwmaint1002:~$ mwscript version.php testwiki ******************************************************************************* NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead! Running scripts directly has been deprecated in MediaWiki 1.40. It may not work for some (or any) scripts in the future. ******************************************************************************* MediaWiki version: 1.40.0-wmf.18 (built: 00:17, 10 January 2023) lucaswerkmeister-wmde@mwmaint1002:~$ mwscript version.php metawiki ******************************************************************************* NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead! Running scripts directly has been deprecated in MediaWiki 1.40. It may not work for some (or any) scripts in the future. ******************************************************************************* MediaWiki version: 1.40.0-wmf.18 (built: 00:17, 10 January 2023) lucaswerkmeister-wmde@mwmaint1002:~$ mwscript version.php enwiki MediaWiki version: 1.40.0-wmf.17 (built: 21:41, 2 January 2023)
mwscript should use run.php to avoid this warning.