Skip to content

Commit

Permalink
Fix parsing of constants with negative value, add missing constants, …
Browse files Browse the repository at this point in the history
…fix constant values
  • Loading branch information
MaXal committed Sep 18, 2019
1 parent 0828e8e commit ad0b31e
Show file tree
Hide file tree
Showing 18 changed files with 138 additions and 354 deletions.
1 change: 0 additions & 1 deletion .idea/phpstorm-stubs.iml

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

9 changes: 5 additions & 4 deletions amqp/amqp.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@
/**
*
*/
define('AMQP_OS_SOCKET_TIMEOUT_ERRNO', 536870947);
define('AMQP_OS_SOCKET_TIMEOUT_ERRNO', 536870923);


/**
*
*/
define('PHP_AMQP_MAX_CHANNELS', 256);

define('AMQP_SASL_METHOD_PLAIN', 0);

define('AMQP_SASL_METHOD_EXTERNAL', 1);

/**
* stub class representing AMQPBasicProperties from pecl-amqp
*/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"php": "^7.1",
"nikic/php-parser": "^4",
"phpdocumentor/reflection-docblock": "^4.3",
"phpunit/phpunit": "^8"
"phpunit/phpunit": "^7"
},
"autoload": {
"files": ["PhpStormStubsMap.php"]
Expand Down
16 changes: 8 additions & 8 deletions curl/curl_d.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@
* @since 5.3.2
*/
define ('CURLOPT_POSTREDIR', 161);
define ('CURLOPT_CERTINFO', -1);
define ('CURLOPT_CERTINFO', 172);
define ('CURLOPT_FTPASCII', -1);
define ('CURLOPT_MUTE', -1);
define ('CURLOPT_PROTOCOLS', -1);
define ('CURLOPT_REDIR_PROTOCOLS', -1);
define ('CURLOPT_MAX_RECV_SPEED_LARGE', -1);
define ('CURLOPT_MAX_SEND_SPEED_LARGE', -1);
define ('CURLOPT_PROTOCOLS', 181);
define ('CURLOPT_REDIR_PROTOCOLS', 182);
define ('CURLOPT_MAX_RECV_SPEED_LARGE', 30146);
define ('CURLOPT_MAX_SEND_SPEED_LARGE', 30145);
define ('CURLOPT_PASSWDFUNCTION', -1);

/**
Expand Down Expand Up @@ -228,8 +228,8 @@
define ('CURLAUTH_DIGEST', 2);
define ('CURLAUTH_GSSNEGOTIATE', 4);
define ('CURLAUTH_NTLM', 8);
define ('CURLAUTH_ANY', -1);
define ('CURLAUTH_ANYSAFE', -2);
define ('CURLAUTH_ANY', -17);
define ('CURLAUTH_ANYSAFE', -18);
define ('CURLOPT_PROXYAUTH', 111);
define ('CURLOPT_FTP_CREATE_MISSING_DIRS', 110);

Expand Down Expand Up @@ -1321,7 +1321,7 @@
define("CURLE_HTTP_RETURNED_ERROR",22);
define("CURLE_OPERATION_TIMEDOUT",28);
define("CURLE_SSL_PINNEDPUBKEYNOTMATCH",90);
define("CURLINFO_LASTONE",45);
define("CURLINFO_LASTONE",56);
define("CURLM_ADDED_ALREADY",7);
define("CURLSHOPT_NONE",0);
define("CURL_TIMECOND_NONE",0);
Expand Down
92 changes: 46 additions & 46 deletions fann/fann.php
Original file line number Diff line number Diff line change
Expand Up @@ -2025,55 +2025,55 @@ function fann_train($ann, $input, $desired_output)
}

define('FANN_TRAIN_INCREMENTAL', 0);
define('FANN_TRAIN_BATCH', 0);
define('FANN_TRAIN_RPROP', 0);
define('FANN_TRAIN_QUICKPROP', 0);
define('FANN_TRAIN_SARPROP', 0);
define('FANN_TRAIN_BATCH', 1);
define('FANN_TRAIN_RPROP', 2);
define('FANN_TRAIN_QUICKPROP', 3);
define('FANN_TRAIN_SARPROP', 4);
define('FANN_LINEAR', 0);
define('FANN_THRESHOLD', 0);
define('FANN_THRESHOLD_SYMMETRIC', 0);
define('FANN_SIGMOID', 0);
define('FANN_SIGMOID_STEPWISE', 0);
define('FANN_SIGMOID_SYMMETRIC', 0);
define('FANN_SIGMOID_SYMMETRIC_STEPWISE', 0);
define('FANN_GAUSSIAN', 0);
define('FANN_GAUSSIAN_SYMMETRIC', 0);
define('FANN_GAUSSIAN_STEPWISE', 0);
define('FANN_ELLIOT', 0);
define('FANN_ELLIOT_SYMMETRIC', 0);
define('FANN_LINEAR_PIECE', 0);
define('FANN_LINEAR_PIECE_SYMMETRIC', 0);
define('FANN_SIN_SYMMETRIC', 0);
define('FANN_COS_SYMMETRIC', 0);
define('FANN_SIN', 0);
define('FANN_COS', 0);
define('FANN_THRESHOLD', 1);
define('FANN_THRESHOLD_SYMMETRIC', 2);
define('FANN_SIGMOID', 3);
define('FANN_SIGMOID_STEPWISE', 4);
define('FANN_SIGMOID_SYMMETRIC', 5);
define('FANN_SIGMOID_SYMMETRIC_STEPWISE', 6);
define('FANN_GAUSSIAN', 7);
define('FANN_GAUSSIAN_SYMMETRIC', 8);
define('FANN_GAUSSIAN_STEPWISE', 9);
define('FANN_ELLIOT', 10);
define('FANN_ELLIOT_SYMMETRIC', 11);
define('FANN_LINEAR_PIECE', 12);
define('FANN_LINEAR_PIECE_SYMMETRIC', 13);
define('FANN_SIN_SYMMETRIC', 14);
define('FANN_COS_SYMMETRIC', 15);
define('FANN_SIN', 16);
define('FANN_COS', 17);
define('FANN_ERRORFUNC_LINEAR', 0);
define('FANN_ERRORFUNC_TANH', 0);
define('FANN_ERRORFUNC_TANH', 1);
define('FANN_STOPFUNC_MSE', 0);
define('FANN_STOPFUNC_BIT', 0);
define('FANN_STOPFUNC_BIT', 1);
define('FANN_NETTYPE_LAYER', 0);
define('FANN_NETTYPE_SHORTCUT', 0);
define('FANN_NETTYPE_SHORTCUT', 1);
define('FANN_E_NO_ERROR', 0);
define('FANN_E_CANT_OPEN_CONFIG_R', 0);
define('FANN_E_CANT_OPEN_CONFIG_W', 0);
define('FANN_E_WRONG_CONFIG_VERSION', 0);
define('FANN_E_CANT_READ_CONFIG', 0);
define('FANN_E_CANT_READ_NEURON', 0);
define('FANN_E_CANT_READ_CONNECTIONS', 0);
define('FANN_E_WRONG_NUM_CONNECTIONS', 0);
define('FANN_E_CANT_OPEN_TD_W', 0);
define('FANN_E_CANT_OPEN_TD_R', 0);
define('FANN_E_CANT_READ_TD', 0);
define('FANN_E_CANT_ALLOCATE_MEM', 0);
define('FANN_E_CANT_TRAIN_ACTIVATION', 0);
define('FANN_E_CANT_USE_ACTIVATION', 0);
define('FANN_E_TRAIN_DATA_MISMATCH', 0);
define('FANN_E_CANT_USE_TRAIN_ALG', 0);
define('FANN_E_TRAIN_DATA_SUBSET', 0);
define('FANN_E_INDEX_OUT_OF_BOUND', 0);
define('FANN_E_SCALE_NOT_PRESENT', 0);
define('FANN_E_INPUT_NO_MATCH', 0);
define('FANN_E_OUTPUT_NO_MATCH', 0);


define('FANN_E_CANT_OPEN_CONFIG_R', 1);
define('FANN_E_CANT_OPEN_CONFIG_W', 2);
define('FANN_E_WRONG_CONFIG_VERSION', 3);
define('FANN_E_CANT_READ_CONFIG', 4);
define('FANN_E_CANT_READ_NEURON', 5);
define('FANN_E_CANT_READ_CONNECTIONS', 6);
define('FANN_E_WRONG_NUM_CONNECTIONS', 7);
define('FANN_E_CANT_OPEN_TD_W', 8);
define('FANN_E_CANT_OPEN_TD_R', 9);
define('FANN_E_CANT_READ_TD', 10);
define('FANN_E_CANT_ALLOCATE_MEM', 11);
define('FANN_E_CANT_TRAIN_ACTIVATION', 12);
define('FANN_E_CANT_USE_ACTIVATION', 13);
define('FANN_E_TRAIN_DATA_MISMATCH', 14);
define('FANN_E_CANT_USE_TRAIN_ALG', 15);
define('FANN_E_TRAIN_DATA_SUBSET', 16);
define('FANN_E_INDEX_OUT_OF_BOUND', 17);
define('FANN_E_SCALE_NOT_PRESENT', 18);
define('FANN_E_INPUT_NO_MATCH', 19);
define('FANN_E_OUTPUT_NO_MATCH', 20);

define('FANN_VERSION', '2.2');
// End of Fann v.1.0
44 changes: 22 additions & 22 deletions gnupg/gnupg.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
* @link https://php.net/manual/en/gnupg.constants.php
*/
define('GNUPG_SIG_MODE_NORMAL', 0);
define('GNUPG_SIG_MODE_DETACH', 0);
define('GNUPG_SIG_MODE_CLEAR', 0);
define('GNUPG_SIG_MODE_DETACH', 1);
define('GNUPG_SIG_MODE_CLEAR', 2);
define('GNUPG_VALIDITY_UNKNOWN', 0);
define('GNUPG_VALIDITY_UNDEFINED', 0);
define('GNUPG_VALIDITY_NEVER', 0);
define('GNUPG_VALIDITY_MARGINAL', 0);
define('GNUPG_VALIDITY_FULL', 0);
define('GNUPG_VALIDITY_ULTIMATE', 0);
define('GNUPG_VALIDITY_UNDEFINED', 1);
define('GNUPG_VALIDITY_NEVER', 2);
define('GNUPG_VALIDITY_MARGINAL', 3);
define('GNUPG_VALIDITY_FULL', 4);
define('GNUPG_VALIDITY_ULTIMATE', 5);
define('GNUPG_PROTOCOL_OpenPGP', 0);
define('GNUPG_PROTOCOL_CMS', 0);
define('GNUPG_SIGSUM_VALID', 0);
define('GNUPG_SIGSUM_GREEN', 0);
define('GNUPG_SIGSUM_RED', 0);
define('GNUPG_SIGSUM_KEY_REVOKED', 0);
define('GNUPG_SIGSUM_KEY_EXPIRED', 0);
define('GNUPG_SIGSUM_KEY_MISSING', 0);
define('GNUPG_SIGSUM_SIG_EXPIRED', 0);
define('GNUPG_SIGSUM_CRL_MISSING', 0);
define('GNUPG_SIGSUM_CRL_TOO_OLD', 0);
define('GNUPG_SIGSUM_BAD_POLICY', 0);
define('GNUPG_SIGSUM_SYS_ERROR', 0);
define('GNUPG_ERROR_WARNING', 0);
define('GNUPG_ERROR_EXCEPTION', 0);
define('GNUPG_ERROR_SILENT', 0);
define('GNUPG_PROTOCOL_CMS', 1);
define('GNUPG_SIGSUM_VALID', 1);
define('GNUPG_SIGSUM_GREEN', 2);
define('GNUPG_SIGSUM_RED', 4);
define('GNUPG_SIGSUM_KEY_REVOKED', 16);
define('GNUPG_SIGSUM_KEY_EXPIRED', 32);
define('GNUPG_SIGSUM_SIG_EXPIRED', 64);
define('GNUPG_SIGSUM_KEY_MISSING', 128);
define('GNUPG_SIGSUM_CRL_MISSING', 256);
define('GNUPG_SIGSUM_CRL_TOO_OLD', 512);
define('GNUPG_SIGSUM_BAD_POLICY', 1024);
define('GNUPG_SIGSUM_SYS_ERROR', 2048);
define('GNUPG_ERROR_WARNING', 1);
define('GNUPG_ERROR_EXCEPTION', 2);
define('GNUPG_ERROR_SILENT', 3);

/**
* GNUPG Encryption Class
Expand Down
7 changes: 4 additions & 3 deletions mongodb/mongodb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ final public function startTransaction($options)
namespace MongoDB\Driver\Exception {

use MongoDB\Driver\WriteResult;
use Throwable;

/**
* Thrown when the driver encounters a runtime error (e.g. internal error from » libmongoc).
Expand Down Expand Up @@ -1147,7 +1148,7 @@ final public function hasErrorLabel($errorLabel)
* Common interface for all driver exceptions. This may be used to catch only exceptions originating from the driver itself.
* @link https://php.net/manual/en/class.mongodb-driver-exception-exception.php
*/
interface Exception
interface Exception extends Throwable
{
}

Expand Down Expand Up @@ -1214,7 +1215,7 @@ class ServerException extends RuntimeException implements Exception
* @link https://php.net/manual/en/class.mongodb-driver-exception-writeexception.php
* @since 1.0.0
*/
abstract class WriteException extends RuntimeException implements Exception
abstract class WriteException extends ServerException implements Exception
{
/**
* @var WriteResult associated with the failed write operation.
Expand Down Expand Up @@ -1264,7 +1265,7 @@ class ConnectionTimeoutException extends ConnectionException implements Exceptio
* Thrown when a query or command fails to complete within a specified time limit (e.g. maxTimeMS).
* @link https://php.net/manual/en/class.mongodb-driver-exception-executiontimeoutexception.php
*/
class ExecutionTimeoutException extends RuntimeException implements Exception
class ExecutionTimeoutException extends ServerException implements Exception
{
}

Expand Down
2 changes: 2 additions & 0 deletions msgpack/msgpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

// Start of msgpack 0.5.0

const MESSAGEPACK_OPT_PHPONLY = -1001;

/**
* Serialize a variable into msgpack format
* @param mixed $value
Expand Down
16 changes: 8 additions & 8 deletions openssl/openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -1225,14 +1225,14 @@ function openssl_pkcs7_read($P7B, &$certs) {}
"DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:" .
"AES256-GCM-SHA384:AES128:AES256:HIGH:!SSLv2:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!RC4:!ADH");

define ('STREAM_CRYPTO_METHOD_SSLv2_CLIENT', 0);
define ('STREAM_CRYPTO_METHOD_SSLv3_CLIENT', 1);
define ('STREAM_CRYPTO_METHOD_SSLv23_CLIENT', 2);
define ('STREAM_CRYPTO_METHOD_TLS_CLIENT', 3);
define ('STREAM_CRYPTO_METHOD_SSLv2_SERVER', 4);
define ('STREAM_CRYPTO_METHOD_SSLv3_SERVER', 5);
define ('STREAM_CRYPTO_METHOD_SSLv23_SERVER', 6);
define ('STREAM_CRYPTO_METHOD_TLS_SERVER', 7);
define ('STREAM_CRYPTO_METHOD_SSLv2_CLIENT', 3);
define ('STREAM_CRYPTO_METHOD_SSLv3_CLIENT', 5);
define ('STREAM_CRYPTO_METHOD_SSLv23_CLIENT', 57);
define ('STREAM_CRYPTO_METHOD_TLS_CLIENT', 57);
define ('STREAM_CRYPTO_METHOD_SSLv2_SERVER', 2);
define ('STREAM_CRYPTO_METHOD_SSLv3_SERVER', 4);
define ('STREAM_CRYPTO_METHOD_SSLv23_SERVER', 56);
define ('STREAM_CRYPTO_METHOD_TLS_SERVER', 56);

define("STREAM_CRYPTO_METHOD_ANY_CLIENT", 63);
define("STREAM_CRYPTO_METHOD_ANY_SERVER", 62);
Expand Down
17 changes: 11 additions & 6 deletions rdkafka/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,23 @@
const RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53;
const RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54;
const RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55;
const RD_KAFKA_RESP_ERR__READ_ONLY = -157;
const RD_KAFKA_RESP_ERR__NOENT = -156;
const RD_KAFKA_RESP_ERR__UNDERFLOW = -155;
const RD_KAFKA_RESP_ERR__INVALID_TYPE = -154;
const RD_KAFKA_CONSUMER = 1;
const RD_KAFKA_OFFSET_BEGINNING = -2;
const RD_KAFKA_OFFSET_END = -1;
const RD_KAFKA_OFFSET_STORED = -1000;
const RD_KAFKA_PARTITION_UA = -1;
const RD_KAFKA_PRODUCER = 0;
const RD_KAFKA_VERSION = 525568;
const RD_KAFKA_VERSION = 722687;
const RD_KAFKA_BUILD_VERSION = 722687;
const RD_KAFKA_CONF_UNKNOWN = -2;
const RD_KAFKA_CONF_INVALID = -1;
const RD_KAFKA_CONF_OK = 0;
const RD_KAFKA_MSG_PARTITIONER_RANDOM = 0;
const RD_KAFKA_MSG_PARTITIONER_CONSISTENT = 0;
const RD_KAFKA_LOG_PRINT = 0;
const RD_KAFKA_LOG_SYSLOG = 0;
const RD_KAFKA_LOG_SYSLOG_PRINT = 0;
const RD_KAFKA_MSG_PARTITIONER_RANDOM = 2;
const RD_KAFKA_MSG_PARTITIONER_CONSISTENT = 3;
const RD_KAFKA_LOG_PRINT = 100;
const RD_KAFKA_LOG_SYSLOG = 101;
const RD_KAFKA_LOG_SYSLOG_PRINT = 102;
4 changes: 2 additions & 2 deletions sodium/sodium.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING = 7;
const SODIUM_CRYPTO_AUTH_BYTES = 32;
const SODIUM_CRYPTO_AUTH_KEYBYTES = 32;
const SODIUM_CRYPTO_BOX_SEALBYTES = 16;
const SODIUM_CRYPTO_BOX_SEALBYTES = 48;
const SODIUM_CRYPTO_BOX_SECRETKEYBYTES = 32;
const SODIUM_CRYPTO_BOX_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_BOX_KEYPAIRBYTES = 64;
Expand All @@ -49,7 +49,7 @@
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAX = 64;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$';
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 524288;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824;
Expand Down
8 changes: 4 additions & 4 deletions standard/standard_defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,13 @@
* Disable backslash escaping.
* @link https://php.net/manual/en/filesystem.constants.php
*/
define ('FNM_NOESCAPE', 1);
define ('FNM_NOESCAPE', 2);

/**
* Slash in string only matches slash in the given pattern.
* @link https://php.net/manual/en/filesystem.constants.php
*/
define ('FNM_PATHNAME', 2);
define ('FNM_PATHNAME', 1);

/**
* Leading period in string must be exactly matched by period in the given pattern.
Expand Down Expand Up @@ -1025,7 +1025,7 @@
*/
define('IMAGETYPE_WEBP', 18);
define('IMAGETYPE_UNKNOWN', 0);
define('IMAGETYPE_COUNT', 18);
define('IMAGETYPE_COUNT', 19);

/**
* IPv4 Address Resource
Expand Down Expand Up @@ -1102,7 +1102,7 @@
* each available record type.
* @link https://php.net/manual/en/network.constants.php
*/
define ('DNS_ALL', 251713587);
define ('DNS_ALL', 251721779);

// End of standard v.5.3.1-0.dotdeb.1

Expand Down
Loading

0 comments on commit ad0b31e

Please sign in to comment.