Subject: [PATCH v4 67/98] gnu: Add php-symfony-finder.

From: Nicolas Graves <[email-masked]>
Date: Mon, 7 Oct 2024 23:44:35 +0200

* 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 --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)))
+
-- 
2.46.0