Future fix XF\Service\StructuredText\Preparer does not have a reference to the context entity

Affected version


Well-known member
XF\Service\Message\Preparer has a messageEntity reference (and other Preparer services do), but XF\Service\StructuredText\Preparer does not.

The entity is quite useful if you want to extend the Preparer, otherwise you need to push up to the next layer to get that reference


XenForo developer
Staff member
While a reasonable idea, unfortunately, this isn't the sort of thing that can really be changed within 2.0 because it involves changing a method signature. While the calls would be backwards compatible (as it'd default to null), any class extensions that extend the constructor would fail. Now that we have reached the stable releases, changing method signatures (particularly where there may already be extensions) is something we avoid.

This would be a reasonable change for something like 2.1 though. It shouldn't be a particularly difficult addition.
Reactions: Xon