From cce01f897c33087bf5f8252730b88fc02ff9a23c Mon Sep 17 00:00:00 2001 From: crynobone Date: Thu, 21 Aug 2014 21:39:34 +0800 Subject: [PATCH] Prepare v2.1.5 release. Signed-off-by: crynobone --- docs/changes.md | 4 ++++ src/Extension/Finder.php | 18 ++++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/changes.md b/docs/changes.md index 0feddbc..0cdf18f 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -5,6 +5,10 @@ title: Extension Change Log ## Version 2.1 {#v2-1} +### v2.1.5 {#v2-1-5} + +* Add `Orchestra\Extension\Environment::register()` which allow explicitly register an extension on a custom path. + ### v2.1.4 {#v2-1-4} * Add `Orchestra\Extension\Environment::refresh()` method. diff --git a/src/Extension/Finder.php b/src/Extension/Finder.php index e168cb0..15cd109 100644 --- a/src/Extension/Finder.php +++ b/src/Extension/Finder.php @@ -20,13 +20,6 @@ class Finder */ protected $config = array(); - /** - * Extension lists. - * - * @var \Illuminate\Support\Collection|array - */ - protected $extensions = array(); - /** * List of paths. * @@ -85,9 +78,8 @@ class Finder */ public function __construct(Filesystem $files, array $config) { - $this->files = $files; - $this->config = $config; - $this->extensions = new Collection($this->extensions); + $this->files = $files; + $this->config = $config; $app = rtrim($config['path.app'], '/'); $base = rtrim($config['path.base'], '/'); @@ -123,6 +115,8 @@ public function addPath($path) */ public function detect() { + $extensions = array(); + // Loop each path to check if there orchestra.json available within // the paths. We would only treat packages that include orchestra.json // as an Orchestra Platform extension. @@ -137,12 +131,12 @@ public function detect() $name = (is_numeric($key) ? $this->guessExtensionNameFromManifest($manifest, $path) : $key); if (! is_null($name)) { - $this->extensions[$name] = $this->getManifestContents($manifest); + $extensions[$name] = $this->getManifestContents($manifest); } } } - return $this->extensions; + return new Collection($extensions); } /**