event pecl.php.net Provides interface to libevent library This is an extension to efficiently schedule I/O, time and signal based events using the best I/O notification mechanism available for specific platform. This is a port of libevent to the PHP infrastructure. Version 1.0.0 introduces: * new OO API breaking backwards compatibility * support of libevent 2+ including HTTP, DNS, OpenSSL and the event listener. Note, event-1.0.0 and greater is not compatible with previous versions. Ruslan Osmanov osmanov osmanov@php.net yes Anatol Belski ab ab@php.net yes Remi Collet remi remi@php.net yes 2017-03-26 2.3.0 2.3.0 stable stable PHP Fixed build errors with LibreSSL 5.4.0 1.4.0a1 libevent pecl.php.net 0.0.2 libevent libevent event 2.3.0 2.3.0 beta beta PHP Fixed build errors with LibreSSL 2.3.0RC1 2.3.0RC1 beta beta PHP Add: EventSslContext methods: setMinProtoVersion and setMaxProtoVersion for OpenSSL >= 1.1.0. Add: EventSslContext constants: OPENSSL_VERSION_NUMBER and OPENSSL_VERSION_TEXT. Fix: compilation warnings regarding OpenSSL features deprecated in version 1.0.0 and newer. Deprecated: EventSslContext protocol version options are deprecated for OpenSSL >= 1.1.0. Use the new setMinProtoVersion and setMaxProtoVersion methods instead. Fix: build failed with custom openssl setup (non-standard --with-openssl-dir) 2.2.1 2.2.0 stable stable PHP Fix: issue #31 where numeric file descriptor caused segmentation fault 2.2.0 2.2.0 stable stable PHP Add: EventUtil::createSocket method(PHP5) Add: EventListener::free method Fix: issue #30 where building without SSL3 failed Fix: the class property names were wrapped in double quotes 2.1.0 2.1.0 stable stable PHP Add: EventUtil::SOCK_RAW constant Add: EventSslContext option constants: OPT_REQUIRE_CLIENT_CERT and OPT_VERIFY_CLIENT_ONCE Fix: EventBufferEvent::createPair caused segmentation fault in PHP7 SSL Fixes: - chained self-signed certificate failed to pass with EventSslContext::OPT_ALLOW_SELF_SIGNED = TRUE - the server didn't set the list of CAs to be sent to the client when requesting a client certificate for underlying SSL structure - EventSslContext::OPT_ALLOW_SELF_SIGNED = TRUE accepted any self-signed certificate without regard to OPT_CA_FILE/OPT_CA_PATH Fix: PHP 7.1.0alpha1 build errors 2.0.4 2.0.0 stable stable PHP Issue #28: event-2.0.3 Windows build fails 2.0.3 2.0.0 stable stable PHP Issue #27: PHP > 7.0.6RC1 build fails 2.0.2 2.0.0 stable stable PHP PHP7: fixed random EDOM errors in EventUtil::setSocketOption 2.0.1 2.0.0 stable stable PHP PHP7: Protected user callbacks from destruction within libevent callbacks 2.0.0 2.0.0 stable stable PHP Fixed some memory issues in PHP7 - SSL leaks - Possibility of implicit destruction of user vars - Unclean SSL bufferevent shutdown - EventBufferEvent::free() within a callback damaged zvals bound to corresponding bufferevent thereby causing SEGFAULT Fixed PHP5/PHP7 memory issue: string returned by EventBuffer::pullup() was not zero-terminated 2.0.0RC2 2.0.0 beta stable PHP Fixed Mac OS X build errors 2.0.0RC1 2.0.0 beta stable PHP PHP7 support added. Fixes: - issue #23: memory leak in EventHttpConnection close callback + memory leaks in HTTP callbacks. - Libevent 'unrecoverable' fatal errors(fixed by stopping the loop in EventBase free-storage handler). API changes: - EventUtil::createSocket method added(PHP7) - removed the first(EventBase) argument of EventBufferEvent::sslFilter method, since the internal EventBase object must match EventBase object within the underlying EventBufferEvent 1.11.3 1.10.0 stable stable PHP Issue #20: SSL_GET_PREV_SESSION:session id context uninitialized 1.11.2 1.10.0 stable stable PHP Issue #6: memory leaks in EventHttp callbacks EventBufferEvent object returned by EventHttpRequest::getBufferEvent() should be freed explicitly, if the method is called from a userspace callback. 1.11.1 1.10.0 stable stable PHP Fixed build with old openssl (RHEL-5) (thanks to Remi Collet) 1.11.0 1.10.0 stable stable PHP Fix: exceptions thrown from EventHttp and EventBufferEvent userspace callbacks were not passed through back to user. Now the event loop will break and re-throw the exception. Add: EventBase::free method Add: EventBufferEvent methods: - close - sslGetCipherInfo - sslGetCipherName - sslGetCipherVersion - sslGetProtocol Add: EventSslContext options: - OPT_NO_SSLv2 - OPT_NO_SSLv3 - OPT_NO_TLSv1 - OPT_NO_TLSv1_1 - OPT_NO_TLSv1_2 - OPT_CIPHER_SERVER_PREFERENCE - TLSv11_CLIENT_METHOD - TLSv11_SERVER_METHOD - TLSv12_CLIENT_METHOD - TLSv12_SERVER_METHOD (Thanks to Mathieu CARBONNEAUX @ bitbucket.org) Issue #13: EventBufferEvent::__construct failed to accept a persistent socket client(STREAM_CLIENT_PERSISTENT) 1.10.4 1.9.0 stable stable PHP Fix: exceptions thrown from EventHttp and EventBufferEvent userspace callbacks were not passed through back to user. Now the event loop will break and re-throw the exception. 1.10.3 1.9.0 stable stable PHP Issue #8: pecl install failed due to the REST API issues with Unicode 1.10.2 1.9.0 stable stable PHP Fix: EventBufferEvent::read() accepted negative values Fix: TSRM context was not set in EventHttp::__construct (J. Fekete) Fix: refcounter in EventHttp's default callback (J. Fekete) 1.10.1 1.9.0 stable stable PHP Deleted a troublesome phpt test 1.10.0 1.9.0 stable stable PHP Issue #3: Segmentation fault on EventHttpRequest->free() (Bitbucket's tracker). Add: EventHttpConnection::__construct() now optionally accepts EventSslContext argument (Issue #5). Add: EventHttp::__construct() now accepts EventSslContext object as argument. 1.9.1 1.8.0 stable stable PHP Fix: return value of EventBase::reInit() was inverted issue #7: PHP_EVENT_REQUIRE_BASE_BY_REF() didn't work in 5.6.0-dev (fixed by Remi Collet) 1.9.0 1.8.0 stable stable PHP Windows support introduced(thanks to Anatol Belski <ab@php.net>) LIBEVENT_VERSION is now reported in phpinfo(Remi <remi@php.net>) Forced passing EventBase argument by reference. A method accepting EventBase will generate fatal error in case if corresponding argument is not passed by reference. EventBufferEvent::createPair method made static. 1.8.1 1.8.0 stable stable PHP Fix: Bug #65847 Issue with old libevent2 where evhttp_connection_get_bufferevent function was not available with libevent version < 2.0.17 (thanks to Remi <remi@php.net>) 1.8.0 1.8.0 stable stable PHP Add: EventHttpRequest methods: getBufferEvent, getConnection, closeConnection(thanks to rickysu at Bitbucket) Add: EventHttpConnection::setCloseCallback method 1.7.8 1.7.0 stable stable PHP Fix: build error on Solaris Introduced negative dependencies: libevent extension, windows OS 1.7.7 1.7.0 stable stable PHP Fix: incorrect handling of sockets extension dependency (a hack for distros installing sockets separately) 1.7.6 1.7.0 stable stable PHP Change: sockets extension is now required(see bug #65597). The user can still turn off this requirement off explicitly with --disable-event-sockets configure option 1.7.5 1.7.0 stable stable PHP Fix: build error with custom libevent installation prefixes like /lib(John Wamer) 1.7.4 1.7.0 stable stable PHP Fix: Segmentation fault caused by direct access to the zend object properties' hash table 1.7.3 1.7.0 stable stable PHP Fix: in php_event.c write_property function was non-static Fix: absence of get_gc property handler caused segfaults with gc_collect_cycles() 1.7.2 1.7.0 stable stable PHP Fix: bug #65320 where we got build errors in attempts to compile event statically(thanks to florin) Fix: bug #65319 where config.m4 used <php_version.h> to detect current PHP version Fix: config.m4 included -levent_pthreads into LDFLAGS even --without-event-pthreads configuration Fix: evthread_use_pthreads() call skept due to a "macro magic"(PHP_EVENT_ASSERT) 1.7.1 1.7.0 stable stable PHP Fix: segmentation fault on gc_collect_cycles() after calling Event::free(), 5lava @ Bitbucket reported Fix: assignment reference to "data" property caused 'Fatal error: Cannot assign by reference to overloaded object' Fix: evnt object dtors sometimes didn't free the 'data' member until the script shutdown phase 1.7.0 1.7.0 stable stable PHP Merged in 5lava/pecl-event (pull request #1) @bitbucket: Fix: EventBufferEvent::setTimeouts() didn't work with double values Fix: EventBuffer::copyout() didn't work in some cases Add: EventBuffer::readFrom() method (corresponds to evbuffer_read()) Add: EventUtil::getSocketFD() method 1.6.2 1.6.0 stable stable PHP Fix: bug #64678 where Fedora Packaging Guidlines required LICENSE file Fix: bug #64680 where we should check for SKIP_ONLINE_TESTS environment variable Fix: bug #64679 where we had buffer overflow caused by struct sockaddr_storage * pointer 1.6.1 1.6.0 stable stable PHP Fix: bug #64652 where Event::__construct returned valid object, however, with uninitialized internal struct which caused segmentation faults in further method calls 1.6.0 1.6.0 stable stable PHP Fix: bug #64551 with build failed on Mac OS X Fix: address argument of the listener accept callback contained garbage in case of a client connected via UNIX domain socket Add: EventBuffer::write, EventUtil::setSocketOption methods and some constants Refact: automatically set the upper bound of EventBuffer::search to the buffer length, if it is greater then the length Fix: make the code compatible with PHP 5.5.0 .. 5.6.0-dev Fix: build error with zts PHP setup Fix: build error with libevent_extra disabled Add: EventListener fd readonly property for numeric file descriptor of the socket associated with the listener Add: EventBuffer::substr method INCOMPATIBLE CHANGES! Renamed EventBuffer::remove to EventBuffer::read, EventBuffer::read now takes only max_bytes argument and returns string. Renamed EventBuffer::removeBuffer to EventBuffer::appendFrom EventBuffer::read now takes single argument 'size' and returns the string read 1.5.1 1.5.0 stable stable PHP Fix: EventBuffer::removeBuffer returned boolean instead of the number of bytes read Add: EventBuffer::fd property Change: EventBuffer class is not final any more 1.5.0 1.5.0 stable stable PHP Fix: uninitialized socket caused segmentation fault in EventBufferEvent methods Del: EventBufferPosition class removed, EventBuffer::search now accepts and returns integers Add: EventBuffer::searchEol method Add: EventUtil::getSocketName method Add: EventListener::getSocketName method Fix: memory leak due to lack of zend_hash_destroy on the ssl context options Add: support of UNIX domain sockets in EventListener::__construct, EventBufferEvent::connect methods 1.4.0 1.4.0 beta beta PHP Add: HTTP server support: * EventHttp methods: setMaxBodySize, setMaxHeadersSize, setTimeout, addServerAlias, removeServerAlias setCallback, setDefaultCallback, setAllowedMethods, setMaxBodySize, setMaxHeadersSize, setTimeout, addServerAlias, removeServerAlias; * EventHttpRequest class, callback and custom data can be bound to the request for future use with EventHttpConnection * New EventHttpConnection::makeRequest method allows to make custom HTTP requests by means of EventHttpRequest class Change: make EventDnsBase parameter optional in EventHttpConnection::__construct Fix: classes/buffer_event.c: possible memory access violation in bufferevent callback Fix: turn off buggy libevent thread lock debugging when built with --enable-event-debug 1.3.0 1.3.1 beta beta PHP Fix: possible memory access violations in EventBufferEvent input/output property handlers Change: Event::$timer_pending property removed; generic Event::$pending property added Fix: With OPT_LEAVE_SOCKETS_BLOCKING flag EventListener::__construct turned fd to non-blocking mode Fix: property and class HashTable's were not free'd in MSHUTDOWN Add: Event::$data property Fix: Event::__construct failed with Event::TIMEOUT flag Fix: memory leak in EventBuffer::readLine Add: --with-event-pthreads configure option Fix: EventBase::reInit method's arginfo 1.2.6 1.3.0 beta beta PHP Fix: with OpenSSL turned off got error: undefined symbol: zim_EventUtil_sslRandPoll Add: implemented get_properties property handler(is called when one casts an object to array) Refact: removed memory alloc for empty property hashtables Fix: heap corruption caused by EventBufferEvent callbacks(thanks to Marco Schuster) Fix: continuous calls to EventBufferEvent::setCallbacks didn't free old fci/fcc(thanks to Marco Schuster) Fix: possible heap corruption in EventListener's callback Add: EventBase::resume method 1.2.3 1.2.0 alpha alpha PHP Fix: build errors Fix: undefined symbol SSLv2_*_method when SL_OP_NO_SSLv2 defined 1.2.0 1.2.0 alpha alpha PHP Fix: non-static zend_always_inline function failed to compile with some (non-zts) php setups Change: static EventBuffer::addBuffer made non-static with one argument Add: EventBuffer expand, prepend, prependBuffer, drain, copyout, readLine, search, setPosition methods Add: EventBufferPosition class Fix: configure error in FreeBSD Add: OpenSSL support: EventBufferEvent methods: sslFilter, sslSocket, sslError, sslRenegotiate; EventSslContext class Add: EventBuffer::pullup method 1.1.1 1.1.0 devel devel PHP Fix: the installer failed to determine location of src/common.h 1.1.0 1.1.0 devel devel PHP Procedural API converted to OOP API 1.0.1 1.0.0 devel devel PHP Fix: crash due to destruction of the internal bufferevent buffers (synced with oop branch) Fix: extra memory consumption caused by continuous calls to bufferevent_get_input/_output Fix: memory violation while parsing event_config_set_max_dispatch_interval parameters 2013-01-19 1.0.0 1.0.0 devel devel PHP Libevent 2+ support added 2004-12-16 Wez Furlong wez wez@php.net yes 0.9.1 0.9.1 beta beta PHP Added event_timeout() function for easily scheduling a callback after a certain period of time. The timeout may be persistent to make the callback a recurrent event. Fixed an issue with timercmp() on windows that caused a busy wait when the scheduler could have performed a sleep. Windows scheduling engine now also processes the message queue while waiting; useful for COM/GUI based scripts. Fixed build for threaded systems with real signals. Supports epoll(4), poll(2) and select(2) IO notification engines. Support for /dev/poll and kqueue is pending. On Windows, currently only sockets can participate in the IO notification engine. 1.2.5 1.2.1 1.2.4 1.2.1 alpha alpha alpha alpha PHP PHP Fix: unneeded Z_ADDREF_P() calls in EventListener, EventBufferEvent constructors and factory methods Fix: EventListener cached file descriptor for all connections Change: EventBufferEvent enable/disable methods return bool now Change: instead of stream pass numeric file descriptor to EventListener's accept-connection callback Add: callbacks and the callback arg are now passed to EventBufferEvent::__construct as optional arguments Fix: deleted redundant len argument of EventBuffer::readLine Fix: EventBuffer::readLine returned non-dup'd string. Caused bugs with pointers.