File: 0006-Declare-current-DBAL-version.patch

package info (click to toggle)
php-nesbot-carbon 2.73.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,884 kB
  • sloc: php: 158,586; xml: 99; makefile: 33; sh: 14
file content (34 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sun, 26 Jan 2025 11:22:23 +0100
Subject: Declare current DBAL version

Hardcoding the version currently available in Debian instead of relying
on composer that is not used.

TODO: figure out a way to get the actually installed version, from apt
or dpkg?

Forwarded: not-needed
---
 tests/Doctrine/CarbonTypesTest.php | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tests/Doctrine/CarbonTypesTest.php b/tests/Doctrine/CarbonTypesTest.php
index ef75c2c..fd7e6ad 100644
--- a/tests/Doctrine/CarbonTypesTest.php
+++ b/tests/Doctrine/CarbonTypesTest.php
@@ -249,13 +249,7 @@ class CarbonTypesTest extends AbstractTestCase
 
     private static function getDbalVersion(): string
     {
-        static $dbalVersion = null;
-
-        if ($dbalVersion === null) {
-            $installed = require __DIR__.'/../../vendor/composer/installed.php';
-            $dbalVersion = $installed['versions']['doctrine/dbal']['version'] ?? '2.0.0';
-        }
-
+        static $dbalVersion = '4.2.2';
         return $dbalVersion;
     }