[0.21.0] - 2026-08-13
✨ Added
- Built-in MIME type exclusion list (#98, 416ee17, #100, f761b4b)
- The extension now ships a built-in list of non-compressible MIME types (video/, audio/, common image/font/archive formats), consulted whenever
brotli.output_compression_exclude_typesdoesn't produce a definitive match - The list is shown in the
phpinfo()output - Regression tests
tests/ob_exclude_004.phpt(wildcard match) and renamedtests/ob_exclude_001.phptto reflect it exercises the built-in list without any ini setting
- The extension now ships a built-in list of non-compressible MIME types (video/, audio/, common image/font/archive formats), consulted whenever
- Negation tokens in
brotli.output_compression_exclude_types(#102)- A token prefixed with
!re-enables compression for a MIME type that would otherwise be excluded by the built-in list, supporting exact matches andtype/*wildcards - Within the same list, when multiple tokens match a MIME type, the last one wins regardless of sign (gitignore-style precedence), e.g.
image/*,!image/pngexcludes all images except PNG - Regression tests
tests/ob_exclude_005.phpt–tests/ob_exclude_008.phpt
- A token prefixed with
phpinfo()improvements (#99)- Show whether the bundled or an external Brotli library is in use
- Show whether the
brotliAPCu serializer is active, inactive, or APCu isn't loaded - Rename "APCu serializer ABI" to "APCu serializer interface version", and show when APCu support wasn't built in
🐛 Fixed
- Memory leak when
BrotliEncoderCompressStream()fails on PHP 7.4+ (#95, b222289)- The early-return path taken on
PHP_VERSION_ID >= 70400didn't freeoutput, unlike the other path
- The early-return path taken on
- Compiler warnings (#96, 1618491, dc4e1e5)
- Silence a
-Wunicodewarning from an unintended\Uescape sequence - Remove unused
zval *reslocals inbrotli_compress_add()andbrotli_uncompress_add()
- Silence a
📈 Improved
- Deflake
tests/streams_001.phpt,tests/streams_002.phptandtests/streams_004.phptby giving each its own scratch file instead of sharingtests/data.out(#101, 5d988e7)- PHP 8.6's parallel
run-tests.phpworkers raced each other over the shared file, causing intermittent failures
- PHP 8.6's parallel
What's Changed
- Fix memory leak when BrotliEncoderCompressStream() fails by @ndossche in #95
- Fix compiler warnings by @pavetheway91 in #96
- built-in mime type exclusion list by @pavetheway91 in #98
- phpinfo improvements by @pavetheway91 in #99
- mime exclusion list followup by @kjdev in #100
- Fix racy tests sharing tests/data.out by @andypost in #101
- Feat mimetype exclude negation tokens by @kjdev in #102
- upgrade: version to 0.21.0 by @kjdev in #103
Full Changelog: 0.20.0...0.21.0