Skip to content

Commit

Permalink
fixup! flake.lock: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Aug 25, 2024
1 parent 1ce2928 commit ae0d94a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 606 deletions.
39 changes: 0 additions & 39 deletions pkgs/package-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,27 +132,6 @@ in
# Patch rebased from https://github.com/php/php-src/commit/061058a9b1bbd90d27d97d79aebcf2b5029767b0
# Fix PHP tests with libxml2 2.12
./patches/php74-libxml212-tests.patch
] ++ lib.optionals (lib.versionAtLeast prev.php.version "8.0" && lib.versionOlder prev.php.version "8.1") [
# Backport of PHP_LIBXML_IGNORE_DEPRECATIONS_START and PHP_LIBXML_IGNORE_DEPRECATIONS_END
# https://github.com/php/php-src/commit/e2d97314ab342d434e778cd00a2f34e4bdb07664
# Required for libxml2 2.13 compatibility patch.
./patches/php81-libxml213-ignore-deprecations.patch

# Fix build with libxml2 2.13+. Has to be applied after libxml2 2.12 patch.
# https://github.com/php/php-src/pull/14816
./patches/php80-libxml213-compatibility.patch

# Fix memory leak with invalid encoding (fixes bug77569 test but makes fail toString_exceptions)
# https://github.com/php/php-src/commit/20ac42e1b065e23376e7ea548995636369809a7d
#
# On PHP 8.0, setting `DOMDocument::$encoding` to `null` as is done by `bug77569.phpt` will coerce the property to an empty string.
# Before libxml2 2.13, `xmlFindCharEncodingHandler('')` would return `null` but 2.13 changed it to return a pointer to an existing handler.
# As a result setting the encoding in `bug77569.phpt` would not throw an exception and, consequently, the test would fail to match the output.
# This patch makes it so that trying to set the `encoding` property to `null` throw “Invalid document encoding” error straigth away.
# Unfortunately, in PHP 8.0, that error, for some reason, races ahead the exception thrown in `__toString` method of an object that is set as `encoding`.
# This breaks the `toString_exceptions.phpt`.
# This bug appears to be fixed in PHP 8.1.
./patches/php80-libxml-invalid-encoding.patch
] ++ lib.optionals (lib.versionAtLeast prev.php.version "8.1" && lib.versionOlder prev.php.version "8.2.14") [
# Patch rebased from https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082
# Fix compilation errors with libxml2 2.12
Expand Down Expand Up @@ -187,11 +166,6 @@ in
rm ext/dom/tests/DOMDocument_loadXML_error2.phpt
rm ext/dom/tests/DOMDocument_load_error2.phpt
'')

(lib.optionalString (lib.versionAtLeast prev.php.version "8.0" && lib.versionOlder prev.php.version "8.1") ''
# Removing test failing due to php80-libxml-invalid-encoding.patch
rm ext/dom/tests/toString_exceptions.phpt
'')
];
} // lib.optionalAttrs (lib.versionOlder prev.php.version "7.1" && pkgs.stdenv.cc.isClang) {
NIX_CFLAGS_COMPILE = (attrs.NIX_CFLAGS_COMPILE or "") + " -Wno-incompatible-function-pointer-types";
Expand Down Expand Up @@ -770,19 +744,6 @@ in
throw "php.extensions.relay requires PHP version >= 8.0.";

simplexml = prev.extensions.simplexml.overrideAttrs (attrs: {
patches =
let
upstreamPatches =
attrs.patches or [];

ourPatches = lib.optionals (lib.versionAtLeast prev.php.version "7.3" && lib.versionOlder prev.php.version "8.1") [
# Fix test with libxml2 2.13+.
# https://github.com/php/php-src/pull/14816
./patches/php80-libxml213-compatibility-simplexml.patch
];
in
ourPatches ++ upstreamPatches;

configureFlags =
attrs.configureFlags or []
++ lib.optionals (lib.versionOlder prev.php.version "7.4") [
Expand Down
133 changes: 0 additions & 133 deletions pkgs/patches/php80-libxml-invalid-encoding.patch

This file was deleted.

22 changes: 0 additions & 22 deletions pkgs/patches/php80-libxml213-compatibility-simplexml.patch

This file was deleted.

Loading

0 comments on commit ae0d94a

Please sign in to comment.