Hello flarum community or the desperate Google researcher friend, today I faced a very unique problem.
Which was caused on my end, due to OPCache.
Error booting Flarum: Class AntoineFr\Money\Listeners\LoadSettingsFromDatabase does not exist
Installing any extension threw the error above. (Obviously different class name for different extensions.) After some mad research, and help of @jordanjay29 figured it out why.
Our friendly neighbourhood OPCache was causing the issue!
I had the
opcache.validate_timestamps=0 line in my
This basically says the server that it should cache everything, and NEVER check if there are any changes. Naturally installing new extensions indeed did install them. However, since OPCache was set in a way to ignore changes it never knew what changed.
So just decided to throw
Class ... does not exists in my face.
To fix this make sure that you don't validate timestamps forever, or simply remove it completely so that it never caches anything. (Recommended for usage of Flarum.)
I hope that it helps someone in the future.