Today, PCS registers its autoloader using spl_autoload_register(). Unfortunately, composer then registers the application's autoloader using the 'prepend' flag. So, when a unknown symbol is referenced, the application autoloader is called first.
Consequences :
As the composer autoloader is much slower than the PCS one, it causes an important performance hit,
More important : if some user code defines the referenced class, it will be loaded and will override the one defined by a PHP extension. This is not the behavior we want as it should be impossible to override these classes.
Solution to investigate :
Intercept autoloading process at the EG(autoload_func) level. Attempt PCS autoload, and then call the usual handler (SPL or __autoload()).
As spl_autoload_register() always modifies EG(autoload_func), intercept this function and always restore PCS first.
Today, PCS registers its autoloader using spl_autoload_register(). Unfortunately, composer then registers the application's autoloader using the 'prepend' flag. So, when a unknown symbol is referenced, the application autoloader is called first.
Consequences :
Solution to investigate :