summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION562
-rw-r--r--php-pecl-ds.spec134
4 files changed, 511 insertions, 194 deletions
diff --git a/.gitignore b/.gitignore
index 0f369b4..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,9 @@
+clog
+package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
+*.tar.xz
+*.tar.xz.asc
*.src.rpm
-*.xml
+*/*rpm
diff --git a/PHPINFO b/PHPINFO
index 56730ba..9eba475 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,4 +2,4 @@
ds
ds support => enabled
-ds version => 1.2.9
+ds version => 1.5.0
diff --git a/REFLECTION b/REFLECTION
index acddce9..842258a 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #90 ds version 1.2.9 ] {
+Extension [ <persistent> extension #63 ds version 1.5.0 ] {
- Dependencies {
Dependency [ json (Required) ]
@@ -32,12 +32,12 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <required> $obj ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
}
}
- Interface [ <internal:ds> interface Ds\Collection extends Traversable, Countable, JsonSerializable ] {
+ Interface [ <internal:ds> interface Ds\Collection extends IteratorAggregate, Traversable, Countable, JsonSerializable ] {
- Constants [0] {
}
@@ -51,7 +51,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [6] {
+ - Methods [7] {
Method [ <internal:ds> abstract public method clear ] {
- Parameters [0] {
@@ -69,7 +69,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds> abstract public method toArray ] {
@@ -79,21 +79,30 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- 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 ]
}
}
}
- Interface [ <internal:ds> interface Ds\Sequence extends Ds\Collection, JsonSerializable, Countable, Traversable ] {
+ Interface [ <internal:ds> interface Ds\Sequence extends Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
- Constants [0] {
}
@@ -107,11 +116,11 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [29] {
+ - Methods [34] {
Method [ <internal:ds> abstract public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -119,7 +128,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds> abstract public method contains ] {
@@ -127,13 +136,13 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds> abstract public method filter ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $callback ]
+ Parameter #0 [ <optional> ?callable $callback = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -154,14 +163,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> abstract public method get ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
Method [ <internal:ds> abstract public method insert ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <optional> ...$values ]
}
}
@@ -169,7 +178,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> abstract public method join ] {
- Parameters [1] {
- Parameter #0 [ <optional> string $glue ]
+ Parameter #0 [ <optional> string $glue = <default> ]
}
- Return [ string ]
}
@@ -213,14 +222,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial ]
+ Parameter #1 [ <optional> $initial = <default> ]
}
}
Method [ <internal:ds> abstract public method remove ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
@@ -233,14 +242,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> abstract public method rotate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $rotations ]
+ Parameter #0 [ <required> int $rotations ]
}
}
Method [ <internal:ds> abstract public method set ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <required> $value ]
}
}
@@ -254,8 +263,8 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> abstract public method slice ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
- Parameter #1 [ <optional> integer or NULL $length ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> ?int $length = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -263,7 +272,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> abstract public method sort ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
}
@@ -291,7 +300,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, inherits Ds\Collection> abstract public method toArray ] {
@@ -301,24 +310,66 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- 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, Traversable, Countable, JsonSerializable, Ds\Collection ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Vector implements Ds\Sequence, ArrayAccess, IteratorAggregate, Traversable, Countable, JsonSerializable, Ds\Collection ] {
- Constants [1] {
- Constant [ public integer MIN_CAPACITY ] { 8 }
+ Constant [ public int MIN_CAPACITY ] { 8 }
}
- Static properties [0] {
@@ -330,18 +381,25 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [34] {
+ - Methods [39] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $values ]
+ 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> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -356,7 +414,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Sequence> public method contains ] {
@@ -364,13 +422,13 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype Ds\Sequence> public method filter ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $callback ]
+ Parameter #0 [ <optional> ?callable $callback = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -391,14 +449,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method get ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
Method [ <internal:ds, prototype Ds\Sequence> public method insert ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <optional> ...$values ]
}
}
@@ -406,7 +464,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method join ] {
- Parameters [1] {
- Parameter #0 [ <optional> string $glue ]
+ Parameter #0 [ <optional> string $glue = <default> ]
}
- Return [ string ]
}
@@ -433,6 +491,39 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- 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] {
@@ -450,14 +541,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial ]
+ Parameter #1 [ <optional> $initial = <default> ]
}
}
Method [ <internal:ds, prototype Ds\Sequence> public method remove ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
@@ -477,14 +568,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method rotate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $rotations ]
+ Parameter #0 [ <required> int $rotations ]
}
}
Method [ <internal:ds, prototype Ds\Sequence> public method set ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <required> $value ]
}
}
@@ -498,8 +589,8 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method slice ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
- Parameter #1 [ <optional> integer or NULL $length ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> ?int $length = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -507,14 +598,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method sort ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
}
Method [ <internal:ds> public method sorted ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -549,20 +640,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -574,10 +666,10 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Deque implements Ds\Sequence, Traversable, Countable, JsonSerializable, Ds\Collection ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Deque implements Ds\Sequence, ArrayAccess, IteratorAggregate, Traversable, Countable, JsonSerializable, Ds\Collection ] {
- Constants [1] {
- Constant [ public integer MIN_CAPACITY ] { 8 }
+ Constant [ public int MIN_CAPACITY ] { 8 }
}
- Static properties [0] {
@@ -589,12 +681,19 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [34] {
+ - Methods [39] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $values ]
+ Parameter #0 [ <optional> $values = <default> ]
+ }
+ }
+
+ Method [ <internal:ds, prototype IteratorAggregate> public method getIterator ] {
+
+ - Parameters [0] {
}
+ - Return [ Traversable ]
}
Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
@@ -614,20 +713,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -640,7 +740,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -655,7 +755,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Sequence> public method contains ] {
@@ -663,13 +763,13 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype Ds\Sequence> public method filter ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $callback ]
+ Parameter #0 [ <optional> ?callable $callback = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -690,14 +790,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method get ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
Method [ <internal:ds, prototype Ds\Sequence> public method insert ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <optional> ...$values ]
}
}
@@ -705,7 +805,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method join ] {
- Parameters [1] {
- Parameter #0 [ <optional> string $glue ]
+ Parameter #0 [ <optional> string $glue = <default> ]
}
- Return [ string ]
}
@@ -732,6 +832,39 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- 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] {
@@ -749,14 +882,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial ]
+ Parameter #1 [ <optional> $initial = <default> ]
}
}
Method [ <internal:ds, prototype Ds\Sequence> public method remove ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
@@ -776,14 +909,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method rotate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $rotations ]
+ Parameter #0 [ <required> int $rotations ]
}
}
Method [ <internal:ds, prototype Ds\Sequence> public method set ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
Parameter #1 [ <required> $value ]
}
}
@@ -797,8 +930,8 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method slice ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
- Parameter #1 [ <optional> integer or NULL $length ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> ?int $length = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -806,14 +939,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds, prototype Ds\Sequence> public method sort ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
}
Method [ <internal:ds> public method sorted ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
- Return [ Ds\Sequence ]
}
@@ -833,7 +966,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Stack implements Ds\Collection, JsonSerializable, Countable, Traversable ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Stack implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
- Constants [0] {
}
@@ -847,18 +980,18 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [12] {
+ - Methods [17] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $values ]
+ Parameter #0 [ <optional> $values = <default> ]
}
}
Method [ <internal:ds> public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -866,7 +999,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds> public method peek ] {
@@ -888,6 +1021,46 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
+ 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] {
@@ -905,20 +1078,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -930,10 +1104,10 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Queue implements Ds\Collection, JsonSerializable, Countable, Traversable ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Queue implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
- Constants [1] {
- Constant [ public integer MIN_CAPACITY ] { 8 }
+ Constant [ public int MIN_CAPACITY ] { 8 }
}
- Static properties [0] {
@@ -945,18 +1119,18 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [12] {
+ - Methods [17] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $values ]
+ Parameter #0 [ <optional> $values = <default> ]
}
}
Method [ <internal:ds> public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -964,7 +1138,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds> public method peek ] {
@@ -986,6 +1160,46 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
+ 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] {
@@ -1003,20 +1217,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -1028,10 +1243,10 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Map implements Ds\Collection, JsonSerializable, Countable, Traversable ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Map implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
- Constants [1] {
- Constant [ public integer MIN_CAPACITY ] { 8 }
+ Constant [ public int MIN_CAPACITY ] { 8 }
}
- Static properties [0] {
@@ -1043,18 +1258,18 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [38] {
+ - Methods [43] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $values ]
+ Parameter #0 [ <optional> $values = <default> ]
}
}
Method [ <internal:ds> public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -1069,7 +1284,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds> public method diff ] {
@@ -1083,7 +1298,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method filter ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $callback ]
+ Parameter #0 [ <optional> ?callable $callback = <default> ]
}
- Return [ Ds\Map ]
}
@@ -1099,7 +1314,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> $key ]
- Parameter #1 [ <optional> $default ]
+ Parameter #1 [ <optional> $default = <default> ]
}
}
@@ -1108,7 +1323,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <required> $key ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds> public method hasValue ] {
@@ -1116,7 +1331,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <required> $value ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds> public method intersect ] {
@@ -1137,14 +1352,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method ksort ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
}
Method [ <internal:ds> public method ksorted ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
- Return [ Ds\Map ]
}
@@ -1198,7 +1413,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial ]
+ Parameter #1 [ <optional> $initial = <default> ]
}
}
@@ -1206,7 +1421,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> $key ]
- Parameter #1 [ <optional> $default ]
+ Parameter #1 [ <optional> $default = <default> ]
}
}
@@ -1226,7 +1441,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method skip ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $position ]
+ Parameter #0 [ <required> int $position ]
}
- Return [ Ds\Pair ]
}
@@ -1234,8 +1449,8 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method slice ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
- Parameter #1 [ <optional> integer or NULL $length ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> ?int $length = <default> ]
}
- Return [ Ds\Map ]
}
@@ -1243,14 +1458,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method sort ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
}
Method [ <internal:ds> public method sorted ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
- Return [ Ds\Map ]
}
@@ -1284,6 +1499,46 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Return [ Ds\Map ]
}
+ 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] {
@@ -1301,20 +1556,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -1326,10 +1582,10 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\Set implements Ds\Collection, JsonSerializable, Countable, Traversable ] {
+ Class [ <internal:ds> <iterateable> final class Ds\Set implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate, ArrayAccess ] {
- Constants [1] {
- Constant [ public integer MIN_CAPACITY ] { 8 }
+ Constant [ public int MIN_CAPACITY ] { 8 }
}
- Static properties [0] {
@@ -1341,11 +1597,11 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [30] {
+ - Methods [35] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <optional> $values ]
+ Parameter #0 [ <optional> $values = <default> ]
}
}
@@ -1359,7 +1615,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -1367,7 +1623,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds> public method contains ] {
@@ -1375,7 +1631,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [1] {
Parameter #0 [ <optional> ...$values ]
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds> public method diff ] {
@@ -1389,7 +1645,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method filter ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $predicate ]
+ Parameter #0 [ <optional> ?callable $predicate = <default> ]
}
- Return [ Ds\Set ]
}
@@ -1403,7 +1659,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method get ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $index ]
+ Parameter #0 [ <required> int $index ]
}
}
@@ -1418,7 +1674,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method join ] {
- Parameters [1] {
- Parameter #0 [ <optional> string $glue ]
+ Parameter #0 [ <optional> string $glue = <default> ]
}
}
@@ -1448,7 +1704,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [2] {
Parameter #0 [ <required> callable $callback ]
- Parameter #1 [ <optional> $initial ]
+ Parameter #1 [ <optional> $initial = <default> ]
}
}
@@ -1475,8 +1731,8 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method slice ] {
- Parameters [2] {
- Parameter #0 [ <required> integer $index ]
- Parameter #1 [ <optional> integer or NULL $length ]
+ Parameter #0 [ <required> int $index ]
+ Parameter #1 [ <optional> ?int $length = <default> ]
}
- Return [ Ds\Set ]
}
@@ -1484,14 +1740,14 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method sort ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
}
Method [ <internal:ds> public method sorted ] {
- Parameters [1] {
- Parameter #0 [ <optional> callable or NULL $comparator ]
+ Parameter #0 [ <optional> ?callable $comparator = <default> ]
}
- Return [ Ds\Set ]
}
@@ -1518,6 +1774,46 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Return [ Ds\Set ]
}
+ 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] {
@@ -1535,20 +1831,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -1560,10 +1857,10 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
- Class [ <internal:ds> <iterateable> final class Ds\PriorityQueue implements Ds\Collection, JsonSerializable, Countable, Traversable ] {
+ Class [ <internal:ds> <iterateable> final class Ds\PriorityQueue implements Ds\Collection, JsonSerializable, Countable, Traversable, IteratorAggregate ] {
- Constants [1] {
- Constant [ public integer MIN_CAPACITY ] { 8 }
+ Constant [ public int MIN_CAPACITY ] { 8 }
}
- Static properties [0] {
@@ -1575,7 +1872,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Properties [0] {
}
- - Methods [12] {
+ - Methods [13] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [0] {
@@ -1585,7 +1882,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
Method [ <internal:ds> public method allocate ] {
- Parameters [1] {
- Parameter #0 [ <required> integer $capacity ]
+ Parameter #0 [ <required> int $capacity ]
}
}
@@ -1593,7 +1890,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds> public method peek ] {
@@ -1616,6 +1913,13 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
}
+ Method [ <internal:ds, prototype IteratorAggregate> public method getIterator ] {
+
+ - Parameters [0] {
+ }
+ - Return [ Traversable ]
+ }
+
Method [ <internal:ds, prototype Ds\Collection> public method clear ] {
- Parameters [0] {
@@ -1633,20 +1937,21 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
- - Return [ integer ]
+ - Return [ int ]
}
Method [ <internal:ds, prototype Ds\Collection> public method isEmpty ] {
- Parameters [0] {
}
- - Return [ boolean ]
+ - Return [ bool ]
}
Method [ <internal:ds, prototype JsonSerializable> public method jsonSerialize ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds, prototype Ds\Collection> public method toArray ] {
@@ -1670,16 +1975,16 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
}
- Properties [2] {
- Property [ <default> public $key ]
- Property [ <default> public $value ]
+ Property [ public $key = NULL ]
+ Property [ public $value = NULL ]
}
- Methods [4] {
Method [ <internal:ds, ctor> public method __construct ] {
- Parameters [2] {
- Parameter #0 [ <optional> $key ]
- Parameter #1 [ <optional> $value ]
+ Parameter #0 [ <optional> $key = <default> ]
+ Parameter #1 [ <optional> $value = <default> ]
}
}
@@ -1694,6 +1999,7 @@ Extension [ <persistent> extension #90 ds version 1.2.9 ] {
- Parameters [0] {
}
+ - Tentative return [ mixed ]
}
Method [ <internal:ds> public method toArray ] {
diff --git a/php-pecl-ds.spec b/php-pecl-ds.spec
index 4514ec4..b9156b5 100644
--- a/php-pecl-ds.spec
+++ b/php-pecl-ds.spec
@@ -1,91 +1,67 @@
# remirepo spec file for php-pecl-ds
#
-# Copyright (c) 2016-2019 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2016-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%if 0%{?scl:1}
%scl_package php-pecl-ds
-%global sub_prefix %{scl_prefix}
# No phpunit in SCL
-%global with_tests 0
+%bcond_with tests
%else
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
%endif
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name ds
# After json
%global ini_name 40-%{pecl_name}.ini
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
# For test suite, see https://github.com/php-ds/tests/commits/master
-%global gh_commit 31d238c463ff04b5bc8a6015b19be134175be141
+# version 1.5.1
+%global gh_commit 3d14aa6f8c25d38d79c90924150c51636544e4a8
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner php-ds
%global gh_project tests
Summary: Data Structures for PHP
-Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.2.9
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
+Version: 1.5.0
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
# Only use for tests during the build, no value to be packaged separately
-# in composer.json: "require-dev": { "php-ds/tests": "dev-master" }
+# in composer.json: "require-dev": { "php-ds/tests": "^1.5.0" }
Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{gh_short}.tar.gz
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.4
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-gmp
BuildRequires: %{?scl_prefix}php-json
-%if %{with_tests}
-BuildRequires: %{_bindir}/phpunit6
+%if %{with tests}
+BuildRequires: %{_bindir}/phpunit9
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}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
@@ -97,14 +73,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c -a 1
-mv %{pecl_name}-%{version} NTS
mv %{gh_project}-%{gh_commit} tests
# Don't install/register tests, install examples as doc
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
-cd NTS
-
+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
@@ -113,9 +87,9 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -136,14 +110,15 @@ peclbuild() {
make %{?_smp_mflags}
}
-cd NTS
-%{_bindir}/phpize
-peclbuild %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclbuild %{__phpconfig}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclbuild %{_bindir}/zts-php-config
+peclbuild %{__ztsphpconfig}
%endif
@@ -168,7 +143,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -193,26 +168,23 @@ fi
%check
-modules="-d extension=json.so"
+[ -f %{php_extdir}/json.so ] && modules="-d extension=json.so"
-cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
$modules \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
$modules \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%endif
-cd ..
-%if %{with_tests}
+%if %{with tests}
: Generate autoloader for tests
%{_bindir}/phpab \
--output tests/autoload.php \
@@ -221,14 +193,15 @@ cd ..
: Run upstream test suite
%{_bindir}/php \
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- %{_bindir}/phpunit6 \
+ %{_bindir}/phpunit9 \
+ --do-not-cache-result \
--bootstrap tests/autoload.php \
- tests
+ --verbose tests
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%{!?_licensedir:%doc %{pecl_docdir}/%{pecl_name}}
%{pecl_xmldir}/%{name}.xml
@@ -242,6 +215,39 @@ cd ..
%changelog
+* Wed Dec 20 2023 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.4.0-3
+- rebuild for PHP 8.3.0RC1
+
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 1.4.0-2
+- build out of sources tree
+- add upstream patch for PHP 8.3
+
+* Tue Dec 14 2021 Remi Collet <remi@remirepo.net> - 1.4.0-1
+- update to 1.4.0
+- raise dependency on PHP 7.3
+- drop all patches merged upstream
+- switch to phpunit8
+
+* Wed Nov 3 2021 Remi Collet <remi@remirepo.net> - 1.3.0-6
+- add patches for PHP 8.1 from upstream and from
+ https://github.com/php-ds/ext-ds/pull/187
+
+* Fri Mar 26 2021 Remi Collet <remi@remirepo.net> - 1.3.0-4
+- switch to phpunit7
+
+* Tue Nov 3 2020 Remi Collet <remi@remirepo.net> - 1.3.0-2
+- fix segfault using patch from
+ https://github.com/php-ds/ext-ds/pull/165
+
+* Wed Oct 14 2020 Remi Collet <remi@remirepo.net> - 1.3.0-1
+- update to 1.3.0
+
+* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.2.9-2
+- rebuild for 7.4.0RC1
+
* Mon May 13 2019 Remi Collet <remi@remirepo.net> - 1.2.9-1
- update to 1.2.9