Skip to content

Commit 195d051

Browse files
committed
ext/standard: mark ext/random as a required dependency
As the shuffle() and array_rand() functions use part of the Random API
1 parent b843e03 commit 195d051

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ext/reflection/tests/ReflectionExtension_getDependencies_variation2.phpt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ Felix De Vliegher <felix.devliegher@gmail.com>
77
$standard = new ReflectionExtension('standard');
88
var_dump($standard->getDependencies());
99
?>
10-
--EXPECTF--
11-
array(%d) {
10+
--EXPECT--
11+
array(3) {
12+
["random"]=>
13+
string(8) "Required"
1214
["uri"]=>
13-
%s(8) "Required"
15+
string(8) "Required"
1416
["session"]=>
15-
%s(8) "Optional"
17+
string(8) "Optional"
1618
}

ext/standard/basic_functions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ static void user_shutdown_function_dtor(zval *zv);
140140
static void user_tick_function_dtor(user_tick_function_entry *tick_function_entry);
141141

142142
static const zend_module_dep standard_deps[] = { /* {{{ */
143+
ZEND_MOD_REQUIRED("random")
143144
ZEND_MOD_REQUIRED("uri")
144145
ZEND_MOD_OPTIONAL("session")
145146
ZEND_MOD_END

0 commit comments

Comments
 (0)