summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION1094
-rw-r--r--composer.json2
-rw-r--r--php-pecl-ds.spec136
4 files changed, 120 insertions, 1114 deletions
diff --git a/PHPINFO b/PHPINFO
index 92c25c8..4deb055 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,4 +2,4 @@
ds
ds support => enabled
-ds version => 1.8.0
+ds version => 2.0.0
diff --git a/REFLECTION b/REFLECTION
index 755545e..c37096c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,108 +1,40 @@
-Extension [ <persistent> extension #154 ds version 1.8.0 ] {
+Extension [ <persistent> extension #154 ds version 2.0.0 ] {
- Dependencies {
Dependency [ json (Required) ]
Dependency [ spl (Required) ]
}
- - Classes [11] {
- Interface [ <internal:ds> interface Ds\Hashable ] {
+ - Functions {
+ Function [ <internal:ds> function Ds\seq ] {
- - Constants [0] {
- }
-
- - Static properties [0] {
- }
-
- - Static methods [0] {
- }
-
- - Properties [0] {
- }
-
- - Methods [2] {
- Method [ <internal:ds> abstract public method hash ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> abstract public method equals ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $obj ]
- }
- - Return [ bool ]
- }
+ - Parameters [1] {
+ Parameter #0 [ <optional> $values = <default> ]
}
}
+ Function [ <internal:ds> function Ds\map ] {
- Interface [ <internal:ds> interface Ds\Collection extends IteratorAggregate, Traversable, Countable, JsonSerializable ] {
-
- - Constants [0] {
- }
-
- - Static properties [0] {
- }
-
- - Static methods [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> $values = <default> ]
}
+ }
+ Function [ <internal:ds> function Ds\set ] {
- - Properties [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> $values = <default> ]
}
+ }
+ Function [ <internal:ds> function Ds\heap ] {
- - Methods [7] {
- Method [ <internal:ds> abstract public method clear ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> abstract public method copy ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Collection ]
- }
-
- Method [ <internal:ds> abstract public method isEmpty ] {
-
- - Parameters [0] {
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds> abstract public method toArray ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:Core, inherits IteratorAggregate> abstract public method getIterator ] {
-
- - Parameters [0] {
- }
- - Tentative return [ Traversable ]
- }
-
- Method [ <internal:Core, inherits Countable> abstract public method count ] {
-
- - Parameters [0] {
- }
- - Tentative return [ int ]
- }
-
- Method [ <internal:json, inherits JsonSerializable> abstract public method jsonSerialize ] {
-
- - Parameters [0] {
- }
- - Tentative return [ mixed ]
- }
+ - Parameters [2] {
+ Parameter #0 [ <optional> $values = <default> ]
+ Parameter #1 [ <optional> ?callable $comparator = <default> ]
}
}
+ }
- Interface [ <internal:ds> interface Ds\Sequence extends Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
+ - Classes [6] {
+ Interface [ <internal:ds> interface Ds\Key ] {
- Constants [0] {
}
@@ -116,260 +48,26 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Properties [0] {
}
- - Methods [34] {
- Method [ <internal:ds> abstract public method allocate ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $capacity ]
- }
- }
-
- Method [ <internal:ds> abstract public method capacity ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds> abstract public method contains ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds> abstract public method filter ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ?callable $callback = <default> ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds> abstract public method find ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $value ]
- }
- }
-
- Method [ <internal:ds> abstract public method first ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> abstract public method get ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $index ]
- }
- }
-
- Method [ <internal:ds> abstract public method insert ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> int $index ]
- Parameter #1 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds> abstract public method join ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> string $glue = <default> ]
- }
- - Return [ string ]
- }
-
- Method [ <internal:ds> abstract public method last ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> abstract public method map ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> callable $callback ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds> abstract public method merge ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $values ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds> abstract public method pop ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> abstract public method push ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds> abstract public method reduce ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial = <default> ]
- }
- }
-
- Method [ <internal:ds> abstract public method remove ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $index ]
- }
- }
-
- Method [ <internal:ds> abstract public method reverse ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> abstract public method rotate ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $rotations ]
- }
- }
-
- Method [ <internal:ds> abstract public method set ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> int $index ]
- Parameter #1 [ <required> $value ]
- }
- }
-
- Method [ <internal:ds> abstract public method shift ] {
+ - Methods [2] {
+ Method [ <internal:ds> abstract public method hash ] {
- Parameters [0] {
}
}
- Method [ <internal:ds> abstract public method slice ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> int $index ]
- Parameter #1 [ <optional> ?int $length = <default> ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds> abstract public method sort ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ?callable $comparator = <default> ]
- }
- }
-
- Method [ <internal:ds> abstract public method unshift ] {
+ Method [ <internal:ds> abstract public method equals ] {
- Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds, inherits Ds\Collection> abstract public method clear ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, inherits Ds\Collection> abstract public method copy ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Collection ]
- }
-
- Method [ <internal:ds, inherits Ds\Collection> abstract public method isEmpty ] {
-
- - Parameters [0] {
+ Parameter #0 [ <required> $other ]
}
- Return [ bool ]
}
-
- Method [ <internal:ds, inherits Ds\Collection> abstract public method toArray ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:Core, inherits IteratorAggregate> abstract public method getIterator ] {
-
- - Parameters [0] {
- }
- - Tentative return [ Traversable ]
- }
-
- Method [ <internal:Core, inherits Countable> abstract public method count ] {
-
- - Parameters [0] {
- }
- - Tentative return [ int ]
- }
-
- Method [ <internal:json, inherits JsonSerializable> abstract public method jsonSerialize ] {
-
- - Parameters [0] {
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:Core, inherits ArrayAccess> abstract public method offsetExists ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ bool ]
- }
-
- Method [ <internal:Core, inherits ArrayAccess> abstract public method offsetGet ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:Core, inherits ArrayAccess> abstract public method offsetSet ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> mixed $offset ]
- Parameter #1 [ <required> mixed $value ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:Core, inherits ArrayAccess> abstract public method offsetUnset ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ void ]
- }
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Vector implements Ds\Sequence, ArrayAccess, IteratorAggregate, Traversable, Countable, JsonSerializable, Ds\Collection ] {
+ Class [ <internal:ds> final readonly class Ds\Pair implements JsonSerializable ] {
- - Constants [1] {
- Constant [ public int MIN_CAPACITY ] { 8 }
+ - Constants [0] {
}
- Static properties [0] {
@@ -378,278 +76,20 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Static methods [0] {
}
- - Properties [0] {
+ - Properties [2] {
+ Property [ public protected(set) readonly mixed $key ]
+ Property [ public protected(set) readonly mixed $value ]
}
- - Methods [41] {
+ - Methods [5] {
Method [ <internal:ds, ctor> public method __construct ] {
- - Parameters [1] {
- Parameter #0 [ <optional> $values = <default> ]
- }
- }
-
- Method [ <internal:ds, prototype IteratorAggregate> public method getIterator ] {
-
- - Parameters [0] {
- }
- - Return [ Traversable ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method allocate ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $capacity ]
- }
- }
-
- Method [ <internal:ds> public method apply ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> callable $callback ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method capacity ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method contains ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method filter ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ?callable $callback = <default> ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method find ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $value ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method first ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method get ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $index ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method insert ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> int $index ]
- Parameter #1 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method join ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> string $glue = <default> ]
- }
- - Return [ string ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method last ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method map ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> callable $callback ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method merge ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $values ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetExists ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $offset ]
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetGet ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetSet ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> mixed $offset ]
- Parameter #1 [ <required> mixed $value ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetUnset ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method pop ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method push ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method reduce ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial = <default> ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method remove ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $index ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method reverse ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> public method reversed ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method rotate ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $rotations ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method set ] {
-
- Parameters [2] {
- Parameter #0 [ <required> int $index ]
+ Parameter #0 [ <required> $key ]
Parameter #1 [ <required> $value ]
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method shift ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method slice ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> int $index ]
- Parameter #1 [ <optional> ?int $length = <default> ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method sort ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ?callable $comparator = <default> ]
- }
- }
-
- Method [ <internal:ds> public method sorted ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ?callable $comparator = <default> ]
- }
- - Return [ Ds\Sequence ]
- }
-
- Method [ <internal:ds> public method sum ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Sequence> public method unshift ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Collection ]
- }
-
- Method [ <internal:ds, prototype Countable> public method count ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
-
- - Parameters [0] {
- }
- - Return [ bool ]
- }
-
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
@@ -657,7 +97,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ mixed ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
+ Method [ <internal:ds> public method toArray ] {
- Parameters [0] {
}
@@ -680,7 +120,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Deque implements Ds\Sequence, ArrayAccess, IteratorAggregate, Traversable, Countable, JsonSerializable, Ds\Collection ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Seq implements IteratorAggregate, Traversable, Countable, JsonSerializable, ArrayAccess ] {
- Constants [1] {
Constant [ public int MIN_CAPACITY ] { 8 }
@@ -710,17 +150,16 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ Traversable ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
+ Method [ <internal:ds> public method clear ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
+ Method [ <internal:ds> public method copy ] {
- Parameters [0] {
}
- - Return [ Ds\Collection ]
}
Method [ <internal:ds, prototype Countable> public method count ] {
@@ -730,7 +169,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ int ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
+ Method [ <internal:ds> public method isEmpty ] {
- Parameters [0] {
}
@@ -744,7 +183,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ mixed ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
+ Method [ <internal:ds> public method toArray ] {
- Parameters [0] {
}
@@ -765,7 +204,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method allocate ] {
+ Method [ <internal:ds> public method allocate ] {
- Parameters [1] {
Parameter #0 [ <required> int $capacity ]
@@ -779,14 +218,14 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method capacity ] {
+ Method [ <internal:ds> public method capacity ] {
- Parameters [0] {
}
- Return [ int ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method contains ] {
+ Method [ <internal:ds> public method contains ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
@@ -794,7 +233,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ bool ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method filter ] {
+ Method [ <internal:ds> public method filter ] {
- Parameters [1] {
Parameter #0 [ <optional> ?callable $callback = <default> ]
@@ -802,27 +241,27 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ Ds\Sequence ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method find ] {
+ Method [ <internal:ds> public method find ] {
- Parameters [1] {
Parameter #0 [ <required> $value ]
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method first ] {
+ Method [ <internal:ds> public method first ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method get ] {
+ Method [ <internal:ds> public method get ] {
- Parameters [1] {
Parameter #0 [ <required> int $index ]
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method insert ] {
+ Method [ <internal:ds> public method insert ] {
- Parameters [2] {
Parameter #0 [ <required> int $index ]
@@ -830,7 +269,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method join ] {
+ Method [ <internal:ds> public method join ] {
- Parameters [1] {
Parameter #0 [ <optional> string $glue = <default> ]
@@ -838,13 +277,13 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ string ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method last ] {
+ Method [ <internal:ds> public method last ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method map ] {
+ Method [ <internal:ds> public method map ] {
- Parameters [1] {
Parameter #0 [ <required> callable $callback ]
@@ -852,7 +291,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ Ds\Sequence ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method merge ] {
+ Method [ <internal:ds> public method merge ] {
- Parameters [1] {
Parameter #0 [ <required> $values ]
@@ -893,20 +332,20 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ void ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method pop ] {
+ Method [ <internal:ds> public method pop ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method push ] {
+ Method [ <internal:ds> public method push ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method reduce ] {
+ Method [ <internal:ds> public method reduce ] {
- Parameters [2] {
Parameter #0 [ <required> callable $callback ]
@@ -914,14 +353,14 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method remove ] {
+ Method [ <internal:ds> public method remove ] {
- Parameters [1] {
Parameter #0 [ <required> int $index ]
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method reverse ] {
+ Method [ <internal:ds> public method reverse ] {
- Parameters [0] {
}
@@ -934,14 +373,14 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ Ds\Sequence ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method rotate ] {
+ Method [ <internal:ds> public method rotate ] {
- Parameters [1] {
Parameter #0 [ <required> int $rotations ]
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method set ] {
+ Method [ <internal:ds> public method set ] {
- Parameters [2] {
Parameter #0 [ <required> int $index ]
@@ -949,13 +388,13 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method shift ] {
+ Method [ <internal:ds> public method shift ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method slice ] {
+ Method [ <internal:ds> public method slice ] {
- Parameters [2] {
Parameter #0 [ <required> int $index ]
@@ -964,7 +403,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ Ds\Sequence ]
}
- Method [ <internal:ds, prototype Ds\Sequence> public method sort ] {
+ Method [ <internal:ds> public method sort ] {
- Parameters [1] {
Parameter #0 [ <optional> ?callable $comparator = <default> ]
@@ -985,321 +424,16 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds, prototype Ds\Sequence> public method unshift ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- }
- }
- }
-
- Class [ <internal:ds> <iterateable> final class Ds\Stack implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
-
- - Constants [0] {
- }
-
- - Static properties [0] {
- }
-
- - Static methods [0] {
- }
-
- - Properties [0] {
- }
-
- - Methods [19] {
- Method [ <internal:ds, ctor> public method __construct ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> $values = <default> ]
- }
- }
-
- Method [ <internal:ds> public method allocate ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $capacity ]
- }
- }
-
- Method [ <internal:ds> public method capacity ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds> public method peek ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> public method pop ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> public method push ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> ...$values ]
- }
- }
-
- Method [ <internal:ds, prototype IteratorAggregate> public method getIterator ] {
-
- - Parameters [0] {
- }
- - Return [ Traversable ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetExists ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $offset ]
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetGet ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetSet ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> mixed $offset ]
- Parameter #1 [ <required> mixed $value ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetUnset ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Collection ]
- }
-
- Method [ <internal:ds, prototype Countable> public method count ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
-
- - Parameters [0] {
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
-
- - Parameters [0] {
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:ds> public method __serialize ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:ds> public method __unserialize ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $data ]
- }
- }
- }
- }
-
- Class [ <internal:ds> <iterateable> final class Ds\Queue implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
-
- - Constants [1] {
- Constant [ public int MIN_CAPACITY ] { 8 }
- }
-
- - Static properties [0] {
- }
-
- - Static methods [0] {
- }
-
- - Properties [0] {
- }
-
- - Methods [19] {
- Method [ <internal:ds, ctor> public method __construct ] {
-
- - Parameters [1] {
- Parameter #0 [ <optional> $values = <default> ]
- }
- }
-
- Method [ <internal:ds> public method allocate ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> int $capacity ]
- }
- }
-
- Method [ <internal:ds> public method capacity ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds> public method peek ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> public method pop ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds> public method push ] {
+ Method [ <internal:ds> public method unshift ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
}
}
-
- Method [ <internal:ds, prototype IteratorAggregate> public method getIterator ] {
-
- - Parameters [0] {
- }
- - Return [ Traversable ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetExists ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $offset ]
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetGet ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetSet ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> mixed $offset ]
- Parameter #1 [ <required> mixed $value ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:ds, prototype ArrayAccess> public method offsetUnset ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> mixed $offset ]
- }
- - Tentative return [ void ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
-
- - Parameters [0] {
- }
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Collection ]
- }
-
- Method [ <internal:ds, prototype Countable> public method count ] {
-
- - Parameters [0] {
- }
- - Return [ int ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
-
- - Parameters [0] {
- }
- - Return [ bool ]
- }
-
- Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
-
- - Parameters [0] {
- }
- - Tentative return [ mixed ]
- }
-
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:ds> public method __serialize ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:ds> public method __unserialize ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $data ]
- }
- }
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Map implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Map implements IteratorAggregate, Traversable, Countable, JsonSerializable, ArrayAccess ] {
- Constants [1] {
Constant [ public int MIN_CAPACITY ] { 8 }
@@ -1595,17 +729,16 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ void ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
+ Method [ <internal:ds> public method clear ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
+ Method [ <internal:ds> public method copy ] {
- Parameters [0] {
}
- - Return [ Ds\Collection ]
}
Method [ <internal:ds, prototype Countable> public method count ] {
@@ -1615,7 +748,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ int ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
+ Method [ <internal:ds> public method isEmpty ] {
- Parameters [0] {
}
@@ -1629,7 +762,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ mixed ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
+ Method [ <internal:ds> public method toArray ] {
- Parameters [0] {
}
@@ -1652,7 +785,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Set implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Set implements IteratorAggregate, Traversable, Countable, JsonSerializable, ArrayAccess ] {
- Constants [1] {
Constant [ public int MIN_CAPACITY ] { 8 }
@@ -1884,17 +1017,16 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ void ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
+ Method [ <internal:ds> public method clear ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
+ Method [ <internal:ds> public method copy ] {
- Parameters [0] {
}
- - Return [ Ds\Collection ]
}
Method [ <internal:ds, prototype Countable> public method count ] {
@@ -1904,7 +1036,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ int ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
+ Method [ <internal:ds> public method isEmpty ] {
- Parameters [0] {
}
@@ -1918,7 +1050,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ mixed ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
+ Method [ <internal:ds> public method toArray ] {
- Parameters [0] {
}
@@ -1941,7 +1073,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\PriorityQueue implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Heap implements IteratorAggregate, Traversable, Countable, JsonSerializable ] {
- Constants [1] {
Constant [ public int MIN_CAPACITY ] { 8 }
@@ -1959,7 +1091,9 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Methods [15] {
Method [ <internal:ds, ctor> public method __construct ] {
- - Parameters [0] {
+ - Parameters [2] {
+ Parameter #0 [ <optional> $values = <default> ]
+ Parameter #1 [ <optional> ?callable $comparator = <default> ]
}
}
@@ -1977,9 +1111,10 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ int ]
}
- Method [ <internal:ds> public method peek ] {
+ Method [ <internal:ds> public method push ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <optional> ...$values ]
}
}
@@ -1989,11 +1124,9 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
}
}
- Method [ <internal:ds> public method push ] {
+ Method [ <internal:ds> public method peek ] {
- - Parameters [2] {
- Parameter #0 [ <required> $value ]
- Parameter #1 [ <required> $priority ]
+ - Parameters [0] {
}
}
@@ -2004,17 +1137,16 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ Traversable ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
+ Method [ <internal:ds> public method clear ] {
- Parameters [0] {
}
}
- Method [ <internal:ds, prototype Ds\Collection> public method copy ] {
+ Method [ <internal:ds> public method copy ] {
- Parameters [0] {
}
- - Return [ Ds\Collection ]
}
Method [ <internal:ds, prototype Countable> public method count ] {
@@ -2024,7 +1156,7 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Return [ int ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
+ Method [ <internal:ds> public method isEmpty ] {
- Parameters [0] {
}
@@ -2038,68 +1170,6 @@ Extension [ <persistent> extension #154 ds version 1.8.0 ] {
- Tentative return [ mixed ]
}
- Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:ds> public method __serialize ] {
-
- - Parameters [0] {
- }
- - Return [ array ]
- }
-
- Method [ <internal:ds> public method __unserialize ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $data ]
- }
- }
- }
- }
-
- Class [ <internal:ds> final class Ds\Pair implements JsonSerializable ] {
-
- - Constants [0] {
- }
-
- - Static properties [0] {
- }
-
- - Static methods [0] {
- }
-
- - Properties [2] {
- Property [ public $key = NULL ]
- Property [ public $value = NULL ]
- }
-
- - Methods [6] {
- Method [ <internal:ds, ctor> public method __construct ] {
-
- - Parameters [2] {
- Parameter #0 [ <optional> $key = <default> ]
- Parameter #1 [ <optional> $value = <default> ]
- }
- }
-
- Method [ <internal:ds> public method copy ] {
-
- - Parameters [0] {
- }
- - Return [ Ds\Pair ]
- }
-
- Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
-
- - Parameters [0] {
- }
- - Tentative return [ mixed ]
- }
-
Method [ <internal:ds> public method toArray ] {
- Parameters [0] {
diff --git a/composer.json b/composer.json
index 144b45c..0733777 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
"php": ">= 8.2.0"
},
"require-dev": {
- "php-ds/tests": "^1.8"
+ "php-ds/tests": "^2.0"
},
"scripts": {
"test" : "php test.php",
diff --git a/php-pecl-ds.spec b/php-pecl-ds.spec
index af4f4b1..7fb76e5 100644
--- a/php-pecl-ds.spec
+++ b/php-pecl-ds.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for php-pecl-ds
+# remirepo spec file for php-pecl-ds2
#
# SPDX-FileCopyrightText: Copyright 2016-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
@@ -7,69 +7,49 @@
# Please, preserve the changelog entries
#
-%if 0%{?scl:1}
-%scl_package php-pecl-ds
-# No phpunit in SCL
-%bcond_with tests
-%else
+%{?scl:%scl_package php-pecl-ds2}
+
%bcond_without tests
-%endif
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name ds
%global pie_vend php-ds
%global pie_proj ext-ds
-# After json
%global ini_name 40-%{pecl_name}.ini
-%global sources %{gh_proj}-%{version}
-%global _configure ../%{sources}/configure
-
+%global _configure ../configure
# Github forge
-%global gh_vend php-ds
-%global gh_proj ext-ds
-%global forgeurl0 https://github.com/%{gh_vend}/%{gh_proj}
-%global tag0 v%{version}
+%global gh_vend %{pie_vend}
+%global gh_proj %{pie_proj}
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
# for EL-8 to avoid TAG usage
-%global archivename0 %{gh_proj}-%{version}
-
-# For test suite, see https://github.com/php-ds/tests/tags
-%global forgeurl1 https://github.com/%{gh_vend}/tests
-%global tag1 v1.8.0
-%global archivename1 tests-1.8.0
+%global archivename %{gh_proj}-%{version}
Summary: Data Structures for PHP
-Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}2
License: MIT
-Version: 1.8.0
+Version: 2.0.0
Release: 1%{?dist}
-%if 0%{?rhel} == 8
-URL: %{forgeurl0}
-Source0: %{forgeurl0}/archive/v%{tag0}/%{archivename0}.tar.gz
-Source1: %{forgeurl1}/archive/v%{tag1}/%{archivename1}.tar.gz
-%else
-%forgemeta -a
+%forgemeta
URL: %{forgeurl}
-Source0: %{forgesource0}
-Source1: %{forgesource1}
-%endif
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 8.2
-BuildRequires: %{?scl_prefix}php-gmp
-BuildRequires: %{?scl_prefix}php-json
-%if %{with tests}
-BuildRequires: %{_bindir}/phpunit11
-BuildRequires: %{_bindir}/phpab
-%endif
-#BuildRequires: php-debuginfo
-#BuildRequires: gdb
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-Requires: %{?scl_prefix}php-json%{?_isa}
+
+%if 0%{?fedora} >= 45 || 0%{?rhel} >= 11 || "%{php_version}" > "8.6"
+Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 2
+Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+%else
+# A single version can be installed
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 2
+%endif
# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
@@ -90,22 +70,16 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -q -c -a 1
-mv %{archivename1} tests
+%forgesetup
-cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_DS_VERSION/{s/.* "//;s/".*$//;p}' php_ds.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}.
exit 1
fi
-cd ..
mkdir NTS
-%if %{with_zts}
-mkdir ZTS
-%endif
# Create configuration file
cat << 'EOF' | tee %{ini_name}
@@ -125,18 +99,12 @@ peclbuild() {
%make_build
}
-cd %{sources}
%{__phpize}
sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
-cd ../NTS
+cd NTS
peclbuild %{__phpconfig}
-%if %{with_zts}
-cd ../ZTS
-peclbuild %{__ztsphpconfig}
-%endif
-
%install
%{?dtsenable}
@@ -146,68 +114,36 @@ peclbuild %{__ztsphpconfig}
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-%if %{with_zts}
-%make_install -C ZTS
-
-install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
-%endif
-
%check
-[ -f %{php_extdir}/json.so ] && modules="-d extension=json.so"
-
: Minimal load test for NTS extension
%{__php} --no-php-ini \
- $modules \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
-%if %{with_zts}
-: Minimal load test for ZTS extension
-%{__ztsphp} --no-php-ini \
- $modules \
- --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep '^%{pecl_name}$'
-%endif
-
%if %{with tests}
-# This file is not a test file
-mv tests/tests/CollectionTest.php tests/tests/Collection.php
-
-: Generate autoloader for tests
-%{_bindir}/phpab \
- --output tests/autoload.php \
- tests
-
-: Run upstream test suite
-%{_bindir}/php \
- -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- %{_bindir}/phpunit11 \
- --do-not-cache-result \
- --bootstrap tests/autoload.php \
- tests
+: Upstream test suite for NTS extension
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+%{__php} -n run-tests.php -q --show-diff %{?_smp_mflags}
%endif
%files
-%license %{sources}/LICENSE
-%doc %{sources}/composer.json
-%doc %{sources}/*.md
+%license LICENSE
+%doc composer.json
+%doc *.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
-%if %{with_zts}
-%config(noreplace) %{php_ztsinidir}/%{ini_name}
-%{php_ztsextdir}/%{pecl_name}.so
-%endif
-
%changelog
-* Tue Apr 14 2026 Remi Collet <remi@remirepo.net> - 1.8.0-1
-- update to 1.8.0
-- raise dependency on PHP 8.2
-- switch to phpunit11
+* Tue Apr 14 2026 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- rename to php-pecl-ds2
+- run standard php test suite from extension sources
+ instead of separate tests using phpunit
+- drop ZTS build
* Fri Mar 13 2026 Remi Collet <remi@remirepo.net> - 1.6.0-4
- drop pear/pecl dependency