diff --git a/plugins/baser-core/src/Utility/BcUtil.php b/plugins/baser-core/src/Utility/BcUtil.php index fa920274bc..d769914fa2 100644 --- a/plugins/baser-core/src/Utility/BcUtil.php +++ b/plugins/baser-core/src/Utility/BcUtil.php @@ -483,6 +483,7 @@ static public function includePluginClass($pluginName) if (!$pluginPath) { return false; } + $name = Inflector::camelize($name, '-'); if(file_exists($pluginPath . 'src' . DS . 'Plugin.php')) { $pluginClassPath = $pluginPath . 'src' . DS . 'Plugin.php'; } elseif(file_exists($pluginPath . 'src' . DS . $name . 'Plugin.php')) { diff --git a/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php b/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php index e79d629d07..cb9a9d2343 100644 --- a/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php +++ b/plugins/baser-core/tests/TestCase/View/Helper/BcCkeditorHelperTest.php @@ -136,7 +136,7 @@ public function testSetEditorToolbar() 'editorToolType' => 'simple' ]); $this->assertIsArray($options['editorToolbar']); - (new \BcEditorTemplate\Plugin())->install(['connection' => 'test']); + (new \BcEditorTemplate\BcEditorTemplatePlugin())->install(['connection' => 'test']); $options = $this->BcCkeditor->setEditorToolbar([ 'editorToolbar' => [], 'editorUseTemplates' => true, diff --git a/plugins/bc-content-link/tests/TestCase/PluginTest.php b/plugins/bc-content-link/tests/TestCase/PluginTest.php index 8b43b00278..8fc241e989 100644 --- a/plugins/bc-content-link/tests/TestCase/PluginTest.php +++ b/plugins/bc-content-link/tests/TestCase/PluginTest.php @@ -11,14 +11,14 @@ namespace BcContentLink\Test\TestCase; -use BcContentLink\Plugin; +use BcContentLink\BcContentLinkPlugin; use BcContentLink\Service\ContentLinksServiceInterface; use Cake\Core\Container; use BaserCore\TestSuite\BcTestCase; /** * Class PluginTest - * @property Plugin $Plugin + * @property BcContentLinkPlugin $Plugin */ class PluginTest extends BcTestCase { @@ -31,7 +31,7 @@ class PluginTest extends BcTestCase public function setUp(): void { parent::setUp(); - $this->Plugin = new Plugin(['name' => 'BcContentLink']); + $this->Plugin = new BcContentLinkPlugin(['name' => 'BcContentLink']); } /** diff --git a/plugins/bc-custom-content/plugins/BcCcAutoZip/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcAutoZip/src/BcCcAutoZipPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcAutoZip/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcAutoZip/src/BcCcAutoZipPlugin.php index e5c79355c6..2f1db60f4e 100644 --- a/plugins/bc-custom-content/plugins/BcCcAutoZip/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcAutoZip/src/BcCcAutoZipPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcAutoZipPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcCheckbox/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcCheckbox/src/BcCcCheckboxPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcCheckbox/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcCheckbox/src/BcCcCheckboxPlugin.php index 97b10b5b34..e89eb537fb 100644 --- a/plugins/bc-custom-content/plugins/BcCcCheckbox/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcCheckbox/src/BcCcCheckboxPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcCheckboxPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcDate/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcDate/src/BcCcDatePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcDate/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcDate/src/BcCcDatePlugin.php index 3d4e4e6eb7..010fbb9830 100644 --- a/plugins/bc-custom-content/plugins/BcCcDate/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcDate/src/BcCcDatePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcDatePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcDateTime/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcDateTime/src/BcCcDateTimePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcDateTime/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcDateTime/src/BcCcDateTimePlugin.php index 67f7bb4a80..dd0636eceb 100644 --- a/plugins/bc-custom-content/plugins/BcCcDateTime/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcDateTime/src/BcCcDateTimePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcDateTimePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcEmail/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcEmail/src/BcCcEmailPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcEmail/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcEmail/src/BcCcEmailPlugin.php index 5e8b350ec4..836521f999 100644 --- a/plugins/bc-custom-content/plugins/BcCcEmail/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcEmail/src/BcCcEmailPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcEmailPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcFile/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcFile/src/BcCcFilePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcFile/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcFile/src/BcCcFilePlugin.php index 46a8d4364a..0559ee6404 100644 --- a/plugins/bc-custom-content/plugins/BcCcFile/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcFile/src/BcCcFilePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcFilePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcHidden/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcHidden/src/BcCcHiddenPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcHidden/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcHidden/src/BcCcHiddenPlugin.php index 167b7f2de5..0e5115702c 100644 --- a/plugins/bc-custom-content/plugins/BcCcHidden/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcHidden/src/BcCcHiddenPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcHiddenPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcMultiple/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcMultiple/src/BcCcMultiplePlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcMultiple/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcMultiple/src/BcCcMultiplePlugin.php index fe7cc6b28f..1e009f5f70 100644 --- a/plugins/bc-custom-content/plugins/BcCcMultiple/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcMultiple/src/BcCcMultiplePlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcMultiplePlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcPassword/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcPassword/src/BcCcPasswordPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcPassword/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcPassword/src/BcCcPasswordPlugin.php index 25fc120ebc..cae65099b9 100644 --- a/plugins/bc-custom-content/plugins/BcCcPassword/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcPassword/src/BcCcPasswordPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcPasswordPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcPref/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcPref/src/BcCcPrefPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcPref/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcPref/src/BcCcPrefPlugin.php index 25ed4649e6..46c63ab8c4 100644 --- a/plugins/bc-custom-content/plugins/BcCcPref/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcPref/src/BcCcPrefPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcPrefPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcRadio/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcRadio/src/BcCcRadioPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcRadio/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcRadio/src/BcCcRadioPlugin.php index 62eae6a065..c447af9a70 100644 --- a/plugins/bc-custom-content/plugins/BcCcRadio/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcRadio/src/BcCcRadioPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcRadioPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcRelated/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcRelated/src/BcCcRelatedPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcRelated/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcRelated/src/BcCcRelatedPlugin.php index ed57dda5ba..0a02c9602f 100644 --- a/plugins/bc-custom-content/plugins/BcCcRelated/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcRelated/src/BcCcRelatedPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcRelatedPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcSelect/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcSelect/src/BcCcSelectPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcSelect/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcSelect/src/BcCcSelectPlugin.php index da1c3f1011..d78828fedb 100644 --- a/plugins/bc-custom-content/plugins/BcCcSelect/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcSelect/src/BcCcSelectPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcSelectPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcTel/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcTel/src/BcCcTelPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcTel/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcTel/src/BcCcTelPlugin.php index 9e7630b4cc..890fc7990d 100644 --- a/plugins/bc-custom-content/plugins/BcCcTel/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcTel/src/BcCcTelPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcTelPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcText/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcText/src/BcCcTextPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcText/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcText/src/BcCcTextPlugin.php index ce3a137d4a..ee5afd4f9b 100644 --- a/plugins/bc-custom-content/plugins/BcCcText/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcText/src/BcCcTextPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcTextPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcTextarea/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcTextarea/src/BcCcTextareaPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcTextarea/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcTextarea/src/BcCcTextareaPlugin.php index fe337608d8..08fa87c4b7 100644 --- a/plugins/bc-custom-content/plugins/BcCcTextarea/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcTextarea/src/BcCcTextareaPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcTextareaPlugin extends BcPlugin { /** diff --git a/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/Plugin.php b/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/BcCcWysiwygPlugin.php similarity index 95% rename from plugins/bc-custom-content/plugins/BcCcWysiwyg/src/Plugin.php rename to plugins/bc-custom-content/plugins/BcCcWysiwyg/src/BcCcWysiwygPlugin.php index 3746e9b5a5..1c28ab8ed4 100644 --- a/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/Plugin.php +++ b/plugins/bc-custom-content/plugins/BcCcWysiwyg/src/BcCcWysiwygPlugin.php @@ -20,7 +20,7 @@ /** * Plugin */ -class Plugin extends BcPlugin +class BcCcWysiwygPlugin extends BcPlugin { /** diff --git a/plugins/bc-search-index/tests/TestCase/PluginTest.php b/plugins/bc-search-index/tests/TestCase/PluginTest.php index 7859a87b7b..c15d52cd9b 100644 --- a/plugins/bc-search-index/tests/TestCase/PluginTest.php +++ b/plugins/bc-search-index/tests/TestCase/PluginTest.php @@ -11,7 +11,7 @@ namespace BcSearchIndex\Test\TestCase; -use BcSearchIndex\Plugin; +use BcSearchIndex\BcSearchIndexPlugin; use BcSearchIndex\Service\Admin\SearchIndexesAdminServiceInterface; use BcSearchIndex\Service\SearchIndexesServiceInterface; use Cake\Core\Container; @@ -19,7 +19,7 @@ /** * Class PluginTest - * @property Plugin $Plugin + * @property BcSearchIndexPlugin $Plugin */ class PluginTest extends BcTestCase { @@ -32,7 +32,7 @@ class PluginTest extends BcTestCase public function setUp(): void { parent::setUp(); - $this->Plugin = new Plugin(['name' => 'BcSearchIndex']); + $this->Plugin = new BcSearchIndexPlugin(['name' => 'BcSearchIndex']); } /**