Compare commits

..

No commits in common. "8e7972d933cae95c7f66f44d71259b8c74871ca7" and "e0955a203412cdac4c6db9b4d84c415fea972090" have entirely different histories.

7 changed files with 439 additions and 430 deletions

0
.gitignore vendored Executable file → Normal file
View File

18
composer.json Executable file → Normal file
View File

@ -1,7 +1,6 @@
{
"name": "mirzaev/arangodb",
"description": "Simple PHP-framework for ArangoDB",
"readme": "README.md",
"description": "Реализация управления хранилищем данных ArangoDB",
"keywords": [
"ArangoDB"
],
@ -16,20 +15,9 @@
"role": "Developer"
}
],
"support": {
"email": "arsen@mirzaev.sexy",
"wiki": "https://git.mirzaev.sexy/mirzaev/arangodb/manual",
"issues": "https://git.mirzaev.sexy/mirzaev/arangodb/issues"
},
"funding": [
{
"type": "funding",
"url": "https://fund.mirzaev.sexy"
}
],
"require": {
"php": "^8.1",
"triagens/arangodb": "~3.8"
"php": "^8.0.0",
"triagens/arangodb": "~3.2"
},
"require-dev": {
"phpunit/phpunit": "^9.3.3"

321
composer.lock generated Executable file → Normal file
View File

@ -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": "7b95a12116785aae67b9e7288f370919",
"content-hash": "eaaa55fa55b698e039ebfa7fe8f51cf0",
"packages": [
{
"name": "triagens/arangodb",
@ -71,30 +71,29 @@
"packages-dev": [
{
"name": "doctrine/instantiator",
"version": "1.4.1",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9",
"doctrine/coding-standard": "^8.0",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"autoload": {
@ -121,7 +120,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.1"
"source": "https://github.com/doctrine/instantiator/tree/1.4.0"
},
"funding": [
{
@ -137,42 +136,41 @@
"type": "tidelift"
}
],
"time": "2022-03-03T08:28:38+00:00"
"time": "2020-11-10T18:47:58+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.11.0",
"version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
"reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
"replace": {
"myclabs/deep-copy": "self.version"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
"type": "library",
"autoload": {
"files": [
"src/DeepCopy/deep_copy.php"
],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -188,7 +186,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
},
"funding": [
{
@ -196,20 +194,20 @@
"type": "tidelift"
}
],
"time": "2022-03-03T13:19:32+00:00"
"time": "2020-11-13T09:40:50+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.14.0",
"version": "v4.12.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1"
"reference": "6608f01670c3cc5079e18c1dab1104e002579143"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1",
"reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143",
"reference": "6608f01670c3cc5079e18c1dab1104e002579143",
"shasum": ""
},
"require": {
@ -250,9 +248,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0"
},
"time": "2022-05-31T20:59:12+00:00"
"time": "2021-07-21T10:44:31+00:00"
},
{
"name": "phar-io/manifest",
@ -316,16 +314,16 @@
},
{
"name": "phar-io/version",
"version": "3.2.1",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
"reference": "bae7c545bef187884426f042434e561ab1ddb182"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182",
"reference": "bae7c545bef187884426f042434e561ab1ddb182",
"shasum": ""
},
"require": {
@ -361,9 +359,9 @@
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.2.1"
"source": "https://github.com/phar-io/version/tree/3.1.0"
},
"time": "2022-02-21T01:04:05+00:00"
"time": "2021-02-23T14:00:09+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@ -420,16 +418,16 @@
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.3.0",
"version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
"reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"shasum": ""
},
"require": {
@ -440,8 +438,7 @@
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2",
"psalm/phar": "^4.8"
"mockery/mockery": "~1.3.2"
},
"type": "library",
"extra": {
@ -471,22 +468,22 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
},
"time": "2021-10-19T17:43:47+00:00"
"time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.6.1",
"version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "77a32518733312af16a44300404e945338981de3"
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
"reference": "77a32518733312af16a44300404e945338981de3",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f",
"reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f",
"shasum": ""
},
"require": {
@ -521,22 +518,22 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0"
},
"time": "2022-03-15T21:29:03+00:00"
"time": "2021-09-17T15:28:14+00:00"
},
{
"name": "phpspec/prophecy",
"version": "v1.15.0",
"version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
"reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"shasum": ""
},
"require": {
@ -588,29 +585,29 @@
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
"source": "https://github.com/phpspec/prophecy/tree/1.14.0"
},
"time": "2021-12-08T12:19:24+00:00"
"time": "2021-09-10T09:02:12+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.15",
"version": "9.2.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
"reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218",
"reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.13.0",
"nikic/php-parser": "^4.12.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@ -659,7 +656,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7"
},
"funding": [
{
@ -667,20 +664,20 @@
"type": "github"
}
],
"time": "2022-03-07T09:28:20+00:00"
"time": "2021-09-17T05:39:03+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "3.0.6",
"version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
"reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
"reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"shasum": ""
},
"require": {
@ -719,7 +716,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5"
},
"funding": [
{
@ -727,7 +724,7 @@
"type": "github"
}
],
"time": "2021-12-02T12:48:52+00:00"
"time": "2020-09-28T05:57:25+00:00"
},
{
"name": "phpunit/php-invoker",
@ -912,16 +909,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.21",
"version": "9.5.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1"
"reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1",
"reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b",
"reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b",
"shasum": ""
},
"require": {
@ -937,7 +934,7 @@
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
"phpunit/php-code-coverage": "^9.2.13",
"phpunit/php-code-coverage": "^9.2.3",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@ -951,10 +948,11 @@
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^3.0",
"sebastian/type": "^2.3.4",
"sebastian/version": "^3.0.2"
},
"require-dev": {
"ext-pdo": "*",
"phpspec/prophecy-phpunit": "^2.0.1"
},
"suggest": {
@ -971,11 +969,11 @@
}
},
"autoload": {
"files": [
"src/Framework/Assert/Functions.php"
],
"classmap": [
"src/"
],
"files": [
"src/Framework/Assert/Functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@ -998,11 +996,11 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9"
},
"funding": [
{
"url": "https://phpunit.de/sponsors.html",
"url": "https://phpunit.de/donate.html",
"type": "custom"
},
{
@ -1010,7 +1008,7 @@
"type": "github"
}
],
"time": "2022-06-19T12:14:25+00:00"
"time": "2021-08-31T06:47:40+00:00"
},
{
"name": "sebastian/cli-parser",
@ -1378,16 +1376,16 @@
},
{
"name": "sebastian/environment",
"version": "5.1.4",
"version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"shasum": ""
},
"require": {
@ -1429,7 +1427,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
},
"funding": [
{
@ -1437,20 +1435,20 @@
"type": "github"
}
],
"time": "2022-04-03T09:37:03+00:00"
"time": "2020-09-28T05:52:38+00:00"
},
{
"name": "sebastian/exporter",
"version": "4.0.4",
"version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"shasum": ""
},
"require": {
@ -1499,14 +1497,14 @@
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "https://www.github.com/sebastianbergmann/exporter",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
},
"funding": [
{
@ -1514,20 +1512,20 @@
"type": "github"
}
],
"time": "2021-11-11T14:18:36+00:00"
"time": "2020-09-28T05:24:23+00:00"
},
{
"name": "sebastian/global-state",
"version": "5.0.5",
"version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
"reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49",
"reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49",
"shasum": ""
},
"require": {
@ -1570,7 +1568,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3"
},
"funding": [
{
@ -1578,7 +1576,7 @@
"type": "github"
}
],
"time": "2022-02-14T08:28:10+00:00"
"time": "2021-06-11T13:31:12+00:00"
},
{
"name": "sebastian/lines-of-code",
@ -1869,28 +1867,28 @@
},
{
"name": "sebastian/type",
"version": "3.0.0",
"version": "2.3.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad"
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
"reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-master": "2.3-dev"
}
},
"autoload": {
@ -1913,7 +1911,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/3.0.0"
"source": "https://github.com/sebastianbergmann/type/tree/2.3.4"
},
"funding": [
{
@ -1921,7 +1919,7 @@
"type": "github"
}
],
"time": "2022-03-15T09:54:48+00:00"
"time": "2021-06-15T12:49:02+00:00"
},
{
"name": "sebastian/version",
@ -1976,6 +1974,85 @@
],
"time": "2020-09-28T06:39:44+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.23.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-02-19T12:13:01+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.1",
@ -2028,21 +2105,21 @@
},
{
"name": "webmozart/assert",
"version": "1.11.0",
"version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/webmozarts/assert.git",
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
"reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25",
"reference": "6964c76c7804814a842473e0c8fd15bab0f18e25",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"php": "^7.2 || ^8.0"
"php": "^7.2 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
@ -2080,9 +2157,9 @@
],
"support": {
"issues": "https://github.com/webmozarts/assert/issues",
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
"source": "https://github.com/webmozarts/assert/tree/1.10.0"
},
"time": "2022-06-03T18:03:27+00:00"
"time": "2021-03-09T10:59:23+00:00"
}
],
"aliases": [],
@ -2091,7 +2168,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^8.1"
"php": "^8.0.0"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"

