diff mbox series

[bug#67902,66/95] gnu: Add php-symfony-finder.

Message ID 20231219140934.22783-66-ngraves@ngraves.fr
State New
Headers show
Series PHP package chain. | expand

Commit Message

Nicolas Graves Dec. 19, 2023, 1:57 p.m. UTC
* gnu/packages/php-xyz.scm (php-symfony-finder): New variable.

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

Patch

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index 9a273064b1..32e5b906b2 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -1758,3 +1758,44 @@  (define-public php-symfony-filesystem
     (home-page "https://symfony.com")
     (license license:expat)))
 
+(define-public php-symfony-finder
+  (package
+    (name "php-symfony-finder")
+    (version "6.3.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/symfony/finder")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "02fjcdlzpk40kqirv61n7hzyfc2b803r186l80s50vaavgj9iv9k"))))
+    (build-system composer-build-system)
+    (arguments
+     (list
+      #:test-flags ''("--exclude-group" "network,skipTest")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'fix-tests
+            (lambda _
+              ;; Ignore this sole failing test.
+              (substitute* "Tests/Iterator/SortableIteratorTest.php"
+                (("(.*)\\* @dataProvider getAcceptData" all blank)
+                 (string-append all "\n"
+                                blank "* @group skipTest")))
+              ;; Without process isolation, setUp will be executed everytime,
+              ;; not just for the first test.
+              (substitute* (list "Tests/Iterator/RealIteratorTestCase.php"
+                                 "Tests/Iterator/VcsIgnoredFilterIteratorTest.php")
+                (("static function setUpBeforeClass")
+                 "function setUp")))))))
+    (native-inputs
+     (list php-phpunit-phpunit php-symfony-filesystem))
+    (synopsis "Find files in PHP")
+    (description
+     "This package provides PHP utilities to find files and directories via an
+intuitive fluent interface.")
+    (home-page "https://symfony.com")
+    (license license:expat)))
+