Using ^ or ~ as version constraint is wrongfully marked by CheckComposerLockUpToDate as invalid dependency.
$ php maintenance/update.php MediaWiki 1.29.1 Updater mediawiki/semantic-media-wiki: 2.5.4 installed, ~2.5 required. Error: your composer.lock file is not up to date. Run "composer update" to install newer dependencies
The check $installed[$name]['version'] !== $version does not take into account a ^ or ~ as constraint which then obviously fails on comparing 2.5.4 to ~2.5.
$installed = $lock->getInstalledDependencies(); foreach ( $json->getRequiredDependencies() as $name => $version ) { if ( isset( $installed[$name] ) ) { if ( $installed[$name]['version'] !== $version ) {
Please use [0] as reference when comparing and validate version constraints.