Repository navigation
Millwright 1.2.1
Installing an extension could take a site down, and this fixes it.
Flarum caches a serialized s9e renderer in the cache store, and that object references a generated PHP class under storage/formatter. cache:clear empties the store first and that directory second — so a page view landing between the two steps regenerates the class, caches the object, and then has the class deleted from under it. Every post render then dies with __PHP_Incomplete_Class returned.
The symptom is the dangerous kind: the front page and discussion list still return 200 because they render no post content. Only opening a discussion fails, so a site can sit broken unnoticed.
Millwright's finalise step now clears, removes the generated class, and clears again, so the end state is always consistent — whatever a request does in between is regenerated correctly afterwards. Ordering alone cannot fix this; only the final state can.