diff mbox series

[bug#67902,v3,50/96] gnu: Add php-sebastian-object-reflector.

Message ID 20241007000046.25625-50-ngraves@ngraves.fr
State New
Headers show
Series [bug#67902,v3,01/96] gnu: Add abnfgen. | expand

Commit Message

Nicolas Graves Oct. 6, 2024, 11:59 p.m. UTC
* gnu/packages/php-xyz.scm (php-sebastian-object-reflector): New variable.

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

Patch

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index 3974795d1f..8c71c87333 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -1234,3 +1234,40 @@  (define-public php-sebastian-object-enumerator
     (home-page "https://github.com/sebastianbergmann/object-enumerator/")
     (license license:bsd-3)))
 
+(define-public php-sebastian-object-reflector
+  (package
+    (name "php-sebastian-object-reflector")
+    (version "2.0.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/sebastianbergmann/object-reflector")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1jrdfxr94c43za4z7dp0hql6q06zpgzljwv7514lwn7qs51lnn9h"))))
+    (build-system composer-build-system)
+    (arguments
+     (list
+      #:test-flags ''("--exclude" "skipTest")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'fix-tests
+            (lambda _
+              ;; Deactivate risky/deprecated tests.
+              (substitute* "tests/ObjectReflectorTest.php"
+                (("(.*)public function testReflectsAttribute" all blank)
+                 (string-append
+                  blank "/**\n"
+                  blank " * @group skipTest\n"
+                  blank " */\n"
+                  all))))))))
+    (native-inputs
+     (list php-phpunit-phpunit))
+    (synopsis "PHP reflexion library")
+    (description "This package allows reflection of object attributes,
+including inherited and non-public ones.")
+    (home-page "https://github.com/sebastianbergmann/object-reflector/")
+    (license license:bsd-3)))
+