Add new extensions + fixes for them

This commit is contained in:
Maxim.Kolmakov 2019-09-18 16:39:59 +02:00
parent 4274651619
commit f3a010af18
5 changed files with 144 additions and 15 deletions

View File

@ -1,10 +1,40 @@
FROM php:7.3
RUN set -x \
&& apt-get update \
&& apt-get install -y libldap2-dev libxml2-dev \
&& apt-get install -y libldap2-dev libxml2-dev librabbitmq-dev libssh-dev libbz2-dev libevent-dev libfann-dev libgpgme11-dev librdkafka-dev librrd-dev libyaml-dev libcurl4-openssl-dev\
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& apt-get purge -y --auto-remove libldap2-dev
RUN docker-php-ext-install mysqli bcmath calendar dba exif gettext opcache pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm soap xmlrpc
RUN docker-php-ext-install bz2 mysqli bcmath calendar dba exif gettext opcache pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm soap xmlrpc
RUN pecl install amqp
RUN docker-php-ext-enable amqp
RUN pecl install Ev
RUN docker-php-ext-enable ev
RUN pecl install fann
RUN docker-php-ext-enable fann
RUN pecl install igbinary
RUN docker-php-ext-enable igbinary
RUN pecl install inotify
RUN docker-php-ext-enable inotify
RUN pecl install msgpack
RUN docker-php-ext-enable msgpack
RUN pecl install rrd
RUN docker-php-ext-enable rrd
RUN pecl install sync
RUN docker-php-ext-enable sync
RUN pecl install yaml
RUN docker-php-ext-enable yaml
#Extensions below require a lot of fixes
#RUN pecl install mongodb
#RUN docker-php-ext-enable mongodb
#RUN pecl install rdkafka
#RUN docker-php-ext-enable rdkafka
#RUN pecl install yaf
#RUN docker-php-ext-enable yaf
#RUN pecl install yar
#RUN docker-php-ext-enable yar
#RUN pecl install gnupg
#RUN docker-php-ext-enable gnupg
#RUN pecl install uopz
#RUN docker-php-ext-enable uopz

View File

