Skip to content

Commit d97f8ee

Browse files
authored
Declare ext/intl constants in stubs - part 6 (#9268)
1 parent 614e9ec commit d97f8ee

File tree

7 files changed

+159
-86
lines changed

7 files changed

+159
-86
lines changed

ext/intl/config.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ if test "$PHP_INTL" != "no"; then
5555
uchar/uchar.c \
5656
idn/idn.c \
5757
spoofchecker/spoofchecker_class.c \
58-
spoofchecker/spoofchecker.c\
5958
spoofchecker/spoofchecker_create.c\
6059
spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
6160

ext/intl/config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ if (PHP_INTL != "no") {
8484

8585
if (CHECK_HEADER_ADD_INCLUDE("unicode/uspoof.h", "CFLAGS_INTL")) {
8686
ADD_SOURCES(configure_module_dirname + "/spoofchecker", "\
87-
spoofchecker.c \
8887
spoofchecker_class.c \
8988
spoofchecker_create.c \
9089
spoofchecker_main.c",

ext/intl/php_intl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
#include "uchar/uchar.h"
6363

6464
# include "spoofchecker/spoofchecker_class.h"
65-
# include "spoofchecker/spoofchecker.h"
6665

6766
#include "common/common_error.h"
6867
#include "common/common_enum.h"
@@ -195,9 +194,6 @@ PHP_MINIT_FUNCTION( intl )
195194
/* Register 'Spoofchecker' PHP class */
196195
spoofchecker_register_Spoofchecker_class( );
197196

198-
/* Expose Spoofchecker constants to PHP scripts */
199-
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
200-
201197
/* Register 'IntlException' PHP class */
202198
IntlException_ce_ptr = register_class_IntlException(zend_ce_exception);
203199
IntlException_ce_ptr->create_object = zend_ce_exception->create_object;

ext/intl/spoofchecker/spoofchecker.c

Lines changed: 0 additions & 57 deletions
This file was deleted.

ext/intl/spoofchecker/spoofchecker.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

ext/intl/spoofchecker/spoofchecker.stub.php

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,74 @@
55
/** @not-serializable */
66
class Spoofchecker
77
{
8+
/**
9+
* @var int
10+
* @cvalue USPOOF_SINGLE_SCRIPT_CONFUSABLE
11+
*/
12+
public const SINGLE_SCRIPT_CONFUSABLE = UNKNOWN;
13+
/**
14+
* @var int
15+
* @cvalue USPOOF_MIXED_SCRIPT_CONFUSABLE
16+
*/
17+
public const MIXED_SCRIPT_CONFUSABLE = UNKNOWN;
18+
/**
19+
* @var int
20+
* @cvalue USPOOF_WHOLE_SCRIPT_CONFUSABLE
21+
*/
22+
public const WHOLE_SCRIPT_CONFUSABLE = UNKNOWN;
23+
/**
24+
* @var int
25+
* @cvalue USPOOF_ANY_CASE
26+
*/
27+
public const ANY_CASE = UNKNOWN;
28+
/**
29+
* @var int
30+
* @cvalue USPOOF_SINGLE_SCRIPT
31+
*/
32+
public const SINGLE_SCRIPT = UNKNOWN;
33+
/**
34+
* @var int
35+
* @cvalue USPOOF_INVISIBLE
36+
*/
37+
public const INVISIBLE = UNKNOWN;
38+
/**
39+
* @var int
40+
* @cvalue USPOOF_CHAR_LIMIT
41+
*/
42+
public const CHAR_LIMIT = UNKNOWN;
43+
#if U_ICU_VERSION_MAJOR_NUM >= 58
44+
/**
45+
* @var int
46+
* @cvalue USPOOF_ASCII
47+
*/
48+
public const ASCII = UNKNOWN;
49+
/**
50+
* @var int
51+
* @cvalue USPOOF_HIGHLY_RESTRICTIVE
52+
*/
53+
public const HIGHLY_RESTRICTIVE = UNKNOWN;
54+
/**
55+
* @var int
56+
* @cvalue USPOOF_MODERATELY_RESTRICTIVE
57+
*/
58+
public const MODERATELY_RESTRICTIVE = UNKNOWN;
59+
/**
60+
* @var int
61+
* @cvalue USPOOF_MINIMALLY_RESTRICTIVE
62+
*/
63+
public const MINIMALLY_RESTRICTIVE = UNKNOWN;
64+
/**
65+
* @var int
66+
* @cvalue USPOOF_UNRESTRICTIVE
67+
*/
68+
public const UNRESTRICTIVE = UNKNOWN;
69+
/**
70+
* @var int
71+
* @cvalue USPOOF_SINGLE_SCRIPT_RESTRICTIVE
72+
*/
73+
public const SINGLE_SCRIPT_RESTRICTIVE = UNKNOWN;
74+
#endif
75+
876
public function __construct() {}
977

1078
/**

ext/intl/spoofchecker/spoofchecker_arginfo.h

Lines changed: 91 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)