From e7f2e62cec4b51b85a0594202906296697e577d3 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 8 Jun 2015 14:56:49 +0930 Subject: [PATCH] Load extensions from the root directory, with precedence. --- .../src/Support/Extensions/ExtensionsServiceProvider.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/core/src/Support/Extensions/ExtensionsServiceProvider.php b/framework/core/src/Support/Extensions/ExtensionsServiceProvider.php index 2a48d06b3..a46a7f332 100644 --- a/framework/core/src/Support/Extensions/ExtensionsServiceProvider.php +++ b/framework/core/src/Support/Extensions/ExtensionsServiceProvider.php @@ -22,11 +22,12 @@ class ExtensionsServiceProvider extends ServiceProvider $providers = []; foreach ($extensions as $extension) { - if (file_exists($file = base_path().'/extensions/'.$extension.'/bootstrap.php')) { + if (file_exists($file = public_path().'/extensions/'.$extension.'/bootstrap.php') || + file_exists($file = base_path().'/extensions/'.$extension.'/bootstrap.php')) { $providers[$extension] = require $file; } } - // @todo store $providers somewhere so that extensions can talk to each other + // @todo store $providers somewhere (in Core?) so that extensions can talk to each other } }