83
mirzaev/arangodb/system/collection.php Executable file → Normal file
View File

@ -8,8 +8,6 @@ use mirzaev\arangodb\terminal;
use ArangoDBClient\Connection as _connection;
use ArangoDBClient\Collection as _collection;
use ArangoDBClient\Statement as _statement;
use ArangoDBClient\Document as _document;
use ArangoDBClient\CollectionHandler as _collection_handler;
/**
@ -23,96 +21,63 @@ class collection
/**
* Инициализация
*
* @param _connection $session Сессия соединения с базой данных
* @param _connection $connection Инстанция соединения
* @param string $name Название
* @param bool $edge Обрабатывать как ребро? (иначе: вершина)
* @param ?terminal $terminal Инстанция терминала
* @param bool $edge Это ребро? (иначе: вершина)
*
* @return string|null Идентификатор коллекции
* @return string|null Идентификатор
*/
public static function init(_connection $session, string $name, bool $edge = false, ?terminal $terminal = null): ?string
public static function init(_connection $connection, string $name, bool $edge = false): ?string
{
// Инициализация
$collections = new _collection_handler($session);
$collections = new _collection_handler($connection);
if (!$collections->has($name)) {
// Не найдана коллекция
// Коллекция не найдена
// Запись в вывод
if ($terminal instanceof terminal) $terminal::write("Коллекция \"$name\" не найдена");
terminal::write("Коллекция \"$name\" не найдена");
// Инициализация
$collection = new _collection();
// Настройка
$collection->setName($name);
$collection->setType($edge ? 'edge' : 'document');
// Запись коллекции на сервер и его ответ в буфер возврата
$id = $collections->create($name, ['type' => $edge ? _collection::TYPE_EDGE : _collection::TYPE_DOCUMENT]);
$id = $collections->create($name);
if ($collections->has($name)) {
// Коллекция найдена (записана)
// Запись в вывод
if ($terminal instanceof terminal) $terminal::write("Создана коллекция \"$name\" с типом " . ($edge ? 'ребро' : 'документ'));
terminal::write("Создана коллекция \"$name\"");
// Возврат идентификатора коллекции
return $id;
}
} else {
// Найдена коллекция
// Возврат идентификатора коллекции
return $name;
}
return null;
}
/**
* Поиск
*
* @param _connection $session Сессия соединения с базой данных
* @param string $query AQL-запрос
* @param _connection $connection Соединение
* @param string $collection Название
* @param array $condition Условия
*
* @return _document|array|string|int|null Инстанция документа
* @return array|null Коллекция, если найдена
*/
public static function search(_connection $session, string $query): _document|string|array|int|null
{
// Поиск журнала
$journal = (new _statement(
$session,
[
'query' => $query,
"batchSize" => 1000,
"sanitize" => true
]
))->execute();
// Инициализация буфера вывода
$buffer = [];
foreach ($journal as $key => $value) {
$buffer[$key] = $value;
}
return is_array($buffer) && count($buffer) > 1 ? $buffer : $buffer[0] ?? null;
}
/**
* Очистка
*
* @param _connection $session Сессия соединения с базой данных
* @param string $name Название
*
* @return bool Статус выполнения
*/
public static function truncate(_connection $session, string $name): bool
public static function search(_connection $connection, string $name, array $condition): ?array
{
// Инициализация
$collections = new _collection_handler($session);
$collections = new _collection_handler($connection);
if ($collections->has($name)) {
// Найдена коллекция
// Коллекция найдена
// Очистка
return $collections->truncate($name);
return $collections->byExample($name, $condition)->getAll();
}
return false;
}
}

