diff mbox series

[bug#67902,v4,32/98] gnu: Add php-predis-predis.

Message ID 20241007214530.4420-32-ngraves@ngraves.fr
State New
Headers show
Series [bug#67902,v4,01/98] gnu: Add abnfgen. | expand

Commit Message

Nicolas Graves Oct. 7, 2024, 9:44 p.m. UTC
* gnu/packages/php-xyz.scm (php-predis-predis): New variable.

Change-Id: I34fa3edc7978bc5108ef8d71fb0d75ebeb290ffa
---
 gnu/packages/php-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index fa0184075b..fcd980ea68 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -822,3 +822,37 @@  (define-public php-phpunit-php-token-stream
 extension.")
     (license license:bsd-3)))
 
+(define-public php-predis-predis
+  (package
+    (name "php-predis-predis")
+    (version "2.2.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/predis/predis")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1y0cn6mmqkdh56jlhqx8fjmkr8nipw20rnwgpc9y9qgk0l0mv4c8"))))
+    (build-system composer-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'pre-check
+            (lambda _
+              ;; Launch the redis server.
+              (invoke "redis-server" "--daemonize" "yes")
+              ;; Fix the sole failing test.
+              (substitute* "tests/Predis/Command/Redis/ACL_Test.php"
+                (("User Test has no permissions to run the 'get' command")
+                 "This user has no permissions to run the 'get' command")))))))
+    (native-inputs
+     (list redis php-phpunit-phpunit))
+    (synopsis "Redis client for PHP")
+    (description "This package provides a flexible and feature-complete Redis
+client for PHP.")
+    (home-page "https://github.com/predis/predis")
+    (license license:expat)))
+