custom/plugins/FroshPlatformHtmlMinify/src/FroshPlatformHtmlMinify.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Frosh\HtmlMinify;
  3. use Composer\Autoload\ClassLoader;
  4. use Shopware\Core\Framework\Plugin;
  5. use Symfony\Component\DependencyInjection\ContainerBuilder;
  6. class FroshPlatformHtmlMinify extends Plugin
  7. {
  8.     public function build(ContainerBuilder $container): void
  9.     {
  10.         parent::build($container);
  11.         $file __DIR__ '/../vendor/autoload.php';
  12.         if (!is_file($file)) {
  13.             return;
  14.         }
  15.         $classLoader = require_once $file;
  16.         if ($classLoader instanceof ClassLoader) {
  17.             $classLoader->unregister();
  18.             $classLoader->register(false);
  19.         }
  20.     }
  21. }