From c54a3be332f8d640871a4d743e2747c8df6962e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Sat, 4 May 2019 22:20:48 +0200 Subject: [PATCH 01/10] Laravel 5.8 --- .travis.yml | 16 ++++++++++++---- composer.json | 8 ++++---- readme.md | 1 + tests/ImageProxyTestCase.php | 4 ++-- tests/ImageServeTestCase.php | 4 ++-- tests/ImageTestCase.php | 4 ++-- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2aab85..8cddf86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,9 @@ env: - ILLUMINATE_VERSION=5.4.* PHPUNIT_VERSION=~5.7 - ILLUMINATE_VERSION=5.5.* PHPUNIT_VERSION=~6.0 - ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 - - ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 COVERAGE=true + - ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 + - ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=~7.0 COVERAGE=true + matrix: # For each PHP version we exclude the coverage env, except for PHP 7.1 @@ -34,19 +36,25 @@ matrix: - php: 5.5 env: ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 - php: 5.5 - env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 COVERAGE=true + env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 + - php: 5.5 + env: ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=~7.0 COVERAGE=true # Don't test Laravel 5.5 and up on PHP 5.6 - php: 5.6 env: ILLUMINATE_VERSION=5.5.* PHPUNIT_VERSION=~6.0 - php: 5.6 env: ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 - php: 5.6 - env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 COVERAGE=true + env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 + - php: 5.6 + env: ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=~7.0 COVERAGE=true # Test Laravel 5.5 and down on PHP 7.0 - php: 7.0 env: ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 - php: 7.0 - env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 COVERAGE=true + env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 + - php: 7.0 + env: ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=~7.0 COVERAGE=true # Test only Laravel 5.4 and up on PHP 7.1 - php: 7.1 env: ILLUMINATE_VERSION=5.1.* PHPUNIT_VERSION=~4.0 diff --git a/composer.json b/composer.json index 5ca1a91..bfa992b 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "folklore/image", "description": "Image manipulation library for Laravel 5 based on Imagine and inspired by Croppa for easy url based manipulation", "keywords": ["laravel","image","imagick","gd","imagine","watermark","gmagick","thumbnail"], - "homepage": "http://github.com/Folkloreatelier/laravel-image", + "homepage": "https://github.com/folkloreinc/laravel-image", "license": "MIT", "authors": [ { @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=5.5.9", - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*", + "php": "^7.1.3", + "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*", "guzzlehttp/guzzle": "5.3|~6.0", "imagine/imagine": "0.6.*" }, "require-dev": { "fzaninotto/faker": "~1.4", - "orchestra/testbench": "3.1.*|3.2.*|3.3.*|3.4.*|3.5.*|3.6.*|3.7.*", + "orchestra/testbench": "3.1.*|3.2.*|3.3.*|3.4.*|3.5.*|3.6.*|3.7.*|3.8.*", "mockery/mockery": "0.9.*|1.0.*", "phpunit/phpunit": "~4.0|~4.1|~5.4|~5.7|~6.0|~7.0", "php-coveralls/php-coveralls": "^2.1" diff --git a/readme.md b/readme.md index 97798cd..ef6086d 100644 --- a/readme.md +++ b/readme.md @@ -71,6 +71,7 @@ This package also provides some common filters ready to use ([more on this](http 5.0.x | 0.2.x 5.1.x | 0.3.x 5.2.x | 0.3.x + 5.8.x | 0.4.x ## Installation diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index 72ab52a..42caba8 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -11,7 +11,7 @@ class ImageProxyTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() + public function setUp():void { parent::setUp(); @@ -20,7 +20,7 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown() + public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index 0077f73..16fae1d 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -11,7 +11,7 @@ class ImageServeTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() + public function setUp():void { parent::setUp(); @@ -20,7 +20,7 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown() + public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index 79bf414..478db40 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -11,7 +11,7 @@ class ImageTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() + public function setUp():void { parent::setUp(); @@ -20,7 +20,7 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown() + public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); From 68b861c126d5c28a23bc5bde79e548afc3e51f22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Sat, 4 May 2019 22:22:04 +0200 Subject: [PATCH 02/10] Laravel 5.8: patch --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ef6086d..5e4fecc 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ Laravel Image is an image manipulation package for Laravel 4 and 5 based on the [PHP Imagine library](https://github.com/avalanche123/Imagine). It is inspired by [Croppa](https://github.com/BKWLD/croppa) as it can use specially formatted urls to do the manipulations. It supports basic image manipulations such as resize, crop, rotation and flip. It also supports effects such as negative, grayscale, gamma, colorize and blur. You can also define custom filters for greater flexibility. [![Latest Stable Version](https://poser.pugx.org/folklore/image/v/stable.svg)](https://packagist.org/packages/folklore/image) -[![Build Status](https://travis-ci.org/Folkloreatelier/laravel-image.png?branch=master)](https://travis-ci.org/Folkloreatelier/laravel-image) +[![Build Status](https://travis-ci.org/leknoppix/laravel-image.png?branch=master)](https://travis-ci.org/leknoppix/laravel-image) [![Total Downloads](https://poser.pugx.org/folklore/image/downloads.svg)](https://packagist.org/packages/folklore/image) The main difference between this package and other image manipulation libraries is that you can use parameters directly in the url to manipulate the image. A manipulated version of the image is then saved in the same path as the original image, **creating a static version of the file and bypassing PHP for all future requests**. From 63802be4331cf8d88711c325c14b247f578950e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Sat, 4 May 2019 22:47:57 +0200 Subject: [PATCH 03/10] Laravel 5.8: patch 2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bfa992b..5b0531f 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.1.3", + "php": ">=5.5.9", "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*", "guzzlehttp/guzzle": "5.3|~6.0", "imagine/imagine": "0.6.*" From 84b33b77c68ad8279e4e4613b24b4011dca34105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Sat, 4 May 2019 22:54:03 +0200 Subject: [PATCH 04/10] Laravel 5.8: patch 3 --- tests/ImageProxyTestCase.php | 4 ++-- tests/ImageServeTestCase.php | 4 ++-- tests/ImageTestCase.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index 42caba8..72ab52a 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -11,7 +11,7 @@ class ImageProxyTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp():void + public function setUp() { parent::setUp(); @@ -20,7 +20,7 @@ public function setUp():void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown():void + public function tearDown() { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index 16fae1d..0077f73 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -11,7 +11,7 @@ class ImageServeTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp():void + public function setUp() { parent::setUp(); @@ -20,7 +20,7 @@ public function setUp():void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown():void + public function tearDown() { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index 478db40..79bf414 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -11,7 +11,7 @@ class ImageTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp():void + public function setUp() { parent::setUp(); @@ -20,7 +20,7 @@ public function setUp():void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown():void + public function tearDown() { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); From 95e8bc78d7159ba799c2ed8d9fd59a0448ba4e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Tue, 7 May 2019 21:00:16 +0200 Subject: [PATCH 05/10] patch 4 --- tests/ImageProxyTestCase.php | 55 +++++++++++++++++++++++++++--------- tests/ImageServeTestCase.php | 52 +++++++++++++++++++++++++--------- tests/ImageTestCase.php | 55 +++++++++++++++++++++++++++--------- 3 files changed, 121 insertions(+), 41 deletions(-) diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index 72ab52a..f29ad30 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -11,23 +11,50 @@ class ImageProxyTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() - { - parent::setUp(); - - $this->image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + if ((!defined('PHP_VERSION_ID')) { + $version = explode('.',PHP_VERSION); + define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); } - public function tearDown() + if(PHP_VERSION_ID <= 70000) { - $customPath = $this->app['path.public'].'/custom'; - $this->app['config']->set('image.write_path', $customPath); - - $this->image->deleteManipulated($this->imagePath); - - parent::tearDown(); + public function setUp() + { + parent::setUp(); + + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } + + public function tearDown() + { + $customPath = $this->app['path.public'].'/custom'; + $this->app['config']->set('image.write_path', $customPath); + + $this->image->deleteManipulated($this->imagePath); + + parent::tearDown(); + } + }else{ + public function setUp():void + { + parent::setUp(); + + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } + + public function tearDown():void + { + $customPath = $this->app['path.public'].'/custom'; + $this->app['config']->set('image.write_path', $customPath); + + $this->image->deleteManipulated($this->imagePath); + + parent::tearDown(); + } } public function testProxy() diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index 0077f73..9ada935 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -11,25 +11,51 @@ class ImageServeTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() - { - parent::setUp(); - - $this->image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + if ((!defined('PHP_VERSION_ID')) { + $version = explode('.',PHP_VERSION); + define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); } - public function tearDown() + if(PHP_VERSION_ID <= 70000) { - $customPath = $this->app['path.public'].'/custom'; - $this->app['config']->set('image.write_path', $customPath); + public function setUp() + { + parent::setUp(); - $this->image->deleteManipulated($this->imagePath); + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } - parent::tearDown(); - } + public function tearDown() + { + $customPath = $this->app['path.public'].'/custom'; + $this->app['config']->set('image.write_path', $customPath); + + $this->image->deleteManipulated($this->imagePath); + + parent::tearDown(); + } + }else{ + public function setUp():void + { + parent::setUp(); + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } + + public function tearDown():void + { + $customPath = $this->app['path.public'].'/custom'; + $this->app['config']->set('image.write_path', $customPath); + + $this->image->deleteManipulated($this->imagePath); + + parent::tearDown(); + } + } public function testServeWriteImage() { $this->app['config']->set('image.write_image', true); diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index 79bf414..b562b55 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -11,23 +11,50 @@ class ImageTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() - { - parent::setUp(); - - $this->image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + if ((!defined('PHP_VERSION_ID')) { + $version = explode('.',PHP_VERSION); + define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); } - public function tearDown() + if(PHP_VERSION_ID <= 70000) { - $customPath = $this->app['path.public'].'/custom'; - $this->app['config']->set('image.write_path', $customPath); - - $this->image->deleteManipulated($this->imagePath); - - parent::tearDown(); + public function setUp() + { + parent::setUp(); + + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } + + public function tearDown() + { + $customPath = $this->app['path.public'].'/custom'; + $this->app['config']->set('image.write_path', $customPath); + + $this->image->deleteManipulated($this->imagePath); + + parent::tearDown(); + } + }else{ + public function setUp():void + { + parent::setUp(); + + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } + + public function tearDown():void + { + $customPath = $this->app['path.public'].'/custom'; + $this->app['config']->set('image.write_path', $customPath); + + $this->image->deleteManipulated($this->imagePath); + + parent::tearDown(); + } } public function testURLisValid() From 1ffa6d21f4842158d56d70030f4c2e523ba69a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Tue, 7 May 2019 21:29:30 +0200 Subject: [PATCH 06/10] patch 5 --- tests/ImageProxyTestCase.php | 44 +++++++++++++++++++----------------- tests/ImageServeTestCase.php | 22 ++++++++++-------- tests/ImageTestCase.php | 21 ++++++++++------- 3 files changed, 49 insertions(+), 38 deletions(-) diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index f29ad30..a959ef4 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -6,18 +6,28 @@ class ImageProxyTestCase extends TestCase { + protected $imagePath = '/image.jpg'; protected $imageSmallPath = '/image_small.jpg'; protected $imageSize; protected $imageSmallSize; - if ((!defined('PHP_VERSION_ID')) { - $version = explode('.',PHP_VERSION); - define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); - } - if(PHP_VERSION_ID <= 70000) - { + /** + * @requires PHP 7.1 + */ + public function setUp():void + { + parent::setUp(); + + $this->image = $this->app['image']; + $this->imageSize = getimagesize(public_path().$this->imagePath); + $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); + } + + /** + * @requires PHP 5.3 + */ public function setUp() { parent::setUp(); @@ -27,36 +37,28 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } + /** + * @requires PHP 5.3 + */ public function tearDown() { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); - $this->image->deleteManipulated($this->imagePath); - parent::tearDown(); } - }else{ - public function setUp():void - { - parent::setUp(); - - $this->image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); - } + /** + * @requires PHP 7.1 + */ public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); - $this->image->deleteManipulated($this->imagePath); - parent::tearDown(); } - } - + public function testProxy() { $url = $this->image->url($this->imagePath, 300, 300, [ diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index 9ada935..a663a3b 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -11,13 +11,9 @@ class ImageServeTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - if ((!defined('PHP_VERSION_ID')) { - $version = explode('.',PHP_VERSION); - define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); - } - - if(PHP_VERSION_ID <= 70000) - { + /** + * @requires PHP 5.3 + */ public function setUp() { parent::setUp(); @@ -27,6 +23,9 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } + /** + * @requires PHP 5.3 + */ public function tearDown() { $customPath = $this->app['path.public'].'/custom'; @@ -36,7 +35,10 @@ public function tearDown() parent::tearDown(); } - }else{ + + /** + * @requires PHP 7.1 + */ public function setUp():void { parent::setUp(); @@ -45,7 +47,9 @@ public function setUp():void $this->imageSize = getimagesize(public_path().$this->imagePath); $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - + /** + * @requires PHP 7.1 + */ public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index b562b55..a0f3610 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -11,13 +11,9 @@ class ImageTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - if ((!defined('PHP_VERSION_ID')) { - $version = explode('.',PHP_VERSION); - define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2])); - } - - if(PHP_VERSION_ID <= 70000) - { + /** + * @requires PHP 5.3 + */ public function setUp() { parent::setUp(); @@ -27,6 +23,9 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } + /** + * @requires PHP 5.3 + */ public function tearDown() { $customPath = $this->app['path.public'].'/custom'; @@ -36,7 +35,10 @@ public function tearDown() parent::tearDown(); } - }else{ + + /** + * @requires PHP 7.1 + */ public function setUp():void { parent::setUp(); @@ -46,6 +48,9 @@ public function setUp():void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } + /** + * @requires PHP 7.1 + */ public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; From a72d0477d85d7e7e8023f10db0a9f14f6a3dfa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Tue, 7 May 2019 21:41:31 +0200 Subject: [PATCH 07/10] patch 6 --- tests/ImageProxyTestCase.php | 33 +++------------------------------ tests/ImageServeTestCase.php | 35 ++++------------------------------- tests/ImageTestCase.php | 35 +++-------------------------------- 3 files changed, 10 insertions(+), 93 deletions(-) diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index a959ef4..2d778d6 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -1,4 +1,6 @@ -image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); - } - - /** - * @requires PHP 5.3 - */ public function setUp() { parent::setUp(); @@ -37,9 +24,6 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - /** - * @requires PHP 5.3 - */ public function tearDown() { $customPath = $this->app['path.public'].'/custom'; @@ -47,17 +31,6 @@ public function tearDown() $this->image->deleteManipulated($this->imagePath); parent::tearDown(); } - - /** - * @requires PHP 7.1 - */ - public function tearDown():void - { - $customPath = $this->app['path.public'].'/custom'; - $this->app['config']->set('image.write_path', $customPath); - $this->image->deleteManipulated($this->imagePath); - parent::tearDown(); - } public function testProxy() { diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index a663a3b..5ad85ca 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -1,4 +1,6 @@ -imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - /** - * @requires PHP 5.3 - */ public function tearDown() { $customPath = $this->app['path.public'].'/custom'; @@ -36,30 +33,6 @@ public function tearDown() parent::tearDown(); } - /** - * @requires PHP 7.1 - */ - public function setUp():void - { - parent::setUp(); - - $this->image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); - } - /** - * @requires PHP 7.1 - */ - public function tearDown():void - { - $customPath = $this->app['path.public'].'/custom'; - $this->app['config']->set('image.write_path', $customPath); - - $this->image->deleteManipulated($this->imagePath); - - parent::tearDown(); - } - } public function testServeWriteImage() { $this->app['config']->set('image.write_image', true); diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index a0f3610..95ae021 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -1,4 +1,6 @@ -imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - /** - * @requires PHP 5.3 - */ public function tearDown() { $customPath = $this->app['path.public'].'/custom'; @@ -36,31 +32,6 @@ public function tearDown() parent::tearDown(); } - /** - * @requires PHP 7.1 - */ - public function setUp():void - { - parent::setUp(); - - $this->image = $this->app['image']; - $this->imageSize = getimagesize(public_path().$this->imagePath); - $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); - } - - /** - * @requires PHP 7.1 - */ - public function tearDown():void - { - $customPath = $this->app['path.public'].'/custom'; - $this->app['config']->set('image.write_path', $customPath); - - $this->image->deleteManipulated($this->imagePath); - - parent::tearDown(); - } - } public function testURLisValid() { From 7cdb6ad16f4462e29c201019dee771eb6b8eb8c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Tue, 7 May 2019 21:51:34 +0200 Subject: [PATCH 08/10] patch 7 --- tests/ImageProxyTestCase.php | 4 ++-- tests/ImageServeTestCase.php | 6 +++--- tests/ImageTestCase.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index 2d778d6..746c205 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -15,7 +15,7 @@ class ImageProxyTestCase extends TestCase protected $imageSmallSize; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -24,7 +24,7 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown() + public function tearDown(): void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index 5ad85ca..83cacc6 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -14,7 +14,7 @@ class ImageServeTestCase extends TestCase protected $imageSmallSize; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -23,7 +23,7 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown() + public function tearDown(): void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); @@ -32,7 +32,7 @@ public function tearDown() parent::tearDown(); } - + public function testServeWriteImage() { $this->app['config']->set('image.write_image', true); diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index 95ae021..8a465da 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -13,7 +13,7 @@ class ImageTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -22,7 +22,7 @@ public function setUp() $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown() + public function tearDown(): void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); From 05be53fab72b2409a87e4dddffd9950cd1d8ce5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Wed, 8 May 2019 17:48:05 +0200 Subject: [PATCH 09/10] patch 8 --- .travis.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8cddf86..17467a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,6 @@ cache: - ${TRAVIS_BUILD_DIR}/travis/extension-cache php: - - 5.5 - - 5.6 - 7.0 - 7.1 @@ -26,28 +24,6 @@ env: matrix: # For each PHP version we exclude the coverage env, except for PHP 7.1 exclude: - # Test only Laravel 5.1 and 5.2 on PHP 5.5 - - php: 5.5 - env: ILLUMINATE_VERSION=5.3.* PHPUNIT_VERSION=~5.0 - - php: 5.5 - env: ILLUMINATE_VERSION=5.4.* PHPUNIT_VERSION=~5.7 - - php: 5.5 - env: ILLUMINATE_VERSION=5.5.* PHPUNIT_VERSION=~6.0 - - php: 5.5 - env: ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 - - php: 5.5 - env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 - - php: 5.5 - env: ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=~7.0 COVERAGE=true - # Don't test Laravel 5.5 and up on PHP 5.6 - - php: 5.6 - env: ILLUMINATE_VERSION=5.5.* PHPUNIT_VERSION=~6.0 - - php: 5.6 - env: ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 - - php: 5.6 - env: ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=~7.0 - - php: 5.6 - env: ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=~7.0 COVERAGE=true # Test Laravel 5.5 and down on PHP 7.0 - php: 7.0 env: ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=~7.0 From 3dc8789cae684d4bdf30787752981f887743b50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=B1adas=20Pascal?= Date: Wed, 8 May 2019 17:55:04 +0200 Subject: [PATCH 10/10] patch 5.8 --- .travis.yml | 1 - tests/ImageProxyTestCase.php | 4 ++-- tests/ImageServeTestCase.php | 4 ++-- tests/ImageTestCase.php | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 17467a2..5c3753d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ cache: - ${TRAVIS_BUILD_DIR}/travis/extension-cache php: - - 7.0 - 7.1 env: diff --git a/tests/ImageProxyTestCase.php b/tests/ImageProxyTestCase.php index 746c205..cdc8337 100644 --- a/tests/ImageProxyTestCase.php +++ b/tests/ImageProxyTestCase.php @@ -15,7 +15,7 @@ class ImageProxyTestCase extends TestCase protected $imageSmallSize; - public function setUp(): void + public function setUp():void { parent::setUp(); @@ -24,7 +24,7 @@ public function setUp(): void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown(): void + public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageServeTestCase.php b/tests/ImageServeTestCase.php index 83cacc6..47b6470 100644 --- a/tests/ImageServeTestCase.php +++ b/tests/ImageServeTestCase.php @@ -14,7 +14,7 @@ class ImageServeTestCase extends TestCase protected $imageSmallSize; - public function setUp(): void + public function setUp():void { parent::setUp(); @@ -23,7 +23,7 @@ public function setUp(): void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown(): void + public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath); diff --git a/tests/ImageTestCase.php b/tests/ImageTestCase.php index 8a465da..31f8e79 100644 --- a/tests/ImageTestCase.php +++ b/tests/ImageTestCase.php @@ -13,7 +13,7 @@ class ImageTestCase extends TestCase protected $imageSize; protected $imageSmallSize; - public function setUp(): void + public function setUp():void { parent::setUp(); @@ -22,7 +22,7 @@ public function setUp(): void $this->imageSmallSize = getimagesize(public_path().$this->imageSmallPath); } - public function tearDown(): void + public function tearDown():void { $customPath = $this->app['path.public'].'/custom'; $this->app['config']->set('image.write_path', $customPath);