Skip to content

Commit 9cfc431

Browse files
committed
Drop support for XP < 9
See xp-framework/rfc#341
1 parent 7674a16 commit 9cfc431

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ ZIP File support for the XP Framework ChangeLog
33

44
## ?.?.? / ????-??-??
55

6+
## 10.0.0 / 2021-10-21
7+
8+
* Implemented xp-framework/rfc#341, dropping compatibility with XP 9
9+
(@thekid)
10+
611
## 9.0.1 / 2021-10-21
712

813
* Made compatible with PHP 8.1 - add `ReturnTypeWillChange` attributes to

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"description" : "ZIP File support for the XP Framework",
77
"keywords": ["module", "xp"],
88
"require" : {
9-
"xp-framework/core": "^10.0 | ^9.0 | ^8.0 | ^7.0",
10-
"xp-framework/math": "^9.0 | ^8.0 | ^7.0",
9+
"xp-framework/core": "^11.0 | ^10.0",
10+
"xp-framework/math": "^9.0 | ^8.0",
1111
"php" : ">=7.0.0"
1212
},
1313
"require-dev" : {
14-
"xp-framework/unittest": "^11.0 | ^10.0 | ^9.0 | ^8.0 | ^7.0"
14+
"xp-framework/unittest": "^11.0 | ^10.0"
1515
},
1616
"autoload" : {
1717
"files" : ["src/main/php/autoload.php"]

src/main/php/io/archive/zip/CipheringZipFileOutputStream.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public function close() {
9090
// Now cipher and the compress raw bytes
9191
$compressed= new MemoryOutputStream();
9292
$compression= $this->compression[0]->getCompressionStream($compressed, $this->compression[1]);
93-
$compression->write($this->cipher->cipher($this->data->getBytes()));
94-
$bytes= $compressed->getBytes();
93+
$compression->write($this->cipher->cipher($this->data->bytes()));
94+
$bytes= $compressed->bytes();
9595

9696
// Finally, write header, preamble and bytes
9797
$this->writer->writeFile(

src/main/php/io/archive/zip/ZipFileOutputStream.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function close() {
7878
}
7979

8080
$this->compression->close();
81-
$bytes= $this->data->getBytes();
81+
$bytes= $this->data->bytes();
8282
$this->writer->writeFile(
8383
$this->file,
8484
$this->name,

src/test/php/io/archive/zip/unittest/ZipArchiveWriterTest.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function setUp() {
2626
* @return [:string] content
2727
*/
2828
protected function entriesWithContentIn($out, $password= null) {
29-
$zip= ZipFile::open(new MemoryInputStream($out->getBytes()))->usingPassword($password);
29+
$zip= ZipFile::open(new MemoryInputStream($out->bytes()))->usingPassword($password);
3030

3131
$entries= [];
3232
foreach ($zip->entries() as $entry) {

0 commit comments

Comments
 (0)