diff --git a/composer.json b/composer.json index f8848ab8..b6405920 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,8 @@ "require": { "php": ">=5.3.0", "ext-fileinfo": "*", - "illuminate/support": "4.1.*" + "illuminate/support": "4.1.*", + "illuminate/config": "4.1.*" }, "require-dev": { "phpunit/phpunit": "3.*", diff --git a/src/Intervention/Image/ImageManager.php b/src/Intervention/Image/ImageManager.php index 2f8aee56..600706d6 100644 --- a/src/Intervention/Image/ImageManager.php +++ b/src/Intervention/Image/ImageManager.php @@ -2,6 +2,10 @@ namespace Intervention\Image; +use Illuminate\Config\Repository as Config; +use Illuminate\Config\FileLoader; +use Illuminate\Filesystem\Filesystem; + class ImageManager { public $config; @@ -15,8 +19,13 @@ class ImageManager } else { - $loader = new FileLoader(new Filesystem, __DIR__.'/../../config'); - $this->config = new Config($loader, null); + $config_path = __DIR__.'/../../config'; + $env = 'production'; + + $file = new Filesystem; + $loader = new FileLoader($file, $config_path); + $this->config = new Config($loader, $env); + $this->config->package('intervention/image', $config_path, 'image'); } }