Deferred from the codebase convergence work. Every fix here renames or reshapes a published symbol of this library, so it is a backward-compatibility break and was deliberately left out of the non-breaking follow-up.
Summary
BehatScreenshotExtension reads its own MOD_ID constant two different ways, and the two are not equivalent for subclasses.
Details
getConfigKey() uses self::MOD_ID.
load() uses static::MOD_ID.
MOD_ID is a public constant on a non-final extension class. A consumer rebranding the extension by subclassing it and overriding the constant gets the overridden value in load() but the original in getConfigKey() - so half the rebrand works and half does not, silently.
This is not a style question. Converging on self:: locks the constant against subclass override; converging on static:: makes overriding it work consistently. Either is defensible, but the current mix produces behaviour nobody chose, and picking either changes what an existing subclass does.
Deferred from the codebase convergence work. Every fix here renames or reshapes a published symbol of this library, so it is a backward-compatibility break and was deliberately left out of the non-breaking follow-up.
Summary
BehatScreenshotExtensionreads its ownMOD_IDconstant two different ways, and the two are not equivalent for subclasses.Details
getConfigKey()usesself::MOD_ID.load()usesstatic::MOD_ID.MOD_IDis a public constant on a non-final extension class. A consumer rebranding the extension by subclassing it and overriding the constant gets the overridden value inload()but the original ingetConfigKey()- so half the rebrand works and half does not, silently.This is not a style question. Converging on
self::locks the constant against subclass override; converging onstatic::makes overriding it work consistently. Either is defensible, but the current mix produces behaviour nobody chose, and picking either changes what an existing subclass does.