gnu: php: Update to 7.2.7.
[jackhill/guix/guix.git] / gnu / packages / php.scm
index b6f64bc..36e29bd 100644 (file)
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages zip)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module ((guix licenses) #:prefix license:))
 
+(define gd-for-php
+  (package
+    (inherit gd)
+    (source (origin
+             (inherit (package-source gd))
+             (patches (search-patches "gd-fix-tests-on-i686.patch"
+                                      "gd-freetype-test-failure.patch"
+                                      "gd-CVE-2018-5711.patch"))))))
+
 (define-public php
   (package
     (name "php")
-    (version "7.1.6")
+    (version "7.2.7")
     (home-page "https://secure.php.net/")
     (source (origin
               (method url-fetch)
@@ -61,7 +70,7 @@
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0nr49gqhk4pv8kcdc60cl1mgwlinawpraq9ba15whzmb472lsn01"))
+                "1w1iix3hkwlgkr83zpr2wbnjzd8lwhy02i5hp1j1zbrv7caw00gb"))
               (modules '((guix build utils)))
               (snippet
                '(with-directory-excursion "ext"
@@ -77,7 +86,8 @@
                               "pcre/pcrelib"
                               "sqlite3/libsqlite"
                               "xmlrpc/libxmlrpc"
-                              "zip/lib"))))))
+                              "zip/lib"))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
                          "ext/gd/tests/bug73213.phpt"
                          ;; Test expects generic "gd warning" but gets the actual function name.
                          "ext/gd/tests/createfromwbmp2_extern.phpt"
+                         ;; This bug should have been fixed in gd 2.2.2.
+                         ;; Is it a regression?
+                         "ext/gd/tests/bug65148.phpt"
                          ;; TODO: Enable these when libgd is built with xpm support.
                          "ext/gd/tests/xpm2gd.phpt"
                          "ext/gd/tests/xpm2jpg.phpt"
                          ;; iconv breaks the loop after the first error with Termsig=11.
                          "ext/iconv/tests/iconv_strpos_variation4.phpt"
                          "ext/iconv/tests/iconv_strrpos_variation3.phpt"
+                         ;; Expects "invalid multibyte sequence" but got
+                         ;; "unknown error".
+                         "ext/iconv/tests/bug76249.phpt"
 
                          ;; XXX: These test failures appear legitimate, needs investigation.
                          ;; open_basedir() restriction failure.
                          ;; ("ISO-8859-1"=>"UTF-8") unknown error.
                          "ext/standard/tests/file/bug43008.phpt"
                          ;; Table data not created in sqlite(?).
-                         "ext/pdo_sqlite/tests/bug_42589.phpt"))
+                         "ext/pdo_sqlite/tests/bug_42589.phpt"
+
+                         ;; Small variation in output.
+                         "ext/mbstring/tests/mb_ereg_variation3.phpt"
+                         "ext/mbstring/tests/mb_ereg_replace_variation1.phpt"
+                         "ext/mbstring/tests/bug72994.phpt"
+                         "ext/ldap/tests/ldap_set_option_error.phpt"
+
+                         ;; Sometimes cannot start the LDAP server.
+                         "ext/ldap/tests/bug76248.phpt"))
 
              ;; Skip tests requiring network access.
              (setenv "SKIP_ONLINE_TESTS" "1")
              ;; Without this variable, 'make test' passes regardless of failures.
              (setenv "REPORT_EXIT_STATUS" "1")
+             ;; Skip tests requiring I/O facilities that are unavailable in the
+             ;; build environment
+             (setenv "SKIP_IO_CAPTURE_TESTS" "1")
              #t)))
        #:test-target "test"))
     (inputs
        ("curl" ,curl)
        ("cyrus-sasl" ,cyrus-sasl)
        ("freetype" ,freetype)
-       ("gd" ,gd)
+       ("gd" ,gd-for-php)
        ("gdbm" ,gdbm)
        ("glibc" ,glibc)
        ("gmp" ,gmp)
        ("libxpm" ,libxpm)
        ("libxslt" ,libxslt)
        ("libx11" ,libx11)
-       ("oniguruma" ,oniguruma)
+       ("oniguruma" ,oniguruma-5)
        ("openldap" ,openldap)
        ("openssl" ,openssl)
        ("pcre" ,pcre)