Not deprecated way to get Title object of the current page
Hello everyone! What is the right way to get the Title object of the current page when I write an extesnion? I have used $wgTitle and $wgArticle for that but now they both are going to be deprecated. There is no information of alternatives neither on Manual:$wgArticle nor on Manual:$wgTitle.
The way I found seem like wrong and horrible workaround:
Title::newFromText($wgRequest->getText('title'))
You should not need to use that to get a Title object, but rather get from an object you get in your hook or parser function: Parser, OutputPage, Skin and other have a Title object that you can get by calling their getTitle() method. There is however no replacement for $wgArticle; if you need one you will need to create it, but some parts from the Article class are now also available in Title.
Oh, that's clear now, thanks! I'll figure out the details and added the description to the Manual:$wgArticle and Manual:$wgTitle pages.