From cb165e1d39f11e159915cf0b3bfccd752cefce48 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 23 Mar 2018 10:10:57 +1300 Subject: [PATCH] BUG Don't filter modules by type Fixes https://github.com/silverstripe/silverstripe-framework/issues/7948 --- src/Library.php | 5 ----- src/VendorPlugin.php | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Library.php b/src/Library.php index fc43db4..f4e6a42 100644 --- a/src/Library.php +++ b/src/Library.php @@ -226,11 +226,6 @@ public function getExposedFolders() { $data = $this->getJson(); - // Only expose if correct type - if (empty($data['type']) || !preg_match(VendorPlugin::MODULE_FILTER, $data['type'])) { - return []; - } - // Get all dirs to expose if (empty($data['extra']['expose'])) { return []; diff --git a/src/VendorPlugin.php b/src/VendorPlugin.php index 1f825fe..438e8e7 100644 --- a/src/VendorPlugin.php +++ b/src/VendorPlugin.php @@ -26,12 +26,14 @@ class VendorPlugin implements PluginInterface, EventSubscriberInterface, Capable /** * Default module type * - * @deprecated 1.3..2.0 Use MODULE_FILTER instead + * @deprecated 1.3..2.0 No longer used */ const MODULE_TYPE = 'silverstripe-vendormodule'; /** * Filter for matching library types to expose + * + * @deprecated 1.3..2.0 No longer used */ const MODULE_FILTER = '/^silverstripe\-(\w+)$/'; @@ -113,7 +115,7 @@ public function getLibrary(PackageEvent $event) { // Ensure package is the valid type $package = $this->getOperationPackage($event); - if (!$package || !preg_match(self::MODULE_FILTER, $package->getType())) { + if (!$package) { return null; }