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 Oct 21, 2021
1 parent 874c200 commit bea4be0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 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 @@ Data sequences change log

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

## 10.0.0 / 2021-10-21

* Implemented xp-framework/rfc#341, dropping compatibility with XP 9
(@thekid)

## 9.3.0 / 2021-10-15

* Merged PR #53: Implement `Sequence::zip()` intermediate operation
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" : "Data sequences",
"keywords": ["module", "xp"],
"require" : {
"xp-framework/core": "^10.2",
"xp-framework/collections": "^10.0 | ^9.0 | ^8.0 | ^7.0",
"xp-framework/core": "^11.0 | ^10.2",
"xp-framework/collections": "^10.0 | ^9.0 | ^8.0",
"php" : ">=7.0.0"
},
"require-dev" : {
Expand Down
10 changes: 5 additions & 5 deletions src/test/php/util/data/unittest/EachTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ public function writing_to_stream() {

Sequence::of([1, 2, 3, 4])->each([$out, 'write']);

Assert::equals('1234', $out->getBytes());
Assert::equals('1234', $out->bytes());
}

#[Test]
public function writing_to_console_out() {
$orig= Console::$out->getStream();
$orig= Console::$out->stream();
$out= new MemoryOutputStream();

try {
Console::$out->setStream($out);
Console::$out->redirect($out);
Sequence::of([1, 2, 3, 4])->each('util.cmd.Console::write', []);
} finally {
Console::$out->setStream($orig);
Console::$out->redirect($orig);
}

Assert::equals('1234', $out->getBytes());
Assert::equals('1234', $out->bytes());
}

#[Test]
Expand Down
10 changes: 4 additions & 6 deletions src/test/php/util/data/unittest/PeekTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,17 @@ public function keys() {

#[Test]
public function writing_to_console_out() {
$orig= Console::$out->getStream();
$orig= Console::$out->stream();
$out= new MemoryOutputStream();
Console::$out->setStream($out);

try {
Console::$out->setStream($out);
Console::$out->redirect($out);
Sequence::of([1, 2, 3, 4])->peek('util.cmd.Console::write', [])->each();
} finally {
Console::$out->setStream($orig);
Console::$out->redirect($orig);
}

Console::$out->setStream($orig);
Assert::equals('1234', $out->getBytes());
Assert::equals('1234', $out->bytes());
}

#[Test]
Expand Down

0 comments on commit bea4be0

Please sign in to comment.