diff --git a/README.md b/README.md index 1d7ed0e..7b2c9aa 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Laravel package for generating URLs with [Imgix](https://www.imgix.com/). Make sure all dependencies have been installed before moving on: -* [PHP](http://php.net/manual/en/install.php) >= 5.6 +* [PHP](http://php.net/manual/en/install.php) >= 7.2 * [Composer](https://getcomposer.org/download/) ## Install diff --git a/composer.json b/composer.json index 53c74b1..356cf2c 100644 --- a/composer.json +++ b/composer.json @@ -18,15 +18,15 @@ } ], "require": { - "php": ">=5.6.4", - "illuminate/support": "~5.4", - "imgix/imgix-php": "~1.1" + "php": ">=7.2", + "illuminate/support": "^6.0", + "imgix/imgix-php": "^3.0" }, "require-dev": { - "mockery/mockery": "~0.9", - "orchestra/testbench": "~3.4", - "phpunit/phpunit": "~5.7", - "squizlabs/php_codesniffer": "~3.0" + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.0", + "phpunit/phpunit": "^8.0", + "squizlabs/php_codesniffer": "^3.0" }, "autoload": { "files": [ diff --git a/config/imgix.php b/config/imgix.php index 831eacb..8785876 100644 --- a/config/imgix.php +++ b/config/imgix.php @@ -6,16 +6,12 @@ * @see https://github.com/imgix/imgix-php */ - 'domains' => [ - 'test.imgix.net', - ], + 'domain' => 'test.imgix.net', 'useHttps' => false, 'signKey' => '', - 'shardStrategy' => \Imgix\ShardStrategy::CRC, - 'includeLibraryParam' => true, ]; diff --git a/src/Imgix.php b/src/Imgix.php index adc8639..3f5614b 100644 --- a/src/Imgix.php +++ b/src/Imgix.php @@ -27,7 +27,7 @@ public function __construct(UrlBuilder $urlBuilder) * Create an imgix url for the given path. * * @param string $path - * @param array $params + * @param array $params * * @return string */ diff --git a/src/ImgixServiceProvider.php b/src/ImgixServiceProvider.php index b2cb01f..6dd7811 100644 --- a/src/ImgixServiceProvider.php +++ b/src/ImgixServiceProvider.php @@ -31,16 +31,15 @@ public function register() { $this->app->singleton(UrlBuilder::class, function () { return new UrlBuilder( - config('imgix.domains'), + config('imgix.domain'), config('imgix.useHttps', false), config('imgix.signKey', ''), - config('imgix.shardStrategy', ShardStrategy::CRC), config('imgix.includeLibraryParam', true) ); }); $this->app->singleton(Imgix::class, function ($app) { - return new Imgix($app[UrlBuilder::class]); + return new Imgix($app[ UrlBuilder::class ]); }); $this->app->alias(Imgix::class, static::ALIAS); diff --git a/tests/Unit/ImgixTest.php b/tests/Unit/ImgixTest.php index a25fc81..ec75f81 100644 --- a/tests/Unit/ImgixTest.php +++ b/tests/Unit/ImgixTest.php @@ -15,13 +15,13 @@ class ImgixTest extends TestCase /** @var \Nasyrov\Laravel\Imgix\Imgix */ protected $imgix; - protected function setUp() + protected function setUp() :void { $this->urlBuilder = Mockery::mock(UrlBuilder::class); $this->imgix = new Imgix($this->urlBuilder); } - protected function tearDown() + protected function tearDown() :void { Mockery::close(); }