diff --git a/.travis.yml b/.travis.yml index 9050786..443222a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: php php: + - 5.5 - 5.6 - 7.0 - 7.1 diff --git a/composer.json b/composer.json index f357970..b72f3fe 100644 --- a/composer.json +++ b/composer.json @@ -12,17 +12,18 @@ } ], "require": { - "illuminate/console": "5.2.*|5.3.*", - "illuminate/container": "5.2.*|5.3.*", - "illuminate/contracts": "5.2.*|5.3.*", - "illuminate/events": "5.2.*|5.3.*", - "illuminate/filesystem": "5.2.*|5.3.*", - "illuminate/support": "5.2.*|5.3.*", + "php": "^5.5.9|^7.0", + "illuminate/console": "^5.2", + "illuminate/container": "^5.2", + "illuminate/contracts": "^5.2", + "illuminate/events": "^5.2", + "illuminate/filesystem": "^5.2", + "illuminate/support": "^5.2", "jumilla/laravel-source-generator": "^1.1" }, "require-dev": { - "illuminate/config": "5.2.*|5.3.*", - "phpunit/phpunit": "~4.0", + "illuminate/config": "^5.2", + "phpunit/phpunit": "^4.0|^5.0", "mockery/mockery": "~0.9" }, "autoload": { diff --git a/sources/AliasResolver.php b/sources/AliasResolver.php index bb14a3d..3ff28bd 100644 --- a/sources/AliasResolver.php +++ b/sources/AliasResolver.php @@ -3,12 +3,10 @@ namespace Jumilla\Addomnipot\Laravel; use Illuminate\Config\Repository; -use Illuminate\Console\AppNamespaceDetectorTrait; +use Illuminate\Container\Container; class AliasResolver { - use AppNamespaceDetectorTrait; - /** * @var static */ @@ -125,4 +123,14 @@ class_alias($originalClassName, $className); return false; } + + /** + * Get the application namespace. + * + * @return string + */ + protected function getAppNamespace() + { + return Container::getInstance()->getNamespace(); + } }