Skip to content

Commit d9dce83

Browse files
committed
Update ext/posix parameter names
Closes GH-6275.
1 parent a7856c1 commit d9dce83

File tree

5 files changed

+59
-59
lines changed

5 files changed

+59
-59
lines changed

ext/posix/posix.stub.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
/** @generate-function-entries */
44

5-
function posix_kill(int $pid, int $sig): bool {}
5+
function posix_kill(int $process_id, int $signal): bool {}
66

77
function posix_getpid(): int {}
88

99
function posix_getppid(): int {}
1010

1111
function posix_getuid(): int {}
1212

13-
function posix_setuid(int $uid): bool {}
13+
function posix_setuid(int $user_id): bool {}
1414

1515
function posix_geteuid(): int {}
1616

1717
#ifdef HAVE_SETEUID
18-
function posix_seteuid(int $uid): bool {}
18+
function posix_seteuid(int $user_id): bool {}
1919
#endif
2020

2121
function posix_getgid(): int {}
2222

23-
function posix_setgid(int $gid): bool {}
23+
function posix_setgid(int $group_id): bool {}
2424

2525
function posix_getegid(): int {}
2626

2727
#ifdef HAVE_SETEGID
28-
function posix_setegid(int $gid): bool {}
28+
function posix_setegid(int $group_id): bool {}
2929
#endif
3030

3131
#ifdef HAVE_GETGROUPS
@@ -42,14 +42,14 @@ function posix_getpgrp(): int {}
4242
function posix_setsid(): int {}
4343
#endif
4444

45-
function posix_setpgid(int $pid, int $pgid): bool {}
45+
function posix_setpgid(int $process_id, int $process_group_id): bool {}
4646

4747
#ifdef HAVE_GETPGID
48-
function posix_getpgid(int $pid): int|false {}
48+
function posix_getpgid(int $process_id): int|false {}
4949
#endif
5050

5151
#ifdef HAVE_GETSID
52-
function posix_getsid(int $pid): int|false {}
52+
function posix_getsid(int $process_id): int|false {}
5353
#endif
5454

5555
function posix_uname(): array|false {}
@@ -61,47 +61,47 @@ function posix_times(): array|false {}
6161
function posix_ctermid(): string|false {}
6262
#endif
6363

64-
/** @param resource|int $fd */
65-
function posix_ttyname($fd): string|false {}
64+
/** @param resource|int $file_descriptor */
65+
function posix_ttyname($file_descriptor): string|false {}
6666

67-
/** @param resource|int $fd */
68-
function posix_isatty($fd): bool {}
67+
/** @param resource|int $file_descriptor */
68+
function posix_isatty($file_descriptor): bool {}
6969

7070
function posix_getcwd(): string|false {}
7171

7272
#ifdef HAVE_MKFIFO
73-
function posix_mkfifo(string $pathname, int $mode): bool {}
73+
function posix_mkfifo(string $filename, int $permissions): bool {}
7474
#endif
7575

7676
#ifdef HAVE_MKNOD
77-
function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0): bool {}
77+
function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): bool {}
7878
#endif
7979

80-
function posix_access(string $file, int $mode = 0): bool {}
80+
function posix_access(string $filename, int $flags = 0): bool {}
8181

8282
function posix_getgrnam(string $name): array|false {}
8383

84-
function posix_getgrgid(int $gid): array|false {}
84+
function posix_getgrgid(int $group_id): array|false {}
8585

8686
function posix_getpwnam(string $username): array|false {}
8787

88-
function posix_getpwuid(int $uid): array|false {}
88+
function posix_getpwuid(int $user_id): array|false {}
8989

9090
#ifdef HAVE_GETRLIMIT
9191
function posix_getrlimit(): array|false {}
9292
#endif
9393

9494
#ifdef HAVE_SETRLIMIT
95-
function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): bool {}
95+
function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): bool {}
9696
#endif
9797

9898
function posix_get_last_error(): int {}
9999

100100
/** @alias posix_get_last_error */
101101
function posix_errno(): int {}
102102

103-
function posix_strerror(int $errno): string {}
103+
function posix_strerror(int $error_code): string {}
104104

105105
#ifdef HAVE_INITGROUPS
106-
function posix_initgroups(string $name, int $base_group_id): bool {}
106+
function posix_initgroups(string $username, int $group_id): bool {}
107107
#endif

ext/posix/posix_arginfo.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: c97ecb9b83ed873ca1ee2046ade191eef5bff25b */
2+
* Stub hash: 6d1383a6f98104498b466ce5d9dcf5721760e8b7 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_kill, 0, 2, _IS_BOOL, 0)
5-
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
6-
ZEND_ARG_TYPE_INFO(0, sig, IS_LONG, 0)
5+
ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
6+
ZEND_ARG_TYPE_INFO(0, signal, IS_LONG, 0)
77
ZEND_END_ARG_INFO()
88

99
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_getpid, 0, 0, IS_LONG, 0)
@@ -14,28 +14,28 @@ ZEND_END_ARG_INFO()
1414
#define arginfo_posix_getuid arginfo_posix_getpid
1515

