From a153a51416d10b47e2ce750124b42be77213d55b Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 6 Apr 2026 15:12:33 +0200 Subject: [PATCH] Composer: clarify that the PHP `libxml` extension is required The `simplexml` and `xmlwriter` extensions both need the `libxml` extension, so the requirement not being explicit was not problematic, as it was already enforced via the other two requirements. Still, better to be explicit. Includes adding the extension to the requirements check and the related tests. --- composer.json | 1 + requirements.php | 1 + scripts/BuildRequirementsCheckMatrix.php | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index b9fda4abe4..88ce28ee0d 100644 --- a/composer.json +++ b/composer.json @@ -35,6 +35,7 @@ }, "require": { "php": ">=7.2.0", + "ext-libxml": "*", "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*" diff --git a/requirements.php b/requirements.php index 2250b4a4de..b6cf7f9be2 100644 --- a/requirements.php +++ b/requirements.php @@ -41,6 +41,7 @@ function checkRequirements() $requiredExtensions = array( 'tokenizer', + 'libxml', 'xmlwriter', 'SimpleXML', ); diff --git a/scripts/BuildRequirementsCheckMatrix.php b/scripts/BuildRequirementsCheckMatrix.php index c86723433c..a60c143415 100644 --- a/scripts/BuildRequirementsCheckMatrix.php +++ b/scripts/BuildRequirementsCheckMatrix.php @@ -82,7 +82,7 @@ public function getBuilds() */ private function getValidBuilds() { - $extensions = ['minimal' => 'none, tokenizer, xmlwriter, SimpleXML']; + $extensions = ['minimal' => 'none, tokenizer, libxml, xmlwriter, SimpleXML']; $builds = []; foreach ($this->validPhp as $php) { @@ -145,10 +145,10 @@ private function getInvalidPHPBuilds() private function getMissingExtensionsBuilds() { $extensions = [ - 'missing tokenizer' => 'none, xmlwriter, SimpleXML', - 'missing xmlwriter' => ':xmlwriter', - 'missing SimpleXML' => ':SimpleXML', - 'missing both XML exts' => 'none, tokenizer', + 'missing tokenizer' => 'none, xmlwriter, SimpleXML', + 'missing xmlwriter' => ':xmlwriter', + 'missing SimpleXML' => ':SimpleXML', + 'missing all XML exts' => 'none, tokenizer', ]; $builds = [];