Subject: [bug#67902] [PATCH v4 60/98] gnu: Add php-symfony-dependency-injection.

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

* gnu/packages/php-xyz.scm (php-symfony-dependency-injection): New variable.

Change-Id: Ia24e5ef934127bdbc678b59eb6f1a49bf6b7cb95
---
 gnu/packages/php-xyz.scm | 61 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm
index a8d446d50c..7db3635b53 100644
--- a/gnu/packages/php-xyz.scm
+++ b/gnu/packages/php-xyz.scm
@@ -1536,3 +1536,64 @@ (define-public php-symfony-console
     (home-page "https://symfony.com")
     (license license:expat)))
 
+(define-public php-symfony-dependency-injection
+  (package
+    (name "php-symfony-dependency-injection")
+    (version "6.3.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/symfony/dependency-injection")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1ns3l4qmghpcfzm58vjajpyagavkqyrdqqd0pxdn7r4dh5h6m0wf"))))
+    (build-system composer-build-system)
+    (arguments
+     (list
+      #:test-flags ''("--exclude" "skipTest" "--dont-report-useless-tests")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'fix-tests
+            (lambda _
+              ;; Deactivate failing tests.
+              (substitute* "Tests/Dumper/PhpDumperTest.php"
+                (("(.*)public function testDumpAsFiles.*" all blank)
+                 (string-append
+                  blank "/**\n"
+                  blank " * @group skipTest\n"
+                  blank " */\n"
+                  all))
+                (("(.*)public function testDeprecatedParametersAsFiles\\(\\)" all blank)
+                 (string-append
+                  blank "/**\n"
+                  blank " * @group skipTest\n"
+                  blank " */\n"
+                  all))
+                (("(.*)public function testNonSharedLazyAsFiles\\(\\)" all blank)
+                 (string-append
+                  blank "/**\n"
+                  blank " * @group skipTest\n"
+                  blank " */\n"
+                  all))))))))
+    (inputs
+     (list php-psr-container
+           php-symfony-deprecation-contracts
+           php-symfony-service-contracts
+           php-symfony-var-exporter))
+    (native-inputs
+     (list php-phpunit-phpunit
+           (package/inherit php-symfony-config
+             (arguments '(#:tests? #f))
+             (native-inputs '()))
+           php-symfony-expression-language
+           php-symfony-phpunit-bridge
+           php-symfony-yaml))
+    (synopsis "Construct objects in PHP")
+    (description
+     "This package provides utilities to standardize and centralize the way
+objects are constructed in your PHP application.")
+    (home-page "https://symfony.com")
+    (license license:expat)))
+
-- 
2.46.0