1616
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_setuid, 0, 1, _IS_BOOL, 0)
17-
ZEND_ARG_TYPE_INFO(0, uid, IS_LONG, 0)
17+
ZEND_ARG_TYPE_INFO(0, user_id, IS_LONG, 0)
1818
ZEND_END_ARG_INFO()
1919

2020
#define arginfo_posix_geteuid arginfo_posix_getpid
2121

2222
#if defined(HAVE_SETEUID)
2323
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_seteuid, 0, 1, _IS_BOOL, 0)
24-
ZEND_ARG_TYPE_INFO(0, uid, IS_LONG, 0)
24+
ZEND_ARG_TYPE_INFO(0, user_id, IS_LONG, 0)
2525
ZEND_END_ARG_INFO()
2626
#endif
2727

2828
#define arginfo_posix_getgid arginfo_posix_getpid
2929

3030
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_setgid, 0, 1, _IS_BOOL, 0)
31-
ZEND_ARG_TYPE_INFO(0, gid, IS_LONG, 0)
31+
ZEND_ARG_TYPE_INFO(0, group_id, IS_LONG, 0)
3232
ZEND_END_ARG_INFO()
3333

3434
#define arginfo_posix_getegid arginfo_posix_getpid
3535

3636
#if defined(HAVE_SETEGID)
3737
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_setegid, 0, 1, _IS_BOOL, 0)
38-
ZEND_ARG_TYPE_INFO(0, gid, IS_LONG, 0)
38+
ZEND_ARG_TYPE_INFO(0, group_id, IS_LONG, 0)
3939
ZEND_END_ARG_INFO()
4040
#endif
4141

@@ -57,19 +57,19 @@ ZEND_END_ARG_INFO()
5757
#endif
5858

5959
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_setpgid, 0, 2, _IS_BOOL, 0)
60-
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
61-
ZEND_ARG_TYPE_INFO(0, pgid, IS_LONG, 0)
60+
ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
61+
ZEND_ARG_TYPE_INFO(0, process_group_id, IS_LONG, 0)
6262
ZEND_END_ARG_INFO()
6363

6464
#if defined(HAVE_GETPGID)
6565
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getpgid, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
66-
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
66+
ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
6767
ZEND_END_ARG_INFO()
6868
#endif
6969

7070
#if defined(HAVE_GETSID)
7171
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getsid, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
72-
ZEND_ARG_TYPE_INFO(0, pid, IS_LONG, 0)
72+
ZEND_ARG_TYPE_INFO(0, process_id, IS_LONG, 0)
7373
ZEND_END_ARG_INFO()
7474
#endif
7575

@@ -84,51 +84,51 @@ ZEND_END_ARG_INFO()
8484
#endif
8585

8686
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_ttyname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
87-
ZEND_ARG_INFO(0, fd)
87+
ZEND_ARG_INFO(0, file_descriptor)
8888
ZEND_END_ARG_INFO()
8989

9090
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_isatty, 0, 1, _IS_BOOL, 0)
91-
ZEND_ARG_INFO(0, fd)
91+
ZEND_ARG_INFO(0, file_descriptor)
9292
ZEND_END_ARG_INFO()
9393

9494
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getcwd, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
9595
ZEND_END_ARG_INFO()
9696

9797
#if defined(HAVE_MKFIFO)
9898
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_mkfifo, 0, 2, _IS_BOOL, 0)
99-
ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0)
100-
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
99+
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
100+
ZEND_ARG_TYPE_INFO(0, permissions, IS_LONG, 0)
101101
ZEND_END_ARG_INFO()
102102
#endif
103103

104104
#if defined(HAVE_MKNOD)
105105
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_mknod, 0, 2, _IS_BOOL, 0)
106-
ZEND_ARG_TYPE_INFO(0, pathname, IS_STRING, 0)
107-
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
106+
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
107+
ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
108108
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, major, IS_LONG, 0, "0")
109109
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, minor, IS_LONG, 0, "0")
110110
ZEND_END_ARG_INFO()
111111
#endif
112112

113113
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_access, 0, 1, _IS_BOOL, 0)
114-
ZEND_ARG_TYPE_INFO(0, file, IS_STRING, 0)
115-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0")
114+
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
115+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
116116
ZEND_END_ARG_INFO()
117117

118118
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgrnam, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
119119
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
120120
ZEND_END_ARG_INFO()
121121

122122
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getgrgid, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
123-
ZEND_ARG_TYPE_INFO(0, gid, IS_LONG, 0)
123+
ZEND_ARG_TYPE_INFO(0, group_id, IS_LONG, 0)
124124
ZEND_END_ARG_INFO()
125125

126126
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getpwnam, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
127127
ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 0)
128128
ZEND_END_ARG_INFO()
129129

130130
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_posix_getpwuid, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
131-
ZEND_ARG_TYPE_INFO(0, uid, IS_LONG, 0)
131+
ZEND_ARG_TYPE_INFO(0, user_id, IS_LONG, 0)
132132
ZEND_END_ARG_INFO()
133133

