wp-includes/php-ai-client/third-party/Http/Discovery/ClassDiscovery.php:211We need a "safe" version of PHP's "class_exists" because Magento has a bug (or they call it a "feature"). Magento is throwing an exception if you do class_exists() on a class that ends with "Factory" and if that file does not exits.
$classstringbool public static function safeClassExists($class) { try { return class_exists($class) || interface_exists($class); } catch (\Exception $e) { return \false; } }Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/php-ai-client/third-party/Http/Discovery/ClassDiscovery.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.