/**
  * This method has side effects, so it is not the constructor.
  *
  * @param ClassFinderInterface $finder
  * @param CacheManager $cacheManager
  *
  * @return self
  *
  * @throws \Exception
  */
 static function create($finder, $cacheManager)
 {
     /** @var self $loader */
     $loader = new static($finder);
     $cacheManager->observeCachePrefix($loader);
     return $loader;
 }
 /**
  * This method has side effects, so it is not the constructor.
  *
  * @param ClassFinderInterface $finder
  * @param CacheManager $cacheManager
  *
  * @return self
  *
  * @throws \Exception
  */
 static function create($finder, $cacheManager)
 {
     /** @var self $loader */
     $loader = new static($finder);
     if (!$loader->checkRequirements()) {
         $class = get_class($loader);
         throw new CacheNotSupportedException("Unable to use {$class}, because the respetive PHP extension is not enabled.");
     }
     $cacheManager->observeCachePrefix($loader);
     return $loader;
 }