TrueAsync PHP 0.6.7 (php 8.6)
Highlights
- FrankenPHP on Windows — both Release and Debug builds of FrankenPHP are now produced and shipped alongside the regular PHP artifacts.
- Installer: optional FrankenPHP install — the Windows PowerShell installer now asks (or reads
INSTALL_FRANKENPHP=true) whether to also install FrankenPHP next tophp.exe.
Async extension
Added
- PDO Pool:
getAttribute()support for pool attributes.$pdo->getAttribute(PDO::ATTR_POOL_ENABLED)now returnstrue/falsedepending on whether the connection pool is active.PDO::ATTR_POOL_MINandPDO::ATTR_POOL_MAXreturn the configured pool size limits (orfalsewhen pooling is disabled).PDO::ATTR_POOL_HEALTHCHECK_INTERVALis a construction-only attribute and raises an error if read at runtime.
Fixed
- Heap-use-after-free in
await_all()/await_*()with string keys. When anyawait_*function received an array with non-interned string keys (e.g. fromjson_decode()orstr_repeat()), the returned results/errors arrays had incorrect refcount on those keys. Root cause:async_waiting_callback_disposewas called twice per callback (once fromzend_async_callbacks_removeduringdel_callback, once fromZEND_ASYNC_EVENT_CALLBACK_RELEASE), but did not checkref_count— it unconditionally calledzval_ptr_dtoron the key each time, decrementing the string refcount twice instead of once. When the calling function's local variables were freed (i_free_compiled_variables), the already-freed string was accessed again. Fixed by adding aref_countguard toasync_waiting_callback_dispose: whenref_count > 1, decrement and return without touching resources; cleanup happens only on the final dispose (ref_count == 1).
Windows build
Added
- FrankenPHP support for Windows (Release and Debug). Both build types now produce a slim
*-frankenphp.zipaddon archive containing only FrankenPHP-specific files:frankenphp.exe,libwatcher-c.dll,brotli*.dllandpthreadVC3.dll. The PHP runtime DLL and extensions are not duplicated — extract this archive on top of the main PHP package. - Debug FrankenPHP linkage. FrankenPHP's cgo configuration was split into
cgo_windows.go/cgo_windows_debug.gogated by thezend_debugGo build tag. When building against a debug devel pack, the workflow passes-tags zend_debugso clang sees-DZEND_DEBUG=1, matching the signatures of_emalloc/_efree/_estrdupinphp8ts_debug.lib(which gainZEND_FILE_LINE_DCarguments in debug mode). - Installer: optional FrankenPHP install.
installer/install.ps1now exposes anINSTALL_FRANKENPHPenvironment variable and an interactive "Install FrankenPHP?" prompt. When enabled, the installer downloads the matching slim frankenphp addon archive (respecting the Release/Debug choice), verifies its checksum against the samesha256sums.txt, and extracts it on top of the main install —frankenphp.exelands next tophp.exe.
Fixed
- Clang/MSVC ABI mismatch in
frankenphp_extension.c. Calls toemalloc(sizeof(zval))were routed throughzend_alloc.h's__builtin_constant_pspecialization to_emalloc_16, which MSVC-builtphp8ts.libdoes not export. Replaced withsafe_emalloc(1, sizeof(zval), 0)to hit the exported_safe_emallocentry point. strtok_runresolved on Windows. The Windows CRT has nostrtok_r. Replaced all four call sites infrankenphp_extension.cwithphp_strtok_r(portable wrapper frommain/php_reentrancy.h).- Debug packaging hardcoded release DLL names. The Package FrankenPHP step tried to copy
php8ts.dll, but debug builds shipphp8ts_debug.dll(seewin32/build/confutils.jsPHPLIB). Packaging now globsphp*ts*.dllandphp*ts*.libso both release and debug names work.
Installation
Windows (PowerShell)
irm https://raw.githubusercontent.com/true-async/releases/master/installer/install.ps1 | iexTo also install FrankenPHP non-interactively:
$env:INSTALL_FRANKENPHP="true"; irm https://raw.githubusercontent.com/true-async/releases/master/installer/install.ps1 | iexDocker
docker pull trueasync/php-true-async:0.6.7-php8.6
docker pull trueasync/php-true-async:latest