Skip to content

Commit c40d970

Browse files
committed
Update stubs
1 parent 8616715 commit c40d970

File tree

1,136 files changed

+13714
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,136 files changed

+13714
-243
lines changed

Php8StubsMap.php

+76-1
Large diffs are not rendered by default.

stubs/Zend/ArrayAccess.php

+19
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,33 @@
33
interface ArrayAccess
44
{
55
/** @return bool */
6+
#[\Until('8.1')]
67
public function offsetExists(mixed $offset);
8+
/** @tentative-return-type */
9+
#[\Since('8.1')]
10+
public function offsetExists(mixed $offset) : bool;
711
/**
812
* Actually this should be return by ref but atm cannot be.
913
* @return mixed
1014
*/
15+
#[\Until('8.1')]
1116
public function offsetGet(mixed $offset);
17+
/**
18+
* Actually this should be return by ref but atm cannot be.
19+
* @tentative-return-type
20+
*/
21+
#[\Since('8.1')]
22+
public function offsetGet(mixed $offset) : mixed;
1223
/** @return void */
24+
#[\Until('8.1')]
1325
public function offsetSet(mixed $offset, mixed $value);
26+
/** @tentative-return-type */
27+
#[\Since('8.1')]
28+
public function offsetSet(mixed $offset, mixed $value) : void;
1429
/** @return void */
30+
#[\Until('8.1')]
1531
public function offsetUnset(mixed $offset);
32+
/** @tentative-return-type */
33+
#[\Since('8.1')]
34+
public function offsetUnset(mixed $offset) : void;
1635
}

