Skip to content

Commit 06f86bf

Browse files
authored
Declare phpdbg constants in stubs (#9392)
1 parent 51eb1d4 commit 06f86bf

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

Diff for: sapi/phpdbg/phpdbg.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,7 @@ static PHP_MINIT_FUNCTION(phpdbg) /* {{{ */
170170

171171
zend_execute_ex = phpdbg_execute_ex;
172172

173-
REGISTER_STRINGL_CONSTANT("PHPDBG_VERSION", PHPDBG_VERSION, sizeof(PHPDBG_VERSION)-1, CONST_CS|CONST_PERSISTENT);
174-
175-
REGISTER_LONG_CONSTANT("PHPDBG_COLOR_PROMPT", PHPDBG_COLOR_PROMPT, CONST_CS|CONST_PERSISTENT);
176-
REGISTER_LONG_CONSTANT("PHPDBG_COLOR_NOTICE", PHPDBG_COLOR_NOTICE, CONST_CS|CONST_PERSISTENT);
177-
REGISTER_LONG_CONSTANT("PHPDBG_COLOR_ERROR", PHPDBG_COLOR_ERROR, CONST_CS|CONST_PERSISTENT);
173+
register_phpdbg_symbols(module_number);
178174

179175
return SUCCESS;
180176
} /* }}} */

Diff for: sapi/phpdbg/phpdbg.stub.php

+22
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

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

5+
/**
6+
* @var string
7+
* @cvalue PHPDBG_VERSION
8+
*/
9+
const PHPDBG_VERSION = UNKNOWN;
10+
11+
/**
12+
* @var int
13+
* @cvalue PHPDBG_COLOR_PROMPT
14+
*/
15+
const PHPDBG_COLOR_PROMPT = UNKNOWN;
16+
/**
17+
* @var int
18+
* @cvalue PHPDBG_COLOR_NOTICE
19+
*/
20+
const PHPDBG_COLOR_NOTICE = UNKNOWN;
21+
/**
22+
* @var int
23+
* @cvalue PHPDBG_COLOR_ERROR
24+
*/
25+
const PHPDBG_COLOR_ERROR = UNKNOWN;
26+
527
function phpdbg_break_next(): void {}
628

729
function phpdbg_break_file(string $file, int $line): void {}

Diff for: sapi/phpdbg/phpdbg_arginfo.h

+9-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)