Reply To: Compatibility issue with PHPMailer – Akeeba is guilty of writing safe code

Home Forums Quform WordPress Compatibility issue with PHPMailer – Akeeba is guilty of writing safe code Reply To: Compatibility issue with PHPMailer – Akeeba is guilty of writing safe code

#37828
Dirk
Participant

HI Ally!

Thanks again for the quick reply — I really appreciate your openness to fixing it in QuForm, even if it feels like a strange workaround from your point of view.

FYI: I had never ever any problems with akeeba! 😉

Just to clarify though: the use of class_exists(..., false) is actually a recommended practice in environments where multiple autoloaders (like Composer’s) may be present. It’s not about avoiding autoloading per se — it’s about preventing *double class declarations* when mixing legacy file includes and modern autoloading. This is especially relevant now that many plugins follow PSR-4 standards and load dependencies via Composer.

I do agree with your point that prefixing (via tools like Strauss) can help reduce conflicts even further — especially for shared libraries like PHPMailer. But in this case, the problem stems from WordPress loading a legacy shim for PHPMailer even though Composer already loaded the namespace version.

Thanks again for working towards a clean solution. I think everyone wins here — and many users will be spared from mysterious AJAX errors because of this small change.

Best regads, Dirk

Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy