Skip to content

Commit

Permalink
Drop XP 9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Feb 28, 2022
1 parent 4849448 commit 97373d2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Imaging APIs for the XP Framework ChangeLog

## ?.?.? / ????-??-??

## 10.0.0 / 2022-02-28

* Implemented xp-framework/rfc#341: Drop XP 9 compatibility - @thekid
* Added XP 11 compatibility - @thekid

## 9.0.0 / 2020-04-10

* Implemented xp-framework/rfc#334: Drop PHP 5.6:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"description" : "Imaging APIs for the XP Framework",
"keywords": ["module", "xp"],
"require" : {
"xp-framework/core": "^10.0 | ^8.0 | ^7.0",
"xp-framework/xml" : "^10.0 | ^9.0 | ^8.0 | ^7.0",
"xp-framework/core": "^11.0 | ^10.0",
"xp-framework/xml" : "^11.0 | ^10.0",
"php" : ">=7.0.0"
},
"require-dev" : {
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/img/Image.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static function create($w, $h, $type= IMG_PALETTE, $class= __CLASS__) {
throw new ImagingException('Unknown type '.$type);
}

if (!is_resource($handle)) {
if (!$handle) {
throw new ImagingException('Could not create image of type '.$type);
}
return new $class($handle);
Expand Down
2 changes: 1 addition & 1 deletion src/test/php/img/unittest/GifImageWriterTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ public function close() { }
public function write() {
$s= new MemoryOutputStream();
$this->image->saveTo(new GifStreamWriter($s));
$this->assertNotEquals('', $s->getBytes());
$this->assertNotEquals('', $s->bytes());
}
}
2 changes: 1 addition & 1 deletion src/test/php/img/unittest/JpegImageWriterTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ public function close() { }
public function write() {
$s= new MemoryOutputStream();
$this->image->saveTo(new JpegStreamWriter($s));
$this->assertNotEquals('', $s->getBytes());
$this->assertNotEquals('', $s->bytes());
}
}
2 changes: 1 addition & 1 deletion src/test/php/img/unittest/PngImageWriterTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public function close() { }
public function write() {
$s= new MemoryOutputStream();
$this->image->saveTo(new PngStreamWriter($s));
$this->assertNotEquals('', $s->getBytes());
$this->assertNotEquals('', $s->bytes());
}
}

0 comments on commit 97373d2

Please sign in to comment.