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

Xon

Well-known member
Affected version
2.0
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
 
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.
 
Oh, I should mention that 2.1 has this, though it's sort of mooted a bit, as profile posts don't use it any longer (and they were the most common place that used structured text).
 
Back
Top Bottom