Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Zend/zend_constants.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,14 @@
/* Special constants true/false/null. */

/**
* @var bool
* @undocumentable
*/
const TRUE = true;
/**
* @var bool
* @undocumentable
*/
const FALSE = false;
/**
* @var null
* @undocumentable
*/
const NULL = null;
2 changes: 1 addition & 1 deletion Zend/zend_constants_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 26 additions & 1 deletion build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -4874,7 +4874,32 @@ function parseConstLike(
}

if ($type === null && $phpDocType === null) {
throw new Exception("Missing type for constant " . $name->__toString());
if ($const->value instanceof Node\Scalar\Float_) {
$phpDocType = 'float';
} elseif ($const->value instanceof Node\Scalar\Int_
|| ($const->value instanceof Expr\UnaryMinus
&& $const->value->expr instanceof Node\Scalar\Int_
)
) {
$phpDocType = 'int';
} elseif ($const->value instanceof Node\Scalar\String_) {
$phpDocType = 'string';
} elseif ($const->value instanceof Expr\ConstFetch
&& $const->value->name instanceof Node\Name\FullyQualified
&& (
$const->value->name->name === 'false'
|| $const->value->name->name === 'true'
)
) {
$phpDocType = 'bool';
} elseif ($const->value instanceof Expr\ConstFetch
&& $const->value->name instanceof Node\Name\FullyQualified
&& $const->value->name->name === 'null'
) {
$phpDocType = 'null';
} else {
throw new Exception("Missing type for constant " . $name->__toString());
}
}

$constType = $type ? Type::fromNode($type) : null;
Expand Down
12 changes: 0 additions & 12 deletions ext/date/php_date.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,74 +3,62 @@
/** @generate-class-entries */

/**
* @var string
* @cvalue DATE_FORMAT_RFC3339
*/
const DATE_ATOM = "Y-m-d\\TH:i:sP";

/**
* @var string
* @cvalue DATE_FORMAT_COOKIE
*/
const DATE_COOKIE = "l, d-M-Y H:i:s T";

/**
* @var string
* @cvalue DATE_FORMAT_ISO8601
*/
const DATE_ISO8601 = "Y-m-d\\TH:i:sO";

/**
* @var string
* @cvalue DATE_FORMAT_ISO8601_EXPANDED
*/
const DATE_ISO8601_EXPANDED = "X-m-d\\TH:i:sP";

/**
* @var string
* @cvalue DATE_FORMAT_RFC822
*/
const DATE_RFC822 = "D, d M y H:i:s O";

/**
* @var string
* @cvalue DATE_FORMAT_RFC850
*/
const DATE_RFC850 = "l, d-M-y H:i:s T";

/**
* @var string
* @cvalue DATE_FORMAT_RFC1036
*/
const DATE_RFC1036 = "D, d M y H:i:s O";

/**
* @var string
* @cvalue DATE_FORMAT_RFC1123
*/
const DATE_RFC1123 = "D, d M Y H:i:s O";

/**
* @var string
* @cvalue DATE_FORMAT_RFC7231
*/
#[\Deprecated(since: '8.5', message: "as this format ignores the associated timezone and always uses GMT")]
const DATE_RFC7231 = "D, d M Y H:i:s \\G\\M\\T";

/**
* @var string
* @cvalue DATE_FORMAT_RFC2822
*/
const DATE_RFC2822 = "D, d M Y H:i:s O";

/**
* @var string
* @cvalue DATE_FORMAT_RFC3339
*/
const DATE_RFC3339 = "Y-m-d\\TH:i:sP";

/**
* @var string
* @cvalue DATE_FORMAT_RFC3339_EXTENDED
*/
const DATE_RFC3339_EXTENDED = "Y-m-d\\TH:i:s.vP";
Expand Down
2 changes: 1 addition & 1 deletion ext/date/php_date_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ext/dba/dba.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ final class Connection

