Darkle Composer is supposed to do it automatically.
Something I'm not super sure is that our official Flarum update instructions use the Composer -a
flag, which creates an authoritative classmap file. I'm not sure what happens if subsequent commands are run without the -a
flag.
With the various a
, o
and other files Composer might generate a file that contains the definitive list of all classes that exist. But apparently there might be situations where Composer doesn't update it yet continues to use it. I'm really not certain.
Personally I generally only use Composer without any of these flags. It might not be the most performant to run in production, but it's the least likely to break.