diff mbox series

[bug#67902,v3,67/96] gnu: Add php-symfony-finder.

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

Commit Message

Nicolas Graves Oct. 7, 2024, midnight 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 8e1269b65b..feabf09106 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -1750,3 +1750,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)))
+