namespace {
#ifdef DBA_LMDB
/** @var int */
const DBA_LMDB_USE_SUB_DIR = 0;
/**
* @var int
Expand Down
2 changes: 1 addition & 1 deletion ext/dba/dba_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ext/dl_test/dl_test.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @undocumentable
*/

/** @var int */
const DL_TEST_CONST = 42;

function dl_test_test1(): void {}
Expand Down
2 changes: 1 addition & 1 deletion ext/dl_test/dl_test_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions ext/gd/gd.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,17 +449,11 @@
* /usr/include/pngconf.h:310:2: error: #error png.h already includes setjmp.h with some additional fixup.
* as error, use the values for now...
*/
/** @var int */
const PNG_NO_FILTER = 0x00;
/** @var int */
const PNG_FILTER_NONE = 0x08;
/** @var int */
const PNG_FILTER_SUB = 0x10;
/** @var int */
const PNG_FILTER_UP = 0x20;
/** @var int */
const PNG_FILTER_AVG = 0x40;
/** @var int */
const PNG_FILTER_PAETH = 0x80;
/** @var int */
const PNG_ALL_FILTERS = 0x08 | 0x10 | 0x20 | 0x40 | 0x80;
Expand Down
2 changes: 1 addition & 1 deletion ext/gd/gd_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions ext/mysqli/mysqli.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,6 @@
*/
const MYSQLI_TRANS_COR_NO_RELEASE = UNKNOWN;

/**
* @var bool
*/
#[\Deprecated(since: '8.2', message: 'as it is always false')]
const MYSQLI_IS_MARIADB = false;

Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/mysqli_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ext/openssl/openssl.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@
const OPENSSL_DONT_ZERO_PAD_KEY = UNKNOWN;

#ifndef OPENSSL_NO_TLSEXT
/** @var int */
const OPENSSL_TLSEXT_SERVER_NAME = 1;
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/openssl_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions ext/openssl/openssl_pwhash.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
/** @generate-class-entries */

#if defined(HAVE_OPENSSL_ARGON2)
/**
* @var string
*/
const PASSWORD_ARGON2I = "argon2i";
/**
* @var string
*/
const PASSWORD_ARGON2ID = "argon2id";
/**
* @var int
Expand All @@ -26,9 +20,6 @@
* @cvalue PHP_OPENSSL_PWHASH_THREADS
*/
const PASSWORD_ARGON2_DEFAULT_THREADS = UNKNOWN;
/**
* @var string
*/
const PASSWORD_ARGON2_PROVIDER = "openssl";
#endif

2 changes: 1 addition & 1 deletion ext/openssl/openssl_pwhash_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions ext/sodium/sodium_pwhash.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
/** @generate-class-entries */

#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6)
/**
* @var string
*/
const PASSWORD_ARGON2I = "argon2i";
/**
* @var string
*/
const PASSWORD_ARGON2ID = "argon2id";
/**
* @var int
Expand All @@ -26,8 +20,5 @@
* @cvalue PHP_SODIUM_PWHASH_THREADS
*/
const PASSWORD_ARGON2_DEFAULT_THREADS = UNKNOWN;
/**
* @var string
*/
const PASSWORD_ARGON2_PROVIDER = "sodium";
#endif
2 changes: 1 addition & 1 deletion ext/sodium/sodium_pwhash_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions ext/standard/basic_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,87 +260,70 @@
const PHP_QUERY_RFC3986 = UNKNOWN;

/**
* @var float
* @cvalue M_E
*/
const M_E = 2.718281828459045;
/**
* @var float
* @cvalue M_LOG2E
*/
const M_LOG2E = 1.4426950408889634074;
/**
* @var float
* @cvalue M_LOG10E
*/
const M_LOG10E = 0.43429448190325182765;
/**
* @var float
* @cvalue M_LN2
*/
const M_LN2 = 0.69314718055994530942;
/**
* @var float
* @cvalue M_LN10
*/
const M_LN10 = 2.30258509299404568402;
/**
* @var float
* @cvalue M_PI
*/
const M_PI = 3.14159265358979323846;
/**
* @var float
* @cvalue M_PI_2
*/
const M_PI_2 = 1.57079632679489661923;
/**
* @var float
* @cvalue M_PI_4
*/
const M_PI_4 = 0.78539816339744830962;
/**
* @var float
* @cvalue M_1_PI
*/
const M_1_PI = 0.31830988618379067154;
/**
* @var float
* @cvalue M_2_PI
*/
const M_2_PI = 0.63661977236758134308;
/**
* @var float
* @cvalue M_SQRTPI
*/
const M_SQRTPI = 1.77245385090551602729;
/**
* @var float
* @cvalue M_2_SQRTPI
*/
const M_2_SQRTPI = 1.12837916709551257390;
/**
* @var float
* @cvalue M_LNPI
*/
const M_LNPI = 1.14472988584940017414;
/**
* @var float
* @cvalue M_EULER
*/
const M_EULER = 0.57721566490153286061;
/**
* @var float
* @cvalue M_SQRT2
*/
const M_SQRT2 = 1.41421356237309504880;
/**
* @var float
* @cvalue M_SQRT1_2
*/
const M_SQRT1_2 = 0.70710678118654752440;
/**
* @var float
* @cvalue M_SQRT3
*/
const M_SQRT3 = 1.73205080756887729352;
Expand Down Expand Up @@ -383,17 +366,11 @@
* @cvalue PHP_MAX_SALT_LEN
*/
const CRYPT_SALT_LENGTH = UNKNOWN;
/** @var int */
const CRYPT_STD_DES = 1;
/** @var int */
const CRYPT_EXT_DES = 1;
/** @var int */
const CRYPT_MD5 = 1;
/** @var int */
const CRYPT_BLOWFISH = 1;
/** @var int */
const CRYPT_SHA256 = 1;
/** @var int */
const CRYPT_SHA512 = 1;

/* dns.c */
Expand Down
Loading