From 458f4f811cf6590db4f51b8a6deea97e30cac346 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Sat, 13 Feb 2016 20:32:46 +0100 Subject: [PATCH] fixes #799, now properly assigning a id --- src/Extension/Extension.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Extension/Extension.php b/src/Extension/Extension.php index 33ad9ff9b..22f9f2380 100644 --- a/src/Extension/Extension.php +++ b/src/Extension/Extension.php @@ -86,9 +86,18 @@ class Extension implements Arrayable */ public function __construct($path, $composerJson) { - $this->id = end(explode('/', $path)); $this->path = $path; $this->composerJson = $composerJson; + $this->assignId(); + } + + /** + * Assigns the id for the extension used globally. + */ + protected function assignId() + { + $segments = explode('/', $this->path); + $this->id = end($segments); } /**