When creating PageIdentity (T208776) we decided that the getId() method should require a wiki ID to be passed in if the page belongs to a wiki other than the local site. The same patter should be applied to all getters on entity objects that return an ID that is likely to be used as a foreign key in a database table, to avoid data corruption.
After doing this for RevisionRecord::getId() (T272485), we should also do it for RevisionRecord::getPageId().
Note that the change to the method signature is not a breaking one, since the parameter would be optional. However, it's a breaking change in behavior: code that loads a RevisionRecord from another wiki and then calls getPageId() on it will need to be updated. So this change needs to go through the deprecation process.
- make RevisionRecord::getPageId() trigger a deprecation warning when called without parameters, if it doesn't belong to the local wiki ($this->mWikiId is not false).
- make RevisionRecord's trigger a deprecation warning when $wikiId does not match the $page parameter's wiki.
- make RevisionRecord::getPageId() throw an exception if the $wikiId parameter does not match the $this->mWikiId field. Compare RevisionRecord::getId().
- make RevisionRecord's constructor throw an exception when $wikiId does not match the $page parameter's wiki.