Skip to content

Commit

Permalink
Update to actual laravel and imgix version (#8)
Browse files Browse the repository at this point in the history
* change imgix package to support imgix-native package >=3.x

* update composer dependencies to test on php >= 7.2

* change source files to match psr-2

* change source files to match psr-2. change readme to required php >= 7.2
  • Loading branch information
xuneXTW authored and Evgenii Nasyrov committed Dec 30, 2019
1 parent 9326ca3 commit ef70a2d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
6 changes: 1 addition & 5 deletions config/imgix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,

];
2 changes: 1 addition & 1 deletion src/Imgix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 2 additions & 3 deletions src/ImgixServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/ImgixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit ef70a2d

Please sign in to comment.