maintenance v1.1.2
Fixed: swapping the formatter threw away every extension's formatting
If you run this extension, update. This one is serious and it fails silently.
FormatterHealthProvider replaced the resolved flarum.formatter with a new
SelfHealingFormatter built from the original's cache and cache directory. But a
formatter's behaviour does not live in its constructor arguments — it lives in
four callback arrays that every formatting extension appends to after
construction, via addConfigurationCallback() and its siblings.
A brand-new Formatter has all four empty. So the swap discarded markdown,
BBCode, emoji, mentions and every custom tag any extension had contributed, and
handed back a formatter configured with nothing.
Nothing surfaced it, because nothing failed. No exception, no 500. It rendered
perfectly — for a configuration that was now empty:
**bold** stayed literal.
- Stored post XML still carried
<IMG> tags from when markdown was
configured, and the renderer no longer had a template for them, so every
image in every post silently disappeared, along with the markup around it.
On my own forum this presented as "the images in posts are broken" and as a
storefront rendering its READMEs as raw text. Both were the same missing
pipeline.
The four arrays are carried across to the replacement now, and the bail-out
guard checks them — a missing callback array is exactly the "half-built" case
the guard already claimed to protect against, and it was the one thing it never
looked at.
Verified on a live install: **bold** → <strong>, # Heading → <h1>,
 → <img>, a storefront listing back to 6 images and 18 headings
with zero literal asterisks, and a forum post back to 15 images.
Also fixed: setAccessible() is deprecated in PHP 8.5
The same provider read core's constructor arguments via reflection and called
ReflectionProperty::setAccessible(true) — no-op since PHP 8.1, deprecated in
8.5. On PHP 8.5 that threw while the formatter was being resolved. Dropped; the
reflection read works without it.
View release on GitHub