public function getExtensionNames(BundleInterface $bundle)
 {
     $extensions = $this->getExtensionDirectories($bundle->getPath());
     array_walk($extensions, function (&$path) {
         $path = basename($path);
     });
     if ($bundle instanceof LegacyBundleInterface) {
         $extensions = array_merge($extensions, $bundle->getLegacyExtensionsNames());
     }
     return $extensions;
 }