vendor/symfony/webpack-encore-bundle/src/EventListener/ExceptionListener.php line 26

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Symfony WebpackEncoreBundle package.
  4. * (c) Fabien Potencier <fabien@symfony.com>
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. namespace Symfony\WebpackEncoreBundle\EventListener;
  9. use Symfony\WebpackEncoreBundle\Asset\EntrypointLookupCollection;
  10. class ExceptionListener
  11. {
  12. private $entrypointLookupCollection;
  13. private $buildNames;
  14. public function __construct(EntrypointLookupCollection $entrypointLookupCollection, array $buildNames)
  15. {
  16. $this->entrypointLookupCollection = $entrypointLookupCollection;
  17. $this->buildNames = $buildNames;
  18. }
  19. public function onKernelException(): void
  20. {
  21. foreach ($this->buildNames as $buildName) {
  22. $this->entrypointLookupCollection->getEntrypointLookup($buildName)->reset();
  23. }
  24. }
  25. }