On MW 1.39.0 and .1 and PHP 8.1.2-1ubuntu2.9, I am trying to revise a parserhook extension to mediawiki that uses wfParseUrl(). https://doc.wikimedia.org/mediawiki-core/master/php/GlobalFunctions_8php.html#a178b2b51ef87926e5daa08f66fbae9b0 says that is deprecated and I should use UrlUtils::parse().
The former looks like a function and the latter looks like a class, perhaps a subclass of Utils. My first question is what if any use statement do I need. The extension already has use Html, but use UrlUtils gives an error because it can't be found. Do I need to instantiate Utils or UrlUtils and invoke the urlparser as $urlUtils -> parse()? When I invoke UrlUtils::parse I get a complaint about calling a non-static method statically. The old code was $url_parts = wfParseUrl( $graph_url ); and the new $url_parts = UrlUtils::parse( $graph_url ); Any help would be appreciated. Tim
_______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/