Skip to content

Commit

Permalink
Add support for php-vips 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzai committed Jul 28, 2022
1 parent 9a6f1d4 commit 595f006
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This is a work in progress.

## Requirements

- PHP >= 7.1
- ext-vips >= 0.1.2
- PHP >= 7.2
- ext-vips >= 0.1.2 (or ext-ffi)

## Installation

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
}
],
"require": {
"php": "^7.1|^8.0",
"intervention/image": "^2.4",
"jcupitt/vips": "^1.0"
"php": "^7.2||^8.0",
"intervention/image": "^2.7",
"jcupitt/vips": "^1.0.9||^2.0.3"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 5 additions & 1 deletion src/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public function parseColor($value): AbstractColor
*/
protected function coreAvailable(): bool
{
return extension_loaded('vips') && class_exists(VipsImage::class);
if (! class_exists(VipsImage::class)) {
return false;
}

return extension_loaded('ffi') || extension_loaded('vips');
}
}

0 comments on commit 595f006

Please sign in to comment.