[doc-base] check-ci-without-jing: Add --with-jing option and exercise both validators in CI

From: Date: Fri, 24 Jul 2026 13:37:35 +0000
Subject: [doc-base] check-ci-without-jing: Add --with-jing option and exercise both validators in CI
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23487@lists.php.net to get a copy of this message
Author: Jordi Kroon (jordikroon) Date: 2026-07-24T15:37:26+02:00 Commit: https://github.com/php/doc-base/commit/872b6042873f550d757c06128c172f3f7f193c02 Raw diff: https://github.com/php/doc-base/commit/872b6042873f550d757c06128c172f3f7f193c02.diff Add --with-jing option and exercise both validators in CI Changed paths: M .github/workflows/integrate.yaml M configure.php Diff: diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index ec7568bd84..cf0350c606 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -58,5 +58,8 @@ jobs: php doc-base/scripts/qa/extensions.xml.php --check php doc-base/scripts/qa/section-order.php - - name: "Build documentation for ${{ matrix.language }}" - run: "php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}" + - name: "Build documentation for ${{ matrix.language }} (jing)" + run: "php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-jing=yes --with-lang=${{ matrix.language }}" + + - name: "Build documentation for ${{ matrix.language }} (libxml)" + run: "php doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-jing=no --with-lang=${{ matrix.language }}" diff --git a/configure.php b/configure.php index 1a07591639..02c9584fb9 100755 --- a/configure.php +++ b/configure.php @@ -85,6 +85,8 @@ function usage() // {{{ --with-php=PATH Path to php CLI executable [detect] --with-lang=LANG Language to build [{$acd['LANG']}] --with-partial=my-xml-id Root ID to build (e.g. <book xml:id="MY-ID">) [{$acd['PARTIAL']}] + --with-jing=auto|yes|no Validate with Jing (requires Java) instead of + libxml [{$acd['JING']}] --disable-broken-file-listing Do not ignore translated files in broken-files.txt --disable-xpointer-reporting Do not show XInclude/XPointer failures. Only effective @@ -294,6 +296,7 @@ function find_xml_files($path) // {{{ 'TRANSLATION_ONLY_INCL_BEGIN' => '', 'TRANSLATION_ONLY_INCL_END' => '', 'XPOINTER_REPORTING' => 'yes', + 'JING' => 'auto', ); // }}} $ac = $acd; @@ -425,6 +428,14 @@ function find_xml_files($path) // {{{ $ac['XPOINTER_REPORTING'] = $v; break; + case 'jing': + if (!in_array($v, array('auto', 'yes', 'no'))) { + errbox("Invalid value for --with-jing: {$v} (expected auto, yes or no)"); + errors_are_bad(1); + } + $ac['JING'] = $v; + break; + case '': break; @@ -989,11 +1000,17 @@ function xml_validate( $dom ) // Jing is faster, but depends on Java. - $out = null; - $ret = null; - exec( "java -version 2>&1" , $out , $ret ); + $jing = $GLOBALS['ac']['JING']; - if ( $ret == 0 ) + if ( $jing == 'auto' ) + { + $out = null; + $ret = null; + exec( "java -version 2>&1" , $out , $ret ); + $jing = $ret == 0 ? 'yes' : 'no'; + } + + if ( $jing == 'yes' ) xml_validate_jing(); else xml_validate_libxml( $dom );

« previous php.doc.cvs (#23487) next »