From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aLE2KPqrgWXSrgAAkFu2QA (envelope-from ) for ; Tue, 19 Dec 2023 15:43:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id EHSzIvqrgWUNcAAAqHPOHw (envelope-from ) for ; Tue, 19 Dec 2023 15:43:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702996986; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=+4FOcs/rQz7NIsYSQuruxq0T5ymdXvqNEvP0bYq+xPU=; b=X2zDSPzQgAIJqc09HMKHZyqKE6yzbfedDSXJLMDOtCsIZSrfzqsM/ALIJq4SEPH0kqQK4f E6fd0y9q5QkvlsbFi9QZKU8/HJmYOw8HT9RUtJUC0E5IoaeiGEcCx0GXC2Y39kJB+xys2d Jqob/rwdRb8XQCnhdWFvwpdyDjTy8bxDru5Ittiht89OThpmAhgbPuFp6BXbc7T415RmIN llLQTgfFGnKGOPj/oErvzrnzgmF1hHJOKIGhdeyt1EFAWuOVBjPbLlfQQBqpJsm7D6ISWQ Y9GpX7v5fKHFfrr4eulSMBP5dbkyR22lTCuTN9LVOcWBPPw4LZ3iZkGV/30Xqw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702996986; a=rsa-sha256; cv=none; b=N5kpFQpTqArqpzcj8CfopYPA4wAoHwcGfOaHYWTlwInaOJqBOtU4ao5b/tX6vuYP3CrF/8 rlTQ+5Hl8MKTXI6TS6sovAlNnZOp1PZN1glN95BGUBNCtz7J6hRMKprKoJ+cD3UhC9uJXe fAGU5pR8a4YIxaB75YpnLdLzpnpBoVjCMy45euASvo75LiTrDMQ11UKOrzqMHv9C5PNQPH 57Mw2E2j6KlbrOB8AaOku+0WHMS2+S6XSKun8VzDZAEMG6w4ICf2UTaNwDl9lk3vdGcjTj wLUOI2fVxLgXEFCU+KGL5wmjZowwK6GK8xnxzAtK84cXHUGPcelfJvsQcXZxqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3813241812 for ; Tue, 19 Dec 2023 15:43:06 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFapv-00082G-8V; Tue, 19 Dec 2023 09:12:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFapU-0006kT-0M for guix-patches@gnu.org; Tue, 19 Dec 2023 09:12:17 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rFapS-0005ym-Io for guix-patches@gnu.org; Tue, 19 Dec 2023 09:12:15 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rFapV-0004ed-4Z for guix-patches@gnu.org; Tue, 19 Dec 2023 09:12:17 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67902] [PATCH 72/95] gnu: Add php-symfony-phpunit-bridge. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Dec 2023 14:12:17 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67902 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67902@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 67902-submit@debbugs.gnu.org id=B67902.170299510017531 (code B ref 67902); Tue, 19 Dec 2023 14:12:17 +0000 Received: (at 67902) by debbugs.gnu.org; 19 Dec 2023 14:11:40 +0000 Received: from localhost ([127.0.0.1]:34989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFaot-0004Yb-IN for submit@debbugs.gnu.org; Tue, 19 Dec 2023 09:11:40 -0500 Received: from 7.mo560.mail-out.ovh.net ([188.165.48.182]:53027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFaoK-0004Ob-TL for 67902@debbugs.gnu.org; Tue, 19 Dec 2023 09:11:06 -0500 Received: from director11.ghost.mail-out.ovh.net (unknown [10.109.148.29]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id B03E72C42B for <67902@debbugs.gnu.org>; Tue, 19 Dec 2023 14:11:00 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-tg7p4 (unknown [10.110.96.188]) by director11.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 8112F1FE71; Tue, 19 Dec 2023 14:11:00 +0000 (UTC) Received: from ngraves.fr ([37.59.142.103]) by ghost-submission-6684bf9d7b-tg7p4 with ESMTPSA id hm7/G3SkgWU81wAAViGw6g (envelope-from ); Tue, 19 Dec 2023 14:11:00 +0000 X-OVh-ClientIp: 81.67.140.142 Date: Tue, 19 Dec 2023 14:57:53 +0100 Message-ID: <20231219140934.22783-72-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231219140934.22783-1-ngraves@ngraves.fr> References: <20231219140934.22783-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 11850096520488542946 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddgieduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepheekudejgfdtudeihffgiedvjeekffethfeiieevudegffejjefggfekffeiteeinecuffhomhgrihhnpehshihmfhhonhihrdgtohhmpdhgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtfeenucevlhhushhtvghrufhiiigvpeegnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieejledtvdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeitddpmhhouggvpehsmhhtphhouhht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.19 X-Spam-Score: -6.19 X-Migadu-Queue-Id: 3813241812 X-Migadu-Scanner: mx11.migadu.com X-TUID: S3dg0yJ7Ct0K * gnu/packages/php-xyz.scm (php-symfony-phpunit-bridge): New variable. * gnu/packages/patches/php-symfony-phpunit-bridge-getVendors-fix.patch: New file. Change-Id: Ie72bd332a6fb7aaf96a59ce24e6008e6aa599f59 --- ...ymfony-phpunit-bridge-getVendors-fix.patch | 46 +++++++++++ gnu/packages/php-xyz.scm | 77 +++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 gnu/packages/patches/php-symfony-phpunit-bridge-getVendors-fix.patch diff --git a/gnu/packages/patches/php-symfony-phpunit-bridge-getVendors-fix.patch b/gnu/packages/patches/php-symfony-phpunit-bridge-getVendors-fix.patch new file mode 100644 index 0000000000..fd48e2ce6c --- /dev/null +++ b/gnu/packages/patches/php-symfony-phpunit-bridge-getVendors-fix.patch @@ -0,0 +1,46 @@ +From 4b7c29c3e98aa55ea7567a3d496595e539f30cdb Mon Sep 17 00:00:00 2001 +From: Nicolas Graves +Date: Sun, 22 Oct 2023 16:31:40 +0200 +Subject: [PATCH] Deprecation.php: Do not check for composer in getVendors. + +--- + DeprecationErrorHandler/Deprecation.php | 23 ++--------------------- + 1 file changed, 2 insertions(+), 21 deletions(-) + +diff --git a/DeprecationErrorHandler/Deprecation.php b/DeprecationErrorHandler/Deprecation.php +index 79cfa0c..b7074f7 100644 +--- a/DeprecationErrorHandler/Deprecation.php ++++ b/DeprecationErrorHandler/Deprecation.php +@@ -365,27 +365,8 @@ class Deprecation + if (class_exists(DebugClassLoader::class, false)) { + self::$vendors[] = \dirname((new \ReflectionClass(DebugClassLoader::class))->getFileName()); + } +- foreach (get_declared_classes() as $class) { +- if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) { +- $r = new \ReflectionClass($class); +- $v = \dirname($r->getFileName(), 2); +- if (file_exists($v.'/composer/installed.json')) { +- self::$vendors[] = $v; +- $loader = require $v.'/autoload.php'; +- $paths = self::addSourcePathsFromPrefixes( +- array_merge($loader->getPrefixes(), $loader->getPrefixesPsr4()), +- $paths +- ); +- } +- } +- } +- foreach ($paths as $path) { +- foreach (self::$vendors as $vendor) { +- if (0 !== strpos($path, $vendor)) { +- self::$internalPaths[] = $path; +- } +- } +- } ++ self::$vendors[] = $v; ++ self::$internalPaths[] = $paths; + } + + return self::$vendors; +-- +2.41.0 + diff --git a/gnu/packages/php-xyz.scm b/gnu/packages/php-xyz.scm index 6cd3295b85..d6a49d1f75 100644 --- a/gnu/packages/php-xyz.scm +++ b/gnu/packages/php-xyz.scm @@ -1954,3 +1954,80 @@ (define-public php-symfony-mime (home-page "https://symfony.com") (license license:expat))) +(define-public php-symfony-phpunit-bridge + (package + (name "php-symfony-phpunit-bridge") + (version "6.3.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/symfony/phpunit-bridge") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1v5zdjb0d7282wq0ghwzn9x005wqlzjmx2msi9vhp1c4l513fxgf")) + (patches + (search-patches "php-symfony-phpunit-bridge-getVendors-fix.patch")))) + (build-system composer-build-system) + (arguments + (list + #:test-flags ; Some tests are useless but get reported as risky. + ''("--bootstrap" "vendor/autoload.php" "--dont-report-useless-tests") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'deactivate-bootstrap.php + (lambda _ + (substitute* "composer.json" + ((".*\"files\".*") + "")))) + (add-before 'check 'pre-check + (lambda* (#:key inputs #:allow-other-keys) + ;; Adapt some PHP test code to Guix context. + (mkdir-p + (string-append (getcwd) "/vendor/myfakevendor/myfakepackage1")) + (substitute* "Tests/DeprecationErrorHandler/DeprecationTest.php" + (("(.*)self::\\$vendorDir = \\$vendorDir;" all blank) + (string-append + blank "$vendorDir = '" (getcwd) "/vendor/';\n" + all))) + (substitute* "DeprecationErrorHandler/Deprecation.php" + (("(self::\\$vendors\\[\\] = )\\$v;" all eq) + (string-append eq "'" (getcwd) "/vendor';")) + (("(self::\\$internalPaths)\\[\\] = \\$paths;" all def) + (string-append + def " = [" + "'" (getcwd) "/Tests/DeprecationErrorHandler/Deprecation.php'," + "'" (getcwd) "/Tests/DeprecationErrorHandler/DeprecationTest.php'," + "'" (getcwd) "/Tests/DeprecationErrorHandler.php'," + "];"))) + ;; Remove failing tests. All but two are probably failing + ;; because of some version mismatch of php-symfony-error-handler. + (for-each + (lambda (f) + (delete-file + (string-append "Tests/DeprecationErrorHandler/" f))) + '("partially_quiet.phpt" + "partially_quiet2.phpt" + "trigger_deprecation_types.phpt" + "trigger_error_types.phpt" + "weak_vendors_on_vendor.phpt")) + (delete-file "Tests/CoverageListenerTest.php") + ;; For most simple cases, handle php-symfony-error-handler + ;; discrepancies. + (substitute* (find-files "Tests" "\\.phpt") + (("Remaining indirect deprecation notices") + "Other deprecation notices") + (("Remaining direct deprecation notices") + "Other deprecation notices"))))))) + (native-inputs + (list php-phpunit-phpunit + php-symfony-deprecation-contracts + php-symfony-error-handler)) + (synopsis "Utilities for PHPUnit") + (description + "This package provides utilities for PHPUnit, especially user deprecation +notices management.") + (home-page "https://symfony.com") + (license license:expat))) + -- 2.41.0