Matomo extension for Mediawiki breaks with new version of mediawiki

I use https://www.mediawiki.org/wiki/Extension_talk:Matomo on my mediawiki. With a recent update to mediawiki, the extension now breaks my wiki so I had to disable it. Other users have had the same issue, and one has proposed a solution on github (https://github.com/DaSchTour/matomo-mediawiki-extension/issues/38) Could you please have a look at what it takes to fix the extension?