134134
#if defined(HAVE_GETRLIMIT)
@@ -139,8 +139,8 @@ ZEND_END_ARG_INFO()
139139
#if defined(HAVE_SETRLIMIT)
140140
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_setrlimit, 0, 3, _IS_BOOL, 0)
141141
ZEND_ARG_TYPE_INFO(0, resource, IS_LONG, 0)
142-
ZEND_ARG_TYPE_INFO(0, softlimit, IS_LONG, 0)
143-
ZEND_ARG_TYPE_INFO(0, hardlimit, IS_LONG, 0)
142+
ZEND_ARG_TYPE_INFO(0, soft_limit, IS_LONG, 0)
143+
ZEND_ARG_TYPE_INFO(0, hard_limit, IS_LONG, 0)
144144
ZEND_END_ARG_INFO()
145145
#endif
146146

@@ -149,13 +149,13 @@ ZEND_END_ARG_INFO()
149149
#define arginfo_posix_errno arginfo_posix_getpid
150150

151151
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_strerror, 0, 1, IS_STRING, 0)
152-
ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0)
152+
ZEND_ARG_TYPE_INFO(0, error_code, IS_LONG, 0)
153153
ZEND_END_ARG_INFO()
154154

155155
#if defined(HAVE_INITGROUPS)
156156
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_posix_initgroups, 0, 2, _IS_BOOL, 0)
157-
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
158-
ZEND_ARG_TYPE_INFO(0, base_group_id, IS_LONG, 0)
157+
ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 0)
158+
ZEND_ARG_TYPE_INFO(0, group_id, IS_LONG, 0)
159159
ZEND_END_ARG_INFO()
160160
#endif
161161

ext/standard/basic_functions.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ function fwrite($stream, string $data, ?int $max_length = null): int|false {}
832832
function fputs($stream, string $data, ?int $max_length = null): int|false {}
833833

834834
/** @param resource|null $context */
835-
function mkdir(string $directory, int $mode = 0777, bool $recursive = false, $context = null): bool {}
835+
function mkdir(string $directory, int $permissions = 0777, bool $recursive = false, $context = null): bool {}
836836

837837
/** @param resource|null $context */
838838
function rename(string $from, string $to, $context = null): bool {}
@@ -922,7 +922,7 @@ function lchown(string $filename, string|int $user): bool {}
922922
function lchgrp(string $filename, string|int $group): bool {}
923923
#endif
924924

925-
function chmod(string $filename, int $mode): bool {}
925+
function chmod(string $filename, int $permissions): bool {}
926926

927927
#if HAVE_UTIME
928928
function touch(string $filename, ?int $mtime = null, ?int $atime = null): bool {}

ext/standard/basic_functions_arginfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 1b9d82b77bd589dc95f5f4db1780162ee92c89c6 */
2+
* Stub hash: bb98cb703c3ad25c11d21ee7b159acda93677cc3 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0)
55
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
@@ -1275,7 +1275,7 @@ ZEND_END_ARG_INFO()
12751275

12761276
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mkdir, 0, 1, _IS_BOOL, 0)
12771277
ZEND_ARG_TYPE_INFO(0, directory, IS_STRING, 0)
1278-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0777")
1278+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, permissions, IS_LONG, 0, "0777")
12791279
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false")
12801280
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
12811281
ZEND_END_ARG_INFO()
@@ -1422,7 +1422,7 @@ ZEND_END_ARG_INFO()
14221422

14231423
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_chmod, 0, 2, _IS_BOOL, 0)
14241424
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
1425-
ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)
1425+
ZEND_ARG_TYPE_INFO(0, permissions, IS_LONG, 0)
14261426
ZEND_END_ARG_INFO()
14271427

14281428
#if HAVE_UTIME

ext/standard/tests/file/006_variation2.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ bool(true)
137137
bool(true)
138138
43567
139139
-- Iteration 12 --
140-
chmod(): Argument #2 ($mode) must be of type int, string given
141-
chmod(): Argument #2 ($mode) must be of type int, string given
140+
chmod(): Argument #2 ($permissions) must be of type int, string given
141+
chmod(): Argument #2 ($permissions) must be of type int, string given
142142
-- Iteration 13 --
143-
chmod(): Argument #2 ($mode) must be of type int, string given
144-
chmod(): Argument #2 ($mode) must be of type int, string given
143+
chmod(): Argument #2 ($permissions) must be of type int, string given
144+
chmod(): Argument #2 ($permissions) must be of type int, string given
145145
-- Iteration 14 --
146-
chmod(): Argument #2 ($mode) must be of type int, string given
147-
chmod(): Argument #2 ($mode) must be of type int, string given
146+
chmod(): Argument #2 ($permissions) must be of type int, string given
147+
chmod(): Argument #2 ($permissions) must be of type int, string given
148148
-- Iteration 15 --
149-
chmod(): Argument #2 ($mode) must be of type int, string given
150-
chmod(): Argument #2 ($mode) must be of type int, string given
149+
chmod(): Argument #2 ($permissions) must be of type int, string given
150+
chmod(): Argument #2 ($permissions) must be of type int, string given
151151
*** Done ***

0 commit comments

Comments
 (0)