From 447ca70da434eb7843afc9ae549ace71534be1e4 Mon Sep 17 00:00:00 2001 From: vagrant Date: Fri, 31 Jul 2020 15:50:17 +0000 Subject: [PATCH] GH-293: NotRegularDirectoryException thrown while scanning for Yaml Patterns Deriver --- src/Plugin/Deriver/AbstractYamlPatternsDeriver.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php index a9ce9625..98db5032 100644 --- a/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php +++ b/src/Plugin/Deriver/AbstractYamlPatternsDeriver.php @@ -58,6 +58,9 @@ public static function create(ContainerInterface $container, $base_plugin_id) { * {@inheritdoc} */ public function fileScanDirectory($directory) { + if (!is_dir($directory)) { + return []; + } $options = ['nomask' => $this->getNoMask()]; $extensions = $this->getFileExtensions(); $extensions = array_map('preg_quote', $extensions);