stubs/Zend/Attribute.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44
final class Attribute
55
{
66
public function __construct(int $flags = Attribute::TARGET_ALL)

stubs/Zend/BackedEnum.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
#[\Since('8.1')]
4+
interface BackedEnum extends \UnitEnum
5+
{
6+
public static function from(int|string $value) : static;
7+
public static function tryFrom(int|string $value) : ?static;
8+
}

stubs/Zend/Closure.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
4+
/**
5+
* @strict-properties
6+
* @not-serializable
7+
*/
48
final class Closure
59
{
610
private function __construct()

stubs/Zend/Countable.php

+4
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
interface Countable
44
{
55
/** @return int */
6+
#[\Until('8.1')]
67
public function count();
8+
/** @tentative-return-type */
9+
#[\Since('8.1')]
10+
public function count() : int;
711
}

stubs/Zend/Error.php

+15
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
class Error implements \Throwable
44
{
55
/** @implementation-alias Exception::__clone */
6+
#[\Until('8.1')]
67
private final function __clone() : void
78
{
89
}
10+
/** @implementation-alias Exception::__clone */
11+
#[\Since('8.1')]
12+
private function __clone() : void
13+
{
14+
}
915
/** @implementation-alias Exception::__construct */
1016
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
1117
{
@@ -14,9 +20,18 @@ public function __construct(string $message = "", int $code = 0, ?Throwable $pre
1420
* @return void
1521
* @implementation-alias Exception::__wakeup
1622
*/
23+
#[\Until('8.1')]
1724
public function __wakeup()
1825
{
1926
}
27+
/**
28+
* @tentative-return-type
29+
* @implementation-alias Exception::__wakeup
30+
*/
31+
#[\Since('8.1')]
32+
public function __wakeup() : void
33+
{
34+
}
2035
/** @implementation-alias Exception::getMessage */
2136
public final function getMessage() : string
2237
{

stubs/Zend/Exception.php

+11
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,27 @@
22

33
class Exception implements \Throwable
44
{
5+
#[\Until('8.1')]
56
private final function __clone() : void
67
{
78
}
9+
#[\Since('8.1')]
10+
private function __clone() : void
11+
{
12+
}
813
public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
914
{
1015
}
1116
/** @return void */
17+
#[\Until('8.1')]
1218
public function __wakeup()
1319
{
1420
}
21+
/** @tentative-return-type */
22+
#[\Since('8.1')]
23+
public function __wakeup() : void
24+
{
25+
}
1526
public final function getMessage() : string
1627
{
1728
}

stubs/Zend/Fiber.php

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
/** @generate-class-entries */
4+
/**
5+
* @strict-properties
6+
* @not-serializable
7+
*/
8+
#[\Since('8.1')]
9+
final class Fiber
10+
{
11+
public function __construct(callable $callback)
12+
{
13+
}
14+
public function start(mixed ...$args) : mixed
15+
{
16+
}
17+
public function resume(mixed $value = null) : mixed
18+
{
19+
}
20+
public function throw(Throwable $exception) : mixed
21+
{
22+
}
23+
public function isStarted() : bool
24+
{
25+
}
26+
public function isSuspended() : bool
27+
{
28+
}
29+
public function isRunning() : bool
30+
{
31+
}
32+
public function isTerminated() : bool
33+
{
34+
}
35+
public function getReturn() : mixed
36+
{
37+
}
38+
public static function getCurrent() : ?Fiber
39+
{
40+
}
41+
public static function suspend(mixed $value = null) : mixed
42+
{
43+
}
44+
}

stubs/Zend/FiberError.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
#[\Since('8.1')]
4+
final class FiberError extends \Error
5+
{
6+
public function __construct()
7+
{
8+
}
9+
}

stubs/Zend/Generator.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
4+
/**
5+
* @strict-properties
6+
* @not-serializable
7+
*/
48
final class Generator implements \Iterator
59
{
610
public function rewind() : void

stubs/Zend/InternalIterator.php

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
<?php
22

3+
/**
4+
* @not-serializable
5+
*/
36
final class InternalIterator implements \Iterator
47
{
5-
private function __construct();
8+
private function __construct()
9+
{
10+
}
611
/** @return mixed */
12+
#[\Until('8.1')]
713
public function current();
14+
#[\Since('8.1')]
15+
public function current() : mixed
16+
{
17+
}
818
/** @return mixed */
19+
#[\Until('8.1')]
920
public function key();
10-
public function next() : void;
11-
public function valid() : bool;
12-
public function rewind() : void;
21+
#[\Since('8.1')]
22+
public function key() : mixed
23+
{
24+
}
25+
public function next() : void
26+
{
27+
}
28+
public function valid() : bool
29+
{
30+
}
31+
public function rewind() : void
32+
{
33+
}
1334
}

stubs/Zend/Iterator.php

+20
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,33 @@
33
interface Iterator extends \Traversable
44
{
55
/** @return mixed */
6+
#[\Until('8.1')]
67
public function current();
8+
/** @tentative-return-type */
9+
#[\Since('8.1')]
10+
public function current() : mixed;
711
/** @return void */
12+
#[\Until('8.1')]
813
public function next();
14+
/** @tentative-return-type */
15+
#[\Since('8.1')]
16+
public function next() : void;
917
/** @return mixed */
18+
#[\Until('8.1')]
1019
public function key();
20+
/** @tentative-return-type */
21+
#[\Since('8.1')]
22+
public function key() : mixed;
1123
/** @return bool */
24+
#[\Until('8.1')]
1225
public function valid();
26+
/** @tentative-return-type */
27+
#[\Since('8.1')]
28+
public function valid() : bool;
1329
/** @return void */
30+
#[\Until('8.1')]
1431
public function rewind();
32+
/** @tentative-return-type */
33+
#[\Since('8.1')]
34+
public function rewind() : void;
1535
}

stubs/Zend/IteratorAggregate.php

+4
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
interface IteratorAggregate extends \Traversable
44
{
55
/** @return Traversable */
6+
#[\Until('8.1')]
67
public function getIterator();
8+
/** @tentative-return-type */
9+
#[\Since('8.1')]
10+
public function getIterator() : Traversable;
711
}

stubs/Zend/ReturnTypeWillChange.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
#[\Since('8.1')]
4+
final class ReturnTypeWillChange
5+
{
6+
public function __construct()
7+
{
8+
}
9+
}

stubs/Zend/Throwable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44
interface Throwable extends \Stringable
55
{
66
public function getMessage() : string;

stubs/Zend/Traversable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
44
interface Traversable
55
{
66
}

stubs/Zend/UnitEnum.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
/** @generate-class-entries */
4+
#[\Since('8.1')]
5+
interface UnitEnum
6+
{
7+
public static function cases() : array;
8+
}

stubs/Zend/WeakMap.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
22

3+
/**
4+
* @strict-properties
5+
* @not-serializable
6+
*/
37
final class WeakMap implements \ArrayAccess, \Countable, \IteratorAggregate
48
{
5-
/**
6-
* @param object $object
7-
*/
9+
/** @param object $object */
810
public function offsetGet($object) : mixed
911
{
1012
}

stubs/Zend/WeakReference.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?php
22

3-
/** @generate-function-entries */
3+
/** @generate-class-entries */
4+
/**
5+
* @strict-properties
6+
* @not-serializable
7+
*/
48
final class WeakReference
59
{
610
public function __construct()

stubs/Zend/debug_backtrace.php

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

3+
/**
4+
* @return array<int, array>
5+
* @refcount 1
6+
*/
37
function debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0) : array
48
{
59
}

stubs/Zend/define.php

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?php
22

33
/** @param mixed $value */
4+
#[\Until('8.1')]
45
function define(string $constant_name, $value, bool $case_insensitive = false) : bool
56
{
7+
}
8+
#[\Since('8.1')]
9+
function define(string $constant_name, mixed $value, bool $case_insensitive = false) : bool
10+
{
611
}

stubs/Zend/enum_exists.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
#[\Since('8.1')]
4+
function enum_exists(string $enum, bool $autoload = true) : bool
5+
{
6+
}

stubs/Zend/func_get_args.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
/** @return array<int, mixed> */
34
function func_get_args() : array
45
{
56
}

0 commit comments

Comments
 (0)