Compare commits

...

11 Commits

7 changed files with 430 additions and 439 deletions

0
.gitignore vendored Normal file → Executable file
View File

18
composer.json Normal file → Executable file
View File

@ -1,6 +1,7 @@
{ {
"name": "mirzaev/arangodb", "name": "mirzaev/arangodb",
"description": "Реализация управления хранилищем данных ArangoDB", "description": "Simple PHP-framework for ArangoDB",
"readme": "README.md",
"keywords": [ "keywords": [
"ArangoDB" "ArangoDB"
], ],
@ -15,9 +16,20 @@
"role": "Developer" "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": { "require": {
"php": "^8.0.0", "php": "^8.1",
"triagens/arangodb": "~3.2" "triagens/arangodb": "~3.8"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.3.3" "phpunit/phpunit": "^9.3.3"

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

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

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

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

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

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

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

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

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