patchdemo icon indicating copy to clipboard operation
patchdemo copied to clipboard

Update scripts to use run.php

Open catrope opened this issue 2 years ago • 1 comments

Every maintenance script invocation in PatchDemo now outputs the following warning:

+ php /var/www/html/wikis/9c7b8d9c84/w/maintenance/createAndPromote.php Alice patchdemo1

*******************************************************************************
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.
*******************************************************************************

done.

(For context, run.php was added by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/783428/ )

catrope avatar Jan 19 '23 23:01 catrope

Patch demo also supports creating wikis with older versions (I confirmed this works at least back to REL1_35, older versions may not work due to tooling incompatibilities), so this should be conditional or using a wrapper script of our own, which sounds annoying to add. Honestly I'd rather leave it like this until someone removes the ability to run scripts the old way, which I hope won't happen for some years ;)

I believe the warning is not supposed to be shown for automated processes like this, only in terminals (see https://gerrit.wikimedia.org/r/c/mediawiki/core/+/876792), so I'm not sure why it appears. Maybe that can be fixed instead.

MatmaRex avatar Jan 20 '23 00:01 MatmaRex