This is announcement of a breaking change without deprecation, per the Stable Interface Policy.

If you have any objections, concerns or questions, please respond to this email as soon as possible.

What will change? We are adding two methods to the DBPrimaryPos interface. Any classes implementing that interface will break if they do not implement these methods. Other usage of the class, such as calling methods, is unaffected. The change will be part of the 1.39 release.

Why is the change needed? We need a plain data representation of the DBPrimaryPos objects, so they can be stored in a cache without relying on native PHP serialization of objects. Native PHP serialization should be avoided because it is brittle and insecure. Issues may arise particularly when the class in question changes or PHP itself is updated. The problem that prompted this change is T316601.

Why is deprecation not feasible? There is no backwards compatible way in PHP to add methods to an interface, nor is there a way to warn classes that are lacking the new methods. For this reason, it is generally recommended to provide a base class rather than expecting extensions to implement an interface directly. In this case however, there is no base class, and the interface isĀ  marked as stable to implement. But there appear to be no classes in extensions that implement the interface in question, so it seems reasonable to just add the methods.

--
Daniel Kinzler
Principal Software Engineer, Platform Engineering
Wikimedia Foundation