Skip to content

Commit

Permalink
Drop support for XP 9
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Feb 27, 2022
1 parent a0dd821 commit 76f02f3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Text encoding changelog

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

## 10.0.0 / 2022-02-27

* Implemented xp-framework/rfc#341, dropping compatibility with XP 9

## 9.0.1 / 2020-05-31

* Removed HHVM implementations added in #2, HHVM no longer supports PHP
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"description" : "Text encoding",
"keywords": ["module", "xp"],
"require" : {
"xp-framework/core": "^10.0 | ^9.0 | ^8.0 | ^7.0 | ^6.5",
"xp-framework/core": "^11.0 | ^10.0",
"php" : ">=7.0.0"
},
"require-dev" : {
"xp-framework/unittest": "^11.0 | ^10.0 | ^9.0 | ^8.0 | ^7.0 | ^6.5"
"xp-framework/unittest": "^11.0 | ^10.0"
},
"autoload" : {
"files" : ["src/main/php/autoload.php"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function singleWrite() {
$stream= new Base64OutputStream($out);
$stream->write('Hello');
$stream->close();
$this->assertEquals(base64_encode('Hello'), $out->getBytes());
$this->assertEquals(base64_encode('Hello'), $out->bytes());
}

#[Test]
Expand All @@ -29,7 +29,7 @@ public function lineWrappedAt76Characters() {
$stream= new Base64OutputStream($out, 76);
$stream->write($data);
$stream->close();
$this->assertEquals(rtrim(chunk_split(base64_encode($data), 76, "\n"), "\n"), $out->getBytes());
$this->assertEquals(rtrim(chunk_split(base64_encode($data), 76, "\n"), "\n"), $out->bytes());
}

#[Test]
Expand All @@ -40,6 +40,6 @@ public function multipeWrites() {
$stream->write(' ');
$stream->write('World');
$stream->close();
$this->assertEquals(base64_encode('Hello World'), $out->getBytes());
$this->assertEquals(base64_encode('Hello World'), $out->bytes());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function singleWrite() {
$stream= new QuotedPrintableOutputStream($out);
$stream->write('Hello');
$stream->close();
$this->assertEquals('Hello', $out->getBytes());
$this->assertEquals('Hello', $out->bytes());
}

/**
Expand All @@ -37,7 +37,7 @@ public function multipeWrites() {
$stream->write(' ');
$stream->write('World');
$stream->close();
$this->assertEquals('Hello World', $out->getBytes());
$this->assertEquals('Hello World', $out->bytes());
}

/**
Expand All @@ -50,7 +50,7 @@ public function umlaut() {
$stream= new QuotedPrintableOutputStream($out);
$stream->write("Hello \xdcbercoder");
$stream->close();
$this->assertEquals('Hello =DCbercoder', $out->getBytes());
$this->assertEquals('Hello =DCbercoder', $out->bytes());
}

/**
Expand All @@ -63,7 +63,7 @@ public function umlautAtTheBeginning() {
$stream= new QuotedPrintableOutputStream($out);
$stream->write("\xdcbercoder");
$stream->close();
$this->assertEquals('=DCbercoder', $out->getBytes());
$this->assertEquals('=DCbercoder', $out->bytes());
}

/**
Expand All @@ -77,7 +77,7 @@ public function lineLengthMayNotBeLongerThan76Characters() {
$stream->write(str_repeat('1', 75));
$stream->write(str_repeat('2', 75));
$stream->close();
$this->assertEquals(str_repeat('1', 75)."=\n".str_repeat('2', 75), $out->getBytes());
$this->assertEquals(str_repeat('1', 75)."=\n".str_repeat('2', 75), $out->bytes());
}

/**
Expand All @@ -90,7 +90,7 @@ public function spaceAtEndOfMustBeEncoded() {
$stream= new QuotedPrintableOutputStream($out);
$stream->write('Hello ');
$stream->close();
$this->assertEquals('Hello=20', $out->getBytes());
$this->assertEquals('Hello=20', $out->bytes());
}

/**
Expand All @@ -103,6 +103,6 @@ public function equalsSign() {
$stream= new QuotedPrintableOutputStream($out);
$stream->write('A=1');
$stream->close();
$this->assertEquals('A=3D1', $out->getBytes());
$this->assertEquals('A=3D1', $out->bytes());
}
}

0 comments on commit 76f02f3

Please sign in to comment.