Page MenuHomePhabricator

Introduce WikiAwareEntityTrait
Closed, ResolvedPublic

Description

We have a WikiAwareEntity interface, shared by multiple classes already, and expected to be shared by more classes. We need to introduce a helper trait that would implement the interface methods. The implementation can be copied from PageIdentityValue, and the trait needs to be used in all implementing classes.

Additionally, we could introduce a deprecateInvalidCrossWikiAccess( string $deprecationVersion, $wikiId = self::LOCAL ) which would emit a nice deprecation warning if the wikiId passed doesn't match the expected wikiId. Method should be marked @internal. This will be rather useful during the transition.

Event Timeline

Change 662034 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Introduce helper WikiAwareEntityTrait

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

Change 662034 merged by jenkins-bot:
[mediawiki/core@master] Introduce helper WikiAwareEntityTrait

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

daniel triaged this task as High priority.