Closed stevebauman closed 1 year ago
Hi @ezyang. Would it be possible to tag a new release which includes this fix?
:tada: This PR is included in version 4.17.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
This PR removes the usage of the secondary argument in
class_exists()
checks in HTML Purifier. This secondary argument is being used to disable autoloading the class if it has not yet been autoloaded.The current implementation breaks composer based projects where a class may not have been included or required yet via composers autoloader, but has been registered as a definition cache:
Upon usage:
This exception can be resolved by
require
'ing orinclude
'ing the class manually, or via aspl_autoload_call($cache)
:However, this should not be necessary in todays PHP, as class strings are frequently used as a way to dynamically register implementations of things, and removing the secondary argument in
class_exists()
results in the definition cache being properly registered and used.