Skip to content

Commit e6b712f

Browse files
committed
constant UUID_TYPE_DCE is deprecated, use UUID_TYPE_RANDOM instead
constant UUID_TYPE_NAME is deprecated, use UUID_TYPE_TIME instead new constant UUID_TYPE_VENDOR, only for uuid_type
1 parent 9b2564a commit e6b712f

File tree

5 files changed

+79
-27
lines changed

5 files changed

+79
-27
lines changed

REFLECTION

Lines changed: 56 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,112 @@
1-
Extension [ <persistent> extension #160 uuid version 1.0.4 ] {
1+
Extension [ <persistent> extension #18 uuid version 1.3.0-dev ] {
22

3-
- Constants [10] {
4-
Constant [ integer UUID_VARIANT_DCE ] { 1 }
5-
Constant [ integer UUID_VARIANT_MICROSOFT ] { 2 }
6-
Constant [ integer UUID_VARIANT_OTHER ] { 3 }
7-
Constant [ integer UUID_TYPE_DEFAULT ] { 0 }
8-
Constant [ integer UUID_TYPE_TIME ] { 1 }
9-
Constant [ integer UUID_TYPE_DCE ] { 4 }
10-
Constant [ integer UUID_TYPE_NAME ] { 1 }
11-
Constant [ integer UUID_TYPE_RANDOM ] { 4 }
12-
Constant [ integer UUID_TYPE_NULL ] { -1 }
13-
Constant [ integer UUID_TYPE_INVALID ] { -42 }
3+
- Constants [17] {
4+
Constant [ int UUID_VARIANT_NCS ] { 0 }
5+
Constant [ int UUID_VARIANT_DCE ] { 1 }
6+
Constant [ int UUID_VARIANT_MICROSOFT ] { 2 }
7+
Constant [ int UUID_VARIANT_OTHER ] { 3 }
8+
Constant [ int UUID_TYPE_DEFAULT ] { 0 }
9+
Constant [ int UUID_TYPE_DCE ] { 4 }
10+
Constant [ int UUID_TYPE_NAME ] { 1 }
11+
Constant [ int UUID_TYPE_TIME ] { 1 }
12+
Constant [ int UUID_TYPE_TIME_V6 ] { 6 }
13+
Constant [ int UUID_TYPE_TIME_V7 ] { 7 }
14+
Constant [ int UUID_TYPE_VENDOR ] { 8 }
15+
Constant [ int UUID_TYPE_SECURITY ] { 2 }
16+
Constant [ int UUID_TYPE_MD5 ] { 3 }
17+
Constant [ int UUID_TYPE_RANDOM ] { 4 }
18+
Constant [ int UUID_TYPE_SHA1 ] { 5 }
19+
Constant [ int UUID_TYPE_NULL ] { -1 }
20+
Constant [ int UUID_TYPE_INVALID ] { -42 }
1421
}
1522

1623
- Functions {
1724
Function [ <internal:uuid> function uuid_create ] {
1825

1926
- Parameters [1] {
20-
Parameter #0 [ <optional> $uuid_type ]
27+
Parameter #0 [ <optional> int $uuid_type = UUID_TYPE_DEFAULT ]
2128
}
29+
- Return [ string ]
2230
}
2331
Function [ <internal:uuid> function uuid_is_valid ] {
2432

2533
- Parameters [1] {
26-
Parameter #0 [ <required> $uuid ]
34+
Parameter #0 [ <required> string $uuid ]
2735
}
36+
- Return [ bool ]
2837
}
2938
Function [ <internal:uuid> function uuid_compare ] {
3039

3140
- Parameters [2] {
32-
Parameter #0 [ <required> $uuid1 ]
33-
Parameter #1 [ <required> $uuid2 ]
41+
Parameter #0 [ <required> string $uuid1 ]
42+
Parameter #1 [ <required> string $uuid2 ]
3443
}
44+
- Return [ int ]
3545
}
3646
Function [ <internal:uuid> function uuid_is_null ] {
3747

3848
- Parameters [1] {
39-
Parameter #0 [ <required> $uuid ]
49+
Parameter #0 [ <required> string $uuid ]
4050
}
51+
- Return [ bool ]
52+
}
53+
Function [ <internal:uuid> function uuid_generate_md5 ] {
54+
55+
- Parameters [2] {
56+
Parameter #0 [ <required> string $uuid_ns ]
57+
Parameter #1 [ <required> string $name ]
58+
}
59+
- Return [ string ]
60+
}
61+
Function [ <internal:uuid> function uuid_generate_sha1 ] {
62+
63+
- Parameters [2] {
64+
Parameter #0 [ <required> string $uuid_ns ]
65+
Parameter #1 [ <required> string $name ]
66+
}
67+
- Return [ string ]
4168
}
4269
Function [ <internal:uuid> function uuid_type ] {
4370

4471
- Parameters [1] {
45-
Parameter #0 [ <required> $uuid ]
72+
Parameter #0 [ <required> string $uuid ]
4673
}
74+
- Return [ int ]
4775
}
4876
Function [ <internal:uuid> function uuid_variant ] {
4977

5078
- Parameters [1] {
51-
Parameter #0 [ <required> $uuid ]
79+
Parameter #0 [ <required> string $uuid ]
5280
}
81+
- Return [ int ]
5382
}
5483
Function [ <internal:uuid> function uuid_time ] {
5584

5685
- Parameters [1] {
57-
Parameter #0 [ <required> $uuid ]
86+
Parameter #0 [ <required> string $uuid ]
5887
}
88+
- Return [ int ]
5989
}
6090
Function [ <internal:uuid> function uuid_mac ] {
6191

6292
- Parameters [1] {
63-
Parameter #0 [ <required> $uuid ]
93+
Parameter #0 [ <required> string $uuid ]
6494
}
95+
- Return [ string ]
6596
}
6697
Function [ <internal:uuid> function uuid_parse ] {
6798

6899
- Parameters [1] {
69-
Parameter #0 [ <required> $uuid ]
100+
Parameter #0 [ <required> string $uuid ]
70101
}
102+
- Return [ string ]
71103
}
72104
Function [ <internal:uuid> function uuid_unparse ] {
73105

74106
- Parameters [1] {
75-
Parameter #0 [ <required> $uuid ]
107+
Parameter #0 [ <required> string $uuid ]
76108
}
109+
- Return [ string ]
77110
}
78111
}
79112
}

package.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
4444
<notes>
4545
- Add support for RFC9562 UUIDs (UUID_TYPE_TIME_V6 and UUID_TYPE_TIME_V7)
4646
when available, in libuuid from util-linux version 2.41
47+
- constant UUID_TYPE_DCE is deprecated, use UUID_TYPE_RANDOM instead
48+
- constant UUID_TYPE_NAME is deprecated, use UUID_TYPE_TIME instead
49+
- new constant UUID_TYPE_VENDOR, only for uuid_type
4750
</notes>
4851

4952
<contents>

uuid.stub.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,14 @@
4848
/**
4949
* @var int
5050
* @cvalue UUID_TYPE_DCE
51+
* @deprecated
5152
*/
5253
const UUID_TYPE_DCE = UNKNOWN;
5354

5455
/**
5556
* @var int
5657
* @cvalue UUID_TYPE_NAME
58+
* @deprecated
5759
*/
5860
const UUID_TYPE_NAME = UNKNOWN;
5961

@@ -81,6 +83,14 @@
8183
const UUID_TYPE_TIME_V7 = UNKNOWN;
8284
#endif
8385

86+
#ifdef UUID_TYPE_DCE_VENDOR
87+
/**
88+
* @var int
89+
* @cvalue UUID_TYPE_DCE_VENDOR
90+
*/
91+
const UUID_TYPE_VENDOR = UNKNOWN;
92+
#endif
93+
8494
#ifdef UUID_TYPE_DCE_SECURITY
8595
/**
8696
* @var int

uuid_arginfo.h

Lines changed: 6 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: 6ccfec26334d92d0a6473ca44a107d211bf58c7e */
2+
* Stub hash: 28e3d8edf46fe2f5d0e87e159d36b508f16efccf */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_uuid_create, 0, 0, IS_STRING, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uuid_type, IS_LONG, 0, "UUID_TYPE_DEFAULT")
@@ -122,15 +122,18 @@ static void register_uuid_symbols(int module_number)
122122
REGISTER_LONG_CONSTANT("UUID_VARIANT_OTHER", UUID_VARIANT_OTHER, CONST_PERSISTENT | CONST_CS);
123123
#endif
124124
REGISTER_LONG_CONSTANT("UUID_TYPE_DEFAULT", 0, CONST_PERSISTENT | CONST_CS);
125-
REGISTER_LONG_CONSTANT("UUID_TYPE_DCE", UUID_TYPE_DCE, CONST_PERSISTENT | CONST_CS);
126-
REGISTER_LONG_CONSTANT("UUID_TYPE_NAME", UUID_TYPE_NAME, CONST_PERSISTENT | CONST_CS);
125+
REGISTER_LONG_CONSTANT("UUID_TYPE_DCE", UUID_TYPE_DCE, CONST_PERSISTENT | CONST_CS | CONST_DEPRECATED);
126+
REGISTER_LONG_CONSTANT("UUID_TYPE_NAME", UUID_TYPE_NAME, CONST_PERSISTENT | CONST_CS | CONST_DEPRECATED);
127127
REGISTER_LONG_CONSTANT("UUID_TYPE_TIME", UUID_TYPE_TIME, CONST_PERSISTENT | CONST_CS);
128128
#if defined(UUID_TYPE_DCE_TIME_V6)
129129
REGISTER_LONG_CONSTANT("UUID_TYPE_TIME_V6", UUID_TYPE_DCE_TIME_V6, CONST_PERSISTENT | CONST_CS);
130130
#endif
131131
#if defined(UUID_TYPE_DCE_TIME_V7)
132132
REGISTER_LONG_CONSTANT("UUID_TYPE_TIME_V7", UUID_TYPE_DCE_TIME_V7, CONST_PERSISTENT | CONST_CS);
133133
#endif
134+
#if defined(UUID_TYPE_DCE_VENDOR)
135+
REGISTER_LONG_CONSTANT("UUID_TYPE_VENDOR", UUID_TYPE_DCE_VENDOR, CONST_PERSISTENT | CONST_CS);
136+
#endif
134137
#if defined(UUID_TYPE_DCE_SECURITY)
135138
REGISTER_LONG_CONSTANT("UUID_TYPE_SECURITY", UUID_TYPE_DCE_SECURITY, CONST_PERSISTENT | CONST_CS);
136139
#endif

uuid_legacy_arginfo.h

Lines changed: 4 additions & 1 deletion
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: 6ccfec26334d92d0a6473ca44a107d211bf58c7e */
2+
* Stub hash: 28e3d8edf46fe2f5d0e87e159d36b508f16efccf */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_uuid_create, 0, 0, 0)
55
ZEND_ARG_INFO(0, uuid_type)
@@ -129,6 +129,9 @@ static void register_uuid_symbols(int module_number)
129129
#if defined(UUID_TYPE_DCE_TIME_V7)
130130
REGISTER_LONG_CONSTANT("UUID_TYPE_TIME_V7", UUID_TYPE_DCE_TIME_V7, CONST_PERSISTENT | CONST_CS);
131131
#endif
132+
#if defined(UUID_TYPE_DCE_VENDOR)
133+
REGISTER_LONG_CONSTANT("UUID_TYPE_VENDOR", UUID_TYPE_DCE_VENDOR, CONST_PERSISTENT | CONST_CS);
134+
#endif
132135
#if defined(UUID_TYPE_DCE_SECURITY)
133136
REGISTER_LONG_CONSTANT("UUID_TYPE_SECURITY", UUID_TYPE_DCE_SECURITY, CONST_PERSISTENT | CONST_CS);
134137
#endif

0 commit comments

Comments
 (0)