From a97717d23e27e918249ff3653a72da86c8f54a1c Mon Sep 17 00:00:00 2001 From: Arjen de Korte Date: Sat, 16 Aug 2025 18:59:41 +0200 Subject: [PATCH] Fix GH-19021: deprecation for tidyOptIsReadOnly The tidyOptGetCategory function (added in libtidy 5.4.0) if only useable if TidyInternalCategory (added in libtidy 5.6.0) is also present, so check for the latter instead. close GH-19053 --- NEWS | 5 +++++ ext/tidy/config.m4 | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 17424b38a72..858b7190cd2 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,11 @@ PHP NEWS - Standard: . Fixed bug GH-16649 (UAF during array_splice). (alexandre-daubois) +- Tidy: + . Fixed GH-19021 build issue with libtidy in regard of tidyOptIsReadonly + deprecation and TidyInternalCategory being available later than + tidyOptGetCategory. (arjendekorte) + 28 Aug 2025, PHP 8.3.25 - Core: diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index 569cb367294..802e12fc367 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -62,7 +62,9 @@ if test "$PHP_TIDY" != "no"; then AC_DEFINE(HAVE_TIDYRELEASEDATE,1,[ ]) ], [], []) - PHP_CHECK_LIBRARY($TIDY_LIB_NAME,tidyOptGetCategory, + dnl The tidyOptGetCategory function (added in libtidy 5.4.0) if only useable + dnl if TidyInternalCategory (added in libtidy 5.6.0) is also present. + PHP_CHECK_LIBRARY($TIDY_LIB_NAME,TidyInternalCategory, [ AC_DEFINE(HAVE_TIDYOPTGETCATEGORY,1,[ ]) ], [], [])