edit.php gives the wrong error message.
Here the problem was the page in question is protected.
It should say "Page is protected" not "... is older ...".
In fact as you see I used cat, so it has little way to know if it is older.
$ cat file | php edit.php Template:C [e7254eaf9ba8103aafe9fa00] [no req] MWException from line 4060 of /home/jidanni/mediawiki/includes/user/User.php: CAS update failed on user_touched for user ID '293' (read from replica); the version of the user to be saved is older than the current version. Backtrace: #0 /home/jidanni/mediawiki/includes/user/User.php(736): User->saveSettings() #1 /home/jidanni/mediawiki/maintenance/edit.php(57): User::newSystemUser(string, array) #2 /home/jidanni/mediawiki/maintenance/doMaintenance.php(95): EditCLI->execute() #3 /home/jidanni/mediawiki/maintenance/edit.php(107): require_once(string) #4 {main}
Trying again with --user WikiSysop works, proving the problem has
nothing to do with 'older'.
$ cat file | php edit.php --user WikiSysop Template:C Saving... done