瀏覽代碼

Update dibi (#1330)

CauseFX 6 年之前
父節點
當前提交
aac7455d98

+ 1 - 1
api/composer.json

@@ -1,6 +1,6 @@
 {
   "require": {
-    "dibi/dibi": "^3.1",
+    "dibi/dibi": "^3.2",
     "lcobucci/jwt": "^3.2",
     "composer/semver": "^1.4",
     "phpmailer/phpmailer": "^6.0",

+ 6 - 6
api/composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "1473a4b919301bb2dba1f39810e12418",
+    "content-hash": "b895341ab62fbe32e131b91bf9ca2e04",
     "packages": [
         {
             "name": "adldap2/adldap2",
@@ -129,16 +129,16 @@
         },
         {
             "name": "dibi/dibi",
-            "version": "v3.2.3",
+            "version": "v3.2.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/dg/dibi.git",
-                "reference": "906e1f240742124e49562cace271916e1b08c991"
+                "reference": "d571460a6f8fa1334a04f7aaa1551bb0f12c2266"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/dg/dibi/zipball/906e1f240742124e49562cace271916e1b08c991",
-                "reference": "906e1f240742124e49562cace271916e1b08c991",
+                "url": "https://api.github.com/repos/dg/dibi/zipball/d571460a6f8fa1334a04f7aaa1551bb0f12c2266",
+                "reference": "d571460a6f8fa1334a04f7aaa1551bb0f12c2266",
                 "shasum": ""
             },
             "require": {
@@ -192,7 +192,7 @@
                 "sqlite",
                 "sqlsrv"
             ],
-            "time": "2018-09-17T11:47:10+00:00"
+            "time": "2020-03-26T03:05:01+00:00"
         },
         {
             "name": "guzzlehttp/guzzle",

+ 1 - 0
api/vendor/composer/autoload_classmap.php

@@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir);
 
 return array(
     'Dibi\\Bridges\\Nette\\DibiExtension22' => $vendorDir . '/dibi/dibi/src/Dibi/Bridges/Nette/DibiExtension22.php',
+    'Dibi\\Bridges\\Tracy\\Panel' => $vendorDir . '/dibi/dibi/src/Dibi/Bridges/Tracy/Panel.php',
     'Dibi\\Connection' => $vendorDir . '/dibi/dibi/src/Dibi/Connection.php',
     'Dibi\\ConstraintViolationException' => $vendorDir . '/dibi/dibi/src/Dibi/exceptions.php',
     'Dibi\\DataSource' => $vendorDir . '/dibi/dibi/src/Dibi/DataSource.php',

+ 1 - 0
api/vendor/composer/autoload_static.php

@@ -191,6 +191,7 @@ class ComposerStaticInitcbdc783d76f8e7563dcce7d8af053ecb
 
     public static $classMap = array (
         'Dibi\\Bridges\\Nette\\DibiExtension22' => __DIR__ . '/..' . '/dibi/dibi/src/Dibi/Bridges/Nette/DibiExtension22.php',
+        'Dibi\\Bridges\\Tracy\\Panel' => __DIR__ . '/..' . '/dibi/dibi/src/Dibi/Bridges/Tracy/Panel.php',
         'Dibi\\Connection' => __DIR__ . '/..' . '/dibi/dibi/src/Dibi/Connection.php',
         'Dibi\\ConstraintViolationException' => __DIR__ . '/..' . '/dibi/dibi/src/Dibi/exceptions.php',
         'Dibi\\DataSource' => __DIR__ . '/..' . '/dibi/dibi/src/Dibi/DataSource.php',

+ 6 - 6
api/vendor/composer/installed.json

@@ -126,17 +126,17 @@
     },
     {
         "name": "dibi/dibi",
-        "version": "v3.2.3",
-        "version_normalized": "3.2.3.0",
+        "version": "v3.2.4",
+        "version_normalized": "3.2.4.0",
         "source": {
             "type": "git",
             "url": "https://github.com/dg/dibi.git",
-            "reference": "906e1f240742124e49562cace271916e1b08c991"
+            "reference": "d571460a6f8fa1334a04f7aaa1551bb0f12c2266"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/dg/dibi/zipball/906e1f240742124e49562cace271916e1b08c991",
-            "reference": "906e1f240742124e49562cace271916e1b08c991",
+            "url": "https://api.github.com/repos/dg/dibi/zipball/d571460a6f8fa1334a04f7aaa1551bb0f12c2266",
+            "reference": "d571460a6f8fa1334a04f7aaa1551bb0f12c2266",
             "shasum": ""
         },
         "require": {
@@ -149,7 +149,7 @@
             "nette/tester": "~1.7",
             "tracy/tracy": "~2.2"
         },
-        "time": "2018-09-17T11:47:10+00:00",
+        "time": "2020-03-26T03:05:01+00:00",
         "type": "library",
         "extra": {
             "branch-alias": {

+ 2 - 1
api/vendor/dibi/dibi/src/Dibi/Drivers/Sqlite3Driver.php

@@ -445,11 +445,12 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
 		$columns = [];
 		static $types = [SQLITE3_INTEGER => 'int', SQLITE3_FLOAT => 'float', SQLITE3_TEXT => 'text', SQLITE3_BLOB => 'blob', SQLITE3_NULL => 'null'];
 		for ($i = 0; $i < $count; $i++) {
+			$type = $this->resultSet->columnType($i); // buggy in PHP 7.4.4 & 7.3.16, bug 79414
 			$columns[] = [
 				'name' => $this->resultSet->columnName($i),
 				'table' => null,
 				'fullname' => $this->resultSet->columnName($i),
-				'nativetype' => $types[$this->resultSet->columnType($i)],
+				'nativetype' => $type ? $types[$type] : null,
 			];
 		}
 		return $columns;

+ 7 - 1
api/vendor/dibi/dibi/src/Dibi/Result.php

@@ -498,8 +498,11 @@ class Result implements IDataSource
 			} elseif ($type === Type::FLOAT) {
 				$value = ltrim((string) $value, '0');
 				$p = strpos($value, '.');
-				if ($p !== false) {
+				$e = strpos($value, 'e');
+				if ($p !== false && $e === false) {
 					$value = rtrim(rtrim($value, '0'), '.');
+				} elseif ($p !== false && $e !== false) {
+					$value = rtrim($value, '.');
 				}
 				if ($value === '' || $value[0] === '.') {
 					$value = '0' . $value;
@@ -526,6 +529,9 @@ class Result implements IDataSource
 
 			} elseif ($type === Type::BINARY) {
 				$row[$key] = $this->getResultDriver()->unescapeBinary($value);
+
+			} else {
+				$row[$key] = $value;
 			}
 		}
 	}

+ 2 - 2
api/vendor/dibi/dibi/src/Dibi/dibi.php

@@ -21,8 +21,8 @@ class dibi
 
 	/** version */
 	const
-		VERSION = '3.2.3',
-		REVISION = 'released on 2018-09-17';
+		VERSION = '3.2.4',
+		REVISION = 'released on 2020-03-26';
 
 	/** sorting order */
 	const