From 6a6c83c13899f07b2e1a45ec14e49f3eae443633 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 1 Feb 2024 10:36:17 +0100 Subject: [PATCH] php: add lower version bound constraint to avoid applying it to older PHP versions. --- pkgs/top-level/php-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 751a13b34ce7..c3ff83d20c83 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -370,7 +370,8 @@ lib.makeScope pkgs.newScope (self: with self; { configureFlags = [ "--enable-dom" ]; - patches = lib.optionals (lib.versionOlder php.version "8.2.14") [ + # Add a PHP lower version bound constraint to avoid applying the patch on older PHP versions. + patches = lib.optionals (lib.versionOlder php.version "8.2.14" && lib.versionAtLeast php.version "8.1") [ # Fix tests with libxml 2.12 # Part of 8.3.1RC1+, 8.2.14RC1+ (fetchpatch {