Page MenuHomePhabricator

Deprecate and remove QueryPage::getSQL()
Open, LowPublic

Description

Unused and discouraged. Can be replaced with getQueryInfo(). Step-by-step instructions: T244138#5862888.

Event Timeline

How to get to the source code for this ?
I want to take this issue.

getQueryInfo() is returning null in the code and getSQL() is returning string in the code. I am not able to understand how can be getQueryInfo() overrided?

@Poojayadav12 Hi I'm currently in 2nd year Btech from HBTU Kanpur.

How did you get the source code for this task. Can you help me out ?

getQueryInfo() is returning null in the code and getSQL() is returning string in the code. I am not able to understand how can be getQueryInfo() overrided?

There are many examples of overriding this method. The null is just a dummy value.

How did you get the source code for this task. Can you help me out ?

See @Aklapper's comment above:

This is about the mediawiki/core repository (see the tags here). Please see https://www.mediawiki.org/wiki/Gerrit/Tutorial and https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker - thanks! :)

You will find both methods in includes/specialpage/QueryPage.php in mediawiki/core repository.

@matej_suchanek So do you mean I should replace getSQL() by getQueryInfo() and where we called getQueryInfo() function I should simply write it as null?

matej_suchanek moved this task from Unsorted to Migrate / Replace on the Technical-Debt board.

Certainly no. First, mark getSQL as @deprecated and note it in RELEASE-NOTES-1.35. Then, where getSQL() is overriden, getQueryInfo() must be overriden instead. Also getSQL() shouldn't be called anywhere. This applies to all extensions but does not to file includes/specialpage/QueryPage.php. You can use code search to locate files to be updated. They will probably be in separate repositories, not in mediawiki/core.

Eventually, getSQL will be removed and QueryPage.php simplified.

im trying to clone a repository but it is giving this error.

C:\xampp\htdocs>git clone ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser
Cloning into 'CheckUser'...
ssh: connect to host gerrit.wikimedia.org port 29418: Network is unreachable
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Please read https://www.mediawiki.org/wiki/Gerrit/Tutorial.

If you haven't already, create an account in Gerrit.
Then make sure you have synced correct SSH keys.
Then use git clone "ssh://USERNAME@gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser" where USERNAME is your Gerrit username.

(Hint: if you have also cloned MediaWiki, clone extensions to extensions/ folder.)

Change 668550 had a related patch set uploaded (by Zabe; owner: Zabe):
[mediawiki/core@master] Soft deprecate QueryPage::getSQL()

https://gerrit.wikimedia.org/r/668550

Zabe moved this task from Backlog to Deprecation on the User-Zabe board.
Zabe removed Zabe as the assignee of this task.May 5 2021, 9:34 AM

not actively working on this

Change 668550 merged by jenkins-bot:

[mediawiki/core@master] Hard deprecate QueryPage::getSQL()

https://gerrit.wikimedia.org/r/668550

matej_suchanek changed the task status from Open to Stalled.Jun 16 2022, 3:16 PM
matej_suchanek moved this task from Migrate / Replace to Needs removal on the Technical-Debt board.

Obsolete behavior MAY be removed after it has been hard deprecated for three months in the development version (the master branch) as well as in one major release

matej_suchanek changed the task status from Stalled to Open.Nov 7 2022, 10:40 AM