@ -465,7 +465,7 @@ abstract class EvWatcher
* @param bool $value With keepalive value set to FALSE the watcher won't keep Ev::run() / EvLoop::run() from
* returning even though the watcher is active.
*/
public function keepAlive($value) {}
public function keepalive($value) {}
/**
* Sets new callback for the watcher.
@ -479,14 +479,18 @@ abstract class EvWatcher
*
* Marks the watcher as active. Note that only active watchers will receive events.
*/
public function start() {}
public function start()
{
}
/**
* Stops the watcher.
*
* Marks the watcher as inactive. Note that only active watchers will receive events.
*/
public function stop() {}
public function stop()
{
}
}
/**
@ -1256,7 +1260,7 @@ final class EvLoop
* @param int $priority
* @return EvCheck
*/
public function check(callable $callback, $data = null, $priority = 0) {}
public final function check(callable $callback, $data = null, $priority = 0) {}
/**
* Creates EvChild object associated with the current event loop instance;
@ -1268,7 +1272,7 @@ final class EvLoop
* @param int $priority
* @return EvChild
*/
public function child($pid, $trace, callable $callback, $data = null, $priority = 0) {}
public final function child($pid, $trace, callable $callback, $data = null, $priority = 0) {}
/**
* Creates EvEmbed object associated with the current event loop instance.
@ -1279,7 +1283,7 @@ final class EvLoop
* @param int $priority
* @return EvEmbed
*/
public function embed(EvLoop $other, callable $callback, $data = null, $priority = 0) {}
public final function embed(EvLoop $other, callable $callback, $data = null, $priority = 0) {}
/**
* Creates EvFork object associated with the current event loop instance.
@ -1289,7 +1293,7 @@ final class EvLoop
* @param int $priority
* @return EvFork
*/
public function fork(callable $callback, $data = null, $priority = 0) {}
public final function fork(callable $callback, $data = null, $priority = 0) {}
/**
* Creates EvIdle object associated with the current event loop instance.
@ -1299,7 +1303,7 @@ final class EvLoop
* @param int $priority
* @return EvIdle
*/
public function idle(callable $callback, $data = null, $priority = 0) {}
public final function idle(callable $callback, $data = null, $priority = 0) {}
/**
* Invoke all pending watchers while resetting their pending state.
@ -1367,7 +1371,7 @@ final class EvLoop
* @param mixed $data
* @param int $priority
*/
public function prepare(callable $callback, $data = null, $priority = 0) {}
public final function prepare(callable $callback, $data = null, $priority = 0) {}
/**
* Resume previously suspended default event loop.
@ -1397,7 +1401,9 @@ final class EvLoop
* @param int $priority
* @return EvSignal
*/
public function signal($signal, callable $callback, $data = null, $priority = 0) {}
public final function signal($signal, callable $callback, $data = null, $priority = 0)
{
}
/**
* Creates EvStats object associated with the current event loop instance.
@ -1409,7 +1415,7 @@ final class EvLoop
* @param int $priority
* @return EvStat
*/
public function stat($path, $interval, callable $callback, $data = null, $priority = 0) {}
public final function stat($path, $interval, callable $callback, $data = null, $priority = 0) {}
/**
* Stops the event loop.

View File

@ -25,6 +25,7 @@ const CLASSES = array (
'AMQPQueue' => 'amqp/amqp.php',
'AMQPQueueException' => 'amqp/amqp.php',
'AMQPTimestamp' => 'amqp/amqp.php',
'AMQPValueException' => 'amqp/amqp.php',
'APCIterator' => 'apcu/apcu.php',
'APCUIterator' => 'apcu/apcu.php',
'AppendIterator' => 'SPL/SPL.php',
@ -389,6 +390,8 @@ const CLASSES = array (
'Memcached' => 'memcached/memcached.php',
'MemcachedException' => 'memcached/memcached.php',
'MessageFormatter' => 'intl/intl.php',
'MessagePack' => 'msgpack/msgpack.php',
'MessagePackUnpacker' => 'msgpack/msgpack.php',
'Mongo' => 'mongo/mongo.php',
'MongoBinData' => 'mongo/mongo.php',
'MongoClient' => 'mongo/mongo.php',
@ -403,26 +406,34 @@ const CLASSES = array (
'MongoDB' => 'mongo/mongo.php',
'MongoDBRef' => 'mongo/mongo.php',
'MongoDB\\BSON\\Binary' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\BinaryInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Decimal128' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Decimal128Interface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Javascript' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\JavascriptInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\MaxKey' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\MaxKeyInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\MinKey' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\MinKeyInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\ObjectId' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\ObjectIdInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Persistable' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Regex' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\RegexInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Serializable' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Symbol' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Timestamp' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\TimestampInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Type' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\UTCDateTime' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\UTCDateTimeInterface' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Undefined' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\Unserializable' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\BulkWrite' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Command' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Cursor' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\CursorId' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\CursorInterface' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Exception\\AuthenticationException' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Exception\\BulkWriteException' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Exception\\CommandException' => 'mongodb/mongodb.php',
@ -894,8 +905,10 @@ const FUNCTIONS = array (
'GEOSVersion' => 'geos/geos.php',
'MongoDB\\BSON\\fromJSON' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\fromPHP' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\toCanonicalExtendedJSON' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\toJSON' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\toPHP' => 'mongodb/mongodb.php',
'MongoDB\\BSON\\toRelaxedExtendedJSON' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Monitoring\\addSubscriber' => 'mongodb/mongodb.php',
'MongoDB\\Driver\\Monitoring\\removeSubscriber' => 'mongodb/mongodb.php',
'PDF_activate_item' => 'pdflib/PDFlib.php',
@ -3982,7 +3995,9 @@ const FUNCTIONS = array (
'rd_kafka_err2str' => 'rdkafka/functions.php',
'rd_kafka_errno' => 'rdkafka/functions.php',
'rd_kafka_errno2err' => 'rdkafka/functions.php',
'rd_kafka_get_err_descs' => 'rdkafka/functions.php',
'rd_kafka_offset_tail' => 'rdkafka/functions.php',
'rd_kafka_thread_cnt' => 'rdkafka/functions.php',
'read_exif_data' => 'exif/exif.php',
'readdir' => 'standard/standard_7.php',
'readfile' => 'standard/standard_5.php',
@ -4039,6 +4054,7 @@ const FUNCTIONS = array (
'rrd_update' => 'rrd/rrd.php',
'rrd_version' => 'rrd/rrd.php',
'rrd_xport' => 'rrd/rrd.php',
'rrdc_disconnect' => 'rrd/rrd.php',
'rsort' => 'standard/standard_8.php',
'rtrim' => 'standard/standard_1.php',
'sapi_windows_cp_conv' => 'standard/basic.php',
@ -5129,6 +5145,8 @@ const CONSTANTS = array (
'AMQP_OS_SOCKET_TIMEOUT_ERRNO' => 'amqp/amqp.php',
'AMQP_PASSIVE' => 'amqp/amqp.php',
'AMQP_REQUEUE' => 'amqp/amqp.php',
'AMQP_SASL_METHOD_EXTERNAL' => 'amqp/amqp.php',
'AMQP_SASL_METHOD_PLAIN' => 'amqp/amqp.php',
'AM_STR' => 'standard/standard_defines.php',
'APACHE_MAP' => 'soap/soap.php',
'APC_BIN_VERIFY_CRC32' => 'apcu/apcu.php',
@ -6103,6 +6121,7 @@ const CONSTANTS = array (
'FANN_TRAIN_QUICKPROP' => 'fann/fann.php',
'FANN_TRAIN_RPROP' => 'fann/fann.php',
'FANN_TRAIN_SARPROP' => 'fann/fann.php',
'FANN_VERSION' => 'fann/fann.php',
'FILEINFO_CONTINUE' => 'fileinfo/fileinfo.php',
'FILEINFO_DEVICES' => 'fileinfo/fileinfo.php',
'FILEINFO_EXTENSION' => 'fileinfo/fileinfo.php',
@ -7169,6 +7188,7 @@ const CONSTANTS = array (
'MEMCACHE_USER2' => 'memcache/memcache.php',
'MEMCACHE_USER3' => 'memcache/memcache.php',
'MEMCACHE_USER4' => 'memcache/memcache.php',
'MESSAGEPACK_OPT_PHPONLY' => 'msgpack/msgpack.php',
'MHASH_ADLER32' => 'hash/hash.php',
'MHASH_CRC32' => 'hash/hash.php',
'MHASH_CRC32B' => 'hash/hash.php',
@ -9590,6 +9610,7 @@ const CONSTANTS = array (
'RADIUS_X_75' => 'radius/radius.php',
'RADIXCHAR' => 'standard/standard_defines.php',
'RAD_OPTION_TAG' => 'radius/radius.php',
'RD_KAFKA_BUILD_VERSION' => 'rdkafka/constants.php',
'RD_KAFKA_CONF_INVALID' => 'rdkafka/constants.php',
'RD_KAFKA_CONF_OK' => 'rdkafka/constants.php',
'RD_KAFKA_CONF_UNKNOWN' => 'rdkafka/constants.php',
@ -9676,12 +9697,14 @@ const CONSTANTS = array (
'RD_KAFKA_RESP_ERR__FS' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__INTR' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__INVALID_ARG' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__INVALID_TYPE' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__IN_PROGRESS' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__ISR_INSUFF' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__KEY_SERIALIZATION' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__MSG_TIMED_OUT' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__NODE_UPDATE' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__NOENT' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__NO_OFFSET' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__OUTDATED' => 'rdkafka/constants.php',
@ -9689,6 +9712,7 @@ const CONSTANTS = array (
'RD_KAFKA_RESP_ERR__PARTITION_EOF' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__QUEUE_FULL' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__READ_ONLY' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__RESOLVE' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__SSL' => 'rdkafka/constants.php',
@ -9696,6 +9720,7 @@ const CONSTANTS = array (
'RD_KAFKA_RESP_ERR__TIMED_OUT' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__TRANSPORT' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__UNDERFLOW' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__UNKNOWN_GROUP' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION' => 'rdkafka/constants.php',
'RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL' => 'rdkafka/constants.php',
@ -11228,6 +11253,7 @@ const CONSTANTS = array (
'YAML_ANY_BREAK' => 'yaml/yaml.php',
'YAML_ANY_ENCODING' => 'yaml/yaml.php',
'YAML_ANY_SCALAR_STYLE' => 'yaml/yaml.php',
'YAML_BINARY_TAG' => 'yaml/yaml.php',
'YAML_BOOL_TAG' => 'yaml/yaml.php',
'YAML_CRLN_BREAK' => 'yaml/yaml.php',
'YAML_CR_BREAK' => 'yaml/yaml.php',
@ -11238,6 +11264,7 @@ const CONSTANTS = array (
'YAML_LITERAL_SCALAR_STYLE' => 'yaml/yaml.php',
'YAML_LN_BREAK' => 'yaml/yaml.php',
'YAML_MAP_TAG' => 'yaml/yaml.php',
'YAML_MERGE_TAG' => 'yaml/yaml.php',
'YAML_NULL_TAG' => 'yaml/yaml.php',
'YAML_PHP_TAG' => 'yaml/yaml.php',
'YAML_PLAIN_SCALAR_STYLE' => 'yaml/yaml.php',
@ -11249,6 +11276,8 @@ const CONSTANTS = array (
'YAML_UTF16LE_ENCODING' => 'yaml/yaml.php',
'YAML_UTF8_ENCODING' => 'yaml/yaml.php',
'YAR_CLIENT_PROTOCOL_HTTP' => 'yar/yar.php',
'YAR_CLIENT_PROTOCOL_TCP' => 'yar/yar.php',
'YAR_CLIENT_PROTOCOL_UNIX' => 'yar/yar.php',
'YAR_ERR_EXCEPTION' => 'yar/yar.php',
'YAR_ERR_OKEY' => 'yar/yar.php',
'YAR_ERR_OUTPUT' => 'yar/yar.php',
@ -11259,6 +11288,7 @@ const CONSTANTS = array (
'YAR_OPT_CONNECT_TIMEOUT' => 'yar/yar.php',
'YAR_OPT_HEADER' => 'yar/yar.php',
'YAR_OPT_PACKAGER' => 'yar/yar.php',
'YAR_OPT_PERSISTENT' => 'yar/yar.php',
'YAR_OPT_TIMEOUT' => 'yar/yar.php',
'YAR_PACKAGER_JSON' => 'yar/yar.php',
'YAR_PACKAGER_PHP' => 'yar/yar.php',

View File

@ -863,6 +863,8 @@ class AMQPConnection
public function setVerify($verify) { }
public function getSaslMethod(){}
public function setSaslMethod($sasl_method){}
}
/**

View File

@ -40,4 +40,65 @@ function msgpack_pack($value) {}
* @return mixed
* @since 5.0
*/
function msgpack_unpack($str, $object=NULL) {}
function msgpack_unpack($str, $object = null)
{
}
class MessagePack
{
const OPT_PHPONLY = 1;
public function __construct($opt)
{
}
public function setOption($option, $value)
{
}
public function pack($value)
{
}
public function unpack($str, $object)
{
}
public function unpacker()
{
}
}
class MessagePackUnpacker
{
public function __construct($opt)
{
}
public function __destruct()
{
}
public function setOption($option, $value)
{
}
public function feed($str)
{
}
public function execute($str, &$offset)
{
}
public function data($object)
{
}
public function reset()
{
}
}