diff --git a/modules/system/classes/PluginManager.php b/modules/system/classes/PluginManager.php index 35300f6bf..a92ea6490 100644 --- a/modules/system/classes/PluginManager.php +++ b/modules/system/classes/PluginManager.php @@ -363,7 +363,9 @@ class PluginManager { $classId = $this->getIdentifier($namespace); - return isset($this->plugins[$classId]); + $normalized = $this->normalizeIdentifier($classId); + + return isset($this->plugins[$normalized]); } /** @@ -707,13 +709,11 @@ class PluginManager $loopCount = 0; while (count($checklist)) { - if (++$loopCount > 999) { throw new ApplicationException('Too much recursion'); } foreach ($checklist as $code => $plugin) { - /* * Get dependencies and remove any aliens */ @@ -745,9 +745,7 @@ class PluginManager array_push($result, $code); unset($checklist[$code]); } - } - return $result; } diff --git a/tests/unit/system/classes/PluginManagerTest.php b/tests/unit/system/classes/PluginManagerTest.php index 445d709ea..9130b926c 100644 --- a/tests/unit/system/classes/PluginManagerTest.php +++ b/tests/unit/system/classes/PluginManagerTest.php @@ -117,10 +117,10 @@ class PluginManagerTest extends TestCase * Test case for https://github.com/octobercms/october/pull/4337 */ $result = $this->manager->hasPlugin('dependencyTest\Wrongcase'); - $this->assertFalse($result); + $this->assertTrue($result); $result = $this->manager->hasPlugin('dependencyTest.Wrongcase'); - $this->assertFalse($result); + $this->assertTrue($result); } public function testGetPluginNamespaces()