21
mirzaev/arangodb/system/connection.php Executable file → Normal file
View File

@ -138,16 +138,15 @@ final class connection
match ($name) {
'adress', 'endpoint' => $this->adress = $value ?? throw new exception("Свойство \"$name\" не может быть пустым", 500),
'storage', 'database', 'db' => $this->storage = $value ?? throw new exception("Свойство \"$name\" не может быть пустым", 500),
'auth' => !$value ?: $this->auth = $value,
'name' => !$value ?: $this->name = $value,
'password' => !$value ?: $this->password = $value,
'connection' => !$value ?: $this->connection = $value,
'timeout_connect' => !$value ?: $this->timeout_connect = $value,
'timeout_request' => !$value ?: $this->timeout_request = $value,
'reconnect' => !$value ?: $this->reconnect = $value,
'create' => !$value ?: $this->create = $value,
'update', 'policy' => !$value ?: $this->update = $value,
'journal' => !$value ?: $this->journal = $value,
'auth' => $this->auth = $value,
'name' => $this->name = $value,
'password' => $this->password = $value,
'connection' => $this->connection = $value,
'timeout_connect' => $this->timeout_connect = $value,
'timeout_request' => $this->timeout_request = $value,
'reconnect' => $this->reconnect = $value,
'create' => $this->create = $value,
'update', 'policy' => $this->update = $value,
default => throw new exception("Свойство \"$name\" не найдено", 404)
};
}
@ -172,7 +171,6 @@ final class connection
'create' => $this->create,
'update', 'policy' => $this->update,
'session' => $this->session,
'journal' => $this->journal,
default => throw new exception("Свойство \"$name\" не найдено", 404)
};
}
@ -197,7 +195,6 @@ final class connection
'create' => isset($this->create),
'update', 'policy' => isset($this->update),
'session' => isset($this->session),
'journal' => isset($this->journal),
default => throw new exception("Свойство \"$name\" не найдено", 404)
};
}

56
mirzaev/arangodb/system/document.php Executable file → Normal file
View File

@ -9,7 +9,7 @@ use mirzaev\arangodb\terminal;
use ArangoDBClient\Connection as _connection;
use ArangoDBClient\Document as _document;
use ArangoDBClient\Edge as _edge;
use ArangoDBClient\DocumentHandler as _document_handler;
use ArangoDBClient\CollectionHandler as _collection_handler;
use ArangoDBClient\EdgeHandler as _edge_handler;
/**
@ -23,24 +23,22 @@ class document
/**
* Записать
*
* @param _connection $session Сессия соединения с базой данных
* @param _connection $connection Инстанция соединения
* @param string $collection Коллекция
* @param ?array $data Данные
* @param bool $check Проверка на запись в базу данных
* @param ?terminal $terminal Инстанция терминала
* @param array $data Данные
*
* @return string|null Идентификатор
*/
public static function write(_connection $session, string $collection, ?array $data = [], bool $check = false, ?terminal $terminal = null): ?string
public static function write(_connection $connection, string $collection, array $data): ?string
{
// Инициализация коллекции
collection::init($session, $collection, isset($data['_from'], $data['_to']));
collection::init($connection, $collection, isset($data['_from'], $data['_to']));
if (isset($data['_from'], $data['_to'])) {
// Ребро
// Инициализация обработчика рёбер
$documents = new _edge_handler($session);
$documents = new _edge_handler($connection);
// Инициализация ребра
$document = new _edge();
@ -55,54 +53,30 @@ class document
// Вершина
// Инициализация обработчика вершин
$documents = new _document_handler($session);
$documents = new _collection_handler($connection);
// Инициализация вершины
$document = new _document();
}
foreach (['created' => time()] + $data as $key => $value) {
// Настройка
foreach ($data as $key => $value) {
// Перебор параметров
// Запись в инстанцию документа
$document->set($key, $value);
}
// Запись на сервер и его ответ в буфер возврата
$id = isset($_from, $_to) ? $documents->saveEdge($collection, $_from, $_to, $document) : $documents->insert($collection, $document);
$id = isset($_from, $_to) ? $documents->saveEdge($collection, $_from, $_to, $document) : $documents->save($collection, $document);
if ($check && $documents->has($collection, $id)) {
// Найден записанный документ
if ($documents->has($collection, $id)) {
// Документ записан
// Запись в вывод
if ($terminal instanceof terminal) $terminal::write("В коллекции \"$collection\" создан документ \"$id\"");
} else if ($check) {
// Не найден записанный документ
terminal::write("В коллекции \"$collection\" создан документ \"$id\"");
// Запись в вывод
if ($terminal instanceof terminal) $terminal::write("В коллекции \"$collection\" не удалось найти созданный или создать документ");
return null;
// Возврат идентификатора коллекции
return $id;
}
// Возврат идентификатора коллекции
return $id;
}
/**
* Обновить
*
* @param _connection $session Сессия соединения с базой данных
* @param _document $document Инстанция документа вершины
*
* @return bool Статус обработки
*/
public static function update(_connection $session, _document $document): bool
{
// Инициализация обработчика вершин
$documents = new _document_handler($session);
// Запись в базу данных
return $documents->update($document);
}
}

10
mirzaev/arangodb/system/terminal.php Executable file → Normal file
View File

@ -18,6 +18,14 @@ class terminal
*/
public static function write(string $text): void
{
echo sprintf("[%s] $text\n", self::PREFIX);
echo self::generate_prefix() . ' ' . $text . PHP_EOL;
}
/**
* Генерация префикса
*/
public static function generate_prefix(): string
{
return '[' . self::PREFIX . ']';
}
}