diff --git a/START b/START index a7c449e..48d2539 100644 --- a/START +++ b/START @@ -1 +1,2 @@ -sudo -u www-data php mirzaev/telegram/registry/people/system/public/robot.php +sudo -u www-data php mirzaev/google_sheets/parser/system/public/synchronization.php + diff --git a/composer.json b/composer.json index 909884f..9d8ba27 100644 --- a/composer.json +++ b/composer.json @@ -1,25 +1,28 @@ { - "name": "mirzaev/telegram-registry-people", - "type": "robot", - "require": { - "badfarm/zanzara": "^0.9.0" - }, - "license": "WTFPL", - "autoload": { - "psr-4": { - "mirzaev\\telegram\\registry\\people\\": "mirzaev/telegram/registry/people/system/" - } - }, - "authors": [ - { - "name": "Arsen Mirzaev Tatyano-Muradovich", - "email": "arsen@mirzaev.sexy" - } - ], - "minimum-stability": "stable", - "config": { - "allow-plugins": { - "php-http/discovery": true - } - } + "name": "mirzaev/google_sheets-parser", + "type": "robot", + "license": "WTFPL", + "autoload": { + "psr-4": { + "mirzaev\\google_sheets\\parser\\": "mirzaev/google_sheets/parser/system/" + } + }, + "authors": [ + { + "name": "Arsen Mirzaev Tatyano-Muradovich", + "email": "arsen@mirzaev.sexy" + } + ], + "minimum-stability": "stable", + "config": { + "allow-plugins": { + "php-http/discovery": true + } + }, + "require": { + "flow-php/etl-adapter-google-sheet": "1.x@dev", + "webmozart/assert": "^1.11", + "triagens/arangodb": "^3.8", + "mirzaev/arangodb": "^1.0.0" + } } diff --git a/composer.lock b/composer.lock index 28b821e..506fb74 100644 --- a/composer.lock +++ b/composer.lock @@ -4,217 +4,1335 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "39ea6b3ef133c181d1814ce561dd40ae", + "content-hash": "11076f3d90ec7beb78f179975cadfba0", "packages": [ { - "name": "badfarm/zanzara", - "version": "0.9.0", + "name": "firebase/php-jwt", + "version": "v6.5.0", "source": { "type": "git", - "url": "https://github.com/badfarm/zanzara.git", - "reference": "76edd38a2f161f105ddfaa00e02fd1e603b7882d" + "url": "https://github.com/firebase/php-jwt.git", + "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/badfarm/zanzara/zipball/76edd38a2f161f105ddfaa00e02fd1e603b7882d", - "reference": "76edd38a2f161f105ddfaa00e02fd1e603b7882d", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/e94e7353302b0c11ec3cfff7180cd0b1743975d2", + "reference": "e94e7353302b0c11ec3cfff7180cd0b1743975d2", "shasum": "" }, "require": { - "clue/http-proxy-react": "^1.8", - "ext-json": "*", - "ext-readline": "*", - "netresearch/jsonmapper": "^4.1", - "opis/closure": "^3.6", - "php": ">=7.4", - "php-di/php-di": "^6.4", - "php-http/multipart-stream-builder": "^1.2", - "psr/container": "^1.1", - "psr/log": "^1.1", - "react/cache": "^1.2", - "react/event-loop": "^1.3", - "react/http": "^1.8" + "php": "^7.4||^8.0" }, "require-dev": { - "monolog/monolog": "^2.9", - "phpunit/phpunit": "^9.6", - "symfony/dotenv": "^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Zanzara\\": "src/Zanzara" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michele Righetti" - }, - { - "name": "Mattia Corradi" - } - ], - "description": "Asynchronous PHP Telegram Bot Framework", - "keywords": [ - "async", - "bot", - "php", - "reactphp", - "telegram" - ], - "support": { - "issues": "https://github.com/badfarm/zanzara/issues", - "source": "https://github.com/badfarm/zanzara/tree/0.9.0" - }, - "time": "2023-04-16T14:11:23+00:00" - }, - { - "name": "clue/http-proxy-react", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/clue/reactphp-http-proxy.git", - "reference": "09366dd3e13b36b90f8e47a6acaf5a2c96b79fb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-http-proxy/zipball/09366dd3e13b36b90f8e47a6acaf5a2c96b79fb5", - "reference": "09366dd3e13b36b90f8e47a6acaf5a2c96b79fb5", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/promise": "^3 || ^2.1 || ^1.2.1", - "react/socket": "^1.12", - "ringcentral/psr7": "^1.2" - }, - "require-dev": { - "clue/block-react": "^1.5", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8", - "react/event-loop": "^1.2", - "react/http": "^1.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Clue\\React\\HttpProxy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering" - } - ], - "description": "Async HTTP proxy connector, tunnel any TCP/IP-based protocol through an HTTP CONNECT proxy server, built on top of ReactPHP", - "homepage": "https://github.com/clue/reactphp-http-proxy", - "keywords": [ - "async", - "connect", - "http", - "proxy", - "reactphp" - ], - "support": { - "issues": "https://github.com/clue/reactphp-http-proxy/issues", - "source": "https://github.com/clue/reactphp-http-proxy/tree/v1.8.0" - }, - "funding": [ - { - "url": "https://clue.engineering/support", - "type": "custom" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-09-01T14:36:49+00:00" - }, - { - "name": "evenement/evenement", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Evenement": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - } - ], - "description": "Événement is a very simple event dispatching library for PHP", - "keywords": [ - "event-dispatcher", - "event-emitter" - ], - "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/master" - }, - "time": "2017-07-23T21:35:13+00:00" - }, - { - "name": "fig/http-message-util", - "version": "1.1.5", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message-util.git", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/9d94dc0154230ac39e5bf89398b324a86f63f765", - "reference": "9d94dc0154230ac39e5bf89398b324a86f63f765", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" + "guzzlehttp/guzzle": "^6.5||^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^1.0||^2.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" }, "suggest": { - "psr/http-message": "The package containing the PSR-7 interfaces" + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.5.0" + }, + "time": "2023-05-12T15:47:07+00:00" + }, + { + "name": "flow-php/array-dot", + "version": "0.2.7", + "source": { + "type": "git", + "url": "https://github.com/flow-php/array-dot.git", + "reference": "e61f9e42874e001c9401582a58e78f561feba2f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/flow-php/array-dot/zipball/e61f9e42874e001c9401582a58e78f561feba2f1", + "reference": "e61f9e42874e001c9401582a58e78f561feba2f1", + "shasum": "" + }, + "require": { + "php": "~8.1 || ~8.2" + }, + "type": "library", + "autoload": { + "files": [ + "src/Flow/ArrayDot/array_dot.php" + ], + "psr-4": { + "Flow\\": [ + "src/Flow" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP ETL - Array Dot fuctions", + "keywords": [ + "array", + "dot", + "etl", + "extract", + "filter", + "load", + "transform" + ], + "support": { + "issues": "https://github.com/flow-php/array-dot/issues", + "source": "https://github.com/flow-php/array-dot/tree/0.2.7" + }, + "time": "2023-04-04T21:58:13+00:00" + }, + { + "name": "flow-php/etl", + "version": "0.2.7", + "source": { + "type": "git", + "url": "https://github.com/flow-php/etl.git", + "reference": "f4de987affddd5a49a2dd730947741fb56313158" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/flow-php/etl/zipball/f4de987affddd5a49a2dd730947741fb56313158", + "reference": "f4de987affddd5a49a2dd730947741fb56313158", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "flow-php/array-dot": "^0.2 || 1.x-dev", + "league/flysystem": "^3.0", + "php": "~8.1 || ~8.2", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "jawira/case-converter": "^3.4", + "laminas/laminas-hydrator": "^4.0", + "laravel/serializable-closure": "^1.1", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-azure-blob-storage": "^3.0", + "symfony/validator": "^5.3 || ^6.0" + }, + "suggest": { + "jawira/case-converter": "Provides CaseConverter that is required by the EntryNameCaseConverterTransformer", + "laminas/laminas-hydrator": "Help converting ObjectEntry into ArrayEntry that can be later unpack into standalone Entries", + "ocramius/generated-hydrator": "Provieds generated hydrator that implemenets Laminas\\Hydrator\\HydratorInterface" + }, + "type": "library", + "autoload": { + "files": [ + "src/Flow/ETL/DSL/functions.php" + ], + "psr-4": { + "Flow\\": [ + "src/Flow" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP ETL - Extract Transform Load - Abstraction", + "keywords": [ + "etl", + "extract", + "load", + "transform" + ], + "support": { + "issues": "https://github.com/flow-php/etl/issues", + "source": "https://github.com/flow-php/etl/tree/0.2.7" + }, + "time": "2023-04-05T21:17:54+00:00" + }, + { + "name": "flow-php/etl-adapter-google-sheet", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/flow-php/etl-adapter-google-sheet.git", + "reference": "75501e4359761fa7a8debe5430308af9c0d78473" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/flow-php/etl-adapter-google-sheet/zipball/75501e4359761fa7a8debe5430308af9c0d78473", + "reference": "75501e4359761fa7a8debe5430308af9c0d78473", + "shasum": "" + }, + "require": { + "flow-php/etl": "^0.2 || 1.x-dev", + "google/apiclient": "^2.13", + "php": "~8.1 || ~8.2" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Flow\\": [ + "src/Flow" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP ETL - Adapter - Google Sheet", + "keywords": [ + "adapter", + "etl", + "extract", + "google", + "load", + "sheet", + "transform" + ], + "support": { + "issues": "https://github.com/flow-php/etl-adapter-google-sheet/issues", + "source": "https://github.com/flow-php/etl-adapter-google-sheet/tree/1.x" + }, + "time": "2023-06-05T07:51:28+00:00" + }, + { + "name": "google/apiclient", + "version": "v2.15.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client.git", + "reference": "49787fa30b8d8313146a61efbf77ed1fede723c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/49787fa30b8d8313146a61efbf77ed1fede723c2", + "reference": "49787fa30b8d8313146a61efbf77ed1fede723c2", + "shasum": "" + }, + "require": { + "firebase/php-jwt": "~6.0", + "google/apiclient-services": "~0.200", + "google/auth": "^1.28", + "guzzlehttp/guzzle": "~6.5||~7.0", + "guzzlehttp/psr7": "^1.8.4||^2.2.1", + "monolog/monolog": "^2.9||^3.0", + "php": "^7.4|^8.0", + "phpseclib/phpseclib": "^3.0.2" + }, + "require-dev": { + "cache/filesystem-adapter": "^1.1", + "composer/composer": "^1.10.22", + "phpcompatibility/php-compatibility": "^9.2", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.0", + "symfony/css-selector": "~2.1", + "symfony/dom-crawler": "~2.1" + }, + "suggest": { + "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-main": "2.x-dev" + } + }, + "autoload": { + "files": [ + "src/aliases.php" + ], + "psr-4": { + "Google\\": "src/" + }, + "classmap": [ + "src/aliases.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Client library for Google APIs", + "homepage": "http://developers.google.com/api-client-library/php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/google-api-php-client/issues", + "source": "https://github.com/googleapis/google-api-php-client/tree/v2.15.0" + }, + "time": "2023-05-18T13:51:33+00:00" + }, + { + "name": "google/apiclient-services", + "version": "v0.303.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-api-php-client-services.git", + "reference": "b9c143453a94d5e6ed7257d065dcc5662619eaf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/b9c143453a94d5e6ed7257d065dcc5662619eaf4", + "reference": "b9c143453a94d5e6ed7257d065dcc5662619eaf4", + "shasum": "" + }, + "require": { + "php": "^7.4||^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7||^8.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "autoload.php" + ], + "psr-4": { + "Google\\Service\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Client library for Google APIs", + "homepage": "http://developers.google.com/api-client-library/php", + "keywords": [ + "google" + ], + "support": { + "issues": "https://github.com/googleapis/google-api-php-client-services/issues", + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.303.0" + }, + "time": "2023-06-04T01:12:12+00:00" + }, + { + "name": "google/auth", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/googleapis/google-auth-library-php.git", + "reference": "07f7f6305f1b7df32b2acf6e101c1225c839c7ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/07f7f6305f1b7df32b2acf6e101c1225c839c7ac", + "reference": "07f7f6305f1b7df32b2acf6e101c1225c839c7ac", + "shasum": "" + }, + "require": { + "firebase/php-jwt": "^6.0", + "guzzlehttp/guzzle": "^6.2.1|^7.0", + "guzzlehttp/psr7": "^2.4.5", + "php": "^7.4||^8.0", + "psr/cache": "^1.0||^2.0||^3.0", + "psr/http-message": "^1.1||^2.0" + }, + "require-dev": { + "guzzlehttp/promises": "^1.3", + "kelvinmo/simplejwt": "0.7.0", + "phpseclib/phpseclib": "^3.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.0.0", + "sebastian/comparator": ">=1.2.3", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2." + }, + "type": "library", + "autoload": { + "psr-4": { + "Google\\Auth\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "description": "Google Auth Library for PHP", + "homepage": "http://github.com/google/google-auth-library-php", + "keywords": [ + "Authentication", + "google", + "oauth2" + ], + "support": { + "docs": "https://googleapis.github.io/google-auth-library-php/main/", + "issues": "https://github.com/googleapis/google-auth-library-php/issues", + "source": "https://github.com/googleapis/google-auth-library-php/tree/v1.28.0" + }, + "time": "2023-05-11T21:58:18+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.7.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5.3 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "ext-curl": "*", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2023-05-21T14:04:53+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { "psr-4": { - "Fig\\Http\\Message\\": "src/" + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2023-05-21T13:50:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.5.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-04-17T16:11:26+00:00" + }, + { + "name": "league/flysystem", + "version": "3.15.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "a141d430414fcb8bf797a18716b09f759a385bed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a141d430414fcb8bf797a18716b09f759a385bed", + "reference": "a141d430414fcb8bf797a18716b09f759a385bed", + "shasum": "" + }, + "require": { + "league/flysystem-local": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" + }, + "require-dev": { + "async-aws/s3": "^1.5", + "async-aws/simple-s3": "^1.1", + "aws/aws-sdk-php": "^3.220.0", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^3.0.14", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "File storage abstraction for PHP", + "keywords": [ + "WebDAV", + "aws", + "cloud", + "file", + "files", + "filesystem", + "filesystems", + "ftp", + "s3", + "sftp", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/3.15.1" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2023-05-04T09:04:26+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.15.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/543f64c397fefdf9cfeac443ffb6beff602796b3", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem-local/issues", + "source": "https://github.com/thephpleague/flysystem-local/tree/3.15.0" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2023-05-02T20:02:14+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2022-04-17T13:12:02+00:00" + }, + { + "name": "mirzaev/arangodb", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://git.mirzaev.sexy/mirzaev/arangodb", + "reference": "e7da9978d01d3f8bdef6c74809dfb4eb8989f92c" + }, + "require": { + "php": "^8.1", + "triagens/arangodb": "~3.8" + }, + "require-dev": { + "phpunit/phpunit": "^9.3.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "mirzaev\\arangodb\\": "mirzaev/arangodb/system" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "WTFPL" + ], + "authors": [ + { + "name": "Arsen Mirzaev Tatyano-Muradovich", + "email": "arsen@mirzaev.sexy", + "homepage": "https://mirzaev.sexy", + "role": "Developer" + } + ], + "description": "Simple PHP-framework for ArangoDB", + "homepage": "https://git.hood.su/mirzaev/arangodb", + "keywords": [ + "ArangoDb" + ], + "support": { + "email": "arsen@mirzaev.sexy", + "issues": "https://git.mirzaev.sexy/mirzaev/arangodb/issues", + "wiki": "https://git.mirzaev.sexy/mirzaev/arangodb/manual" + }, + "funding": [ + { + "url": "https://fund.mirzaev.sexy", + "type": "funding" + } + ], + "time": "2022-11-06T00:03:56+00:00" + }, + { + "name": "monolog/monolog", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.5.26", + "predis/predis": "^1.1 || ^2", + "ruflin/elastica": "^7", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.3.1" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2023-02-06T13:46:10+00:00" + }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "58c3f47f650c94ec05a151692652a868995d2938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2022-06-14T06:56:20+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.19", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "cc181005cf548bfd8a4896383bb825d859259f95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cc181005cf548bfd8a4896383bb825d859259f95", + "reference": "cc181005cf548bfd8a4896383bb825d859259f95", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.19" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2023-03-05T17:13:09+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -227,581 +1345,44 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "description": "Common interface for caching libraries", "keywords": [ - "http", - "http-message", + "cache", "psr", - "psr-7", - "request", - "response" + "psr-6" ], "support": { - "issues": "https://github.com/php-fig/http-message-util/issues", - "source": "https://github.com/php-fig/http-message-util/tree/1.1.5" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2020-11-24T22:02:12+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { - "name": "laravel/serializable-closure", - "version": "v1.3.0", + "name": "psr/http-client", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", "shasum": "" }, "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "nesbot/carbon": "^2.61", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laravel\\SerializableClosure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Nuno Maduro", - "email": "nuno@laravel.com" - } - ], - "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", - "keywords": [ - "closure", - "laravel", - "serializable" - ], - "support": { - "issues": "https://github.com/laravel/serializable-closure/issues", - "source": "https://github.com/laravel/serializable-closure" - }, - "time": "2023-01-30T18:31:20+00:00" - }, - { - "name": "netresearch/jsonmapper", - "version": "v4.2.0", - "source": { - "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", - "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Map nested JSON structures onto PHP classes", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" - }, - "time": "2023-04-09T17:37:40+00:00" - }, - { - "name": "opis/closure", - "version": "3.6.3", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Opis\\Closure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.3" - }, - "time": "2022-01-27T09:35:39+00:00" - }, - { - "name": "php-di/invoker", - "version": "2.3.3", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/Invoker.git", - "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/cd6d9f267d1a3474bdddf1be1da079f01b942786", - "reference": "cd6d9f267d1a3474bdddf1be1da079f01b942786", - "shasum": "" - }, - "require": { - "php": ">=7.3", - "psr/container": "^1.0|^2.0" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "mnapoli/hard-mode": "~0.3.0", - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Invoker\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Generic and extensible callable invoker", - "homepage": "https://github.com/PHP-DI/Invoker", - "keywords": [ - "callable", - "dependency", - "dependency-injection", - "injection", - "invoke", - "invoker" - ], - "support": { - "issues": "https://github.com/PHP-DI/Invoker/issues", - "source": "https://github.com/PHP-DI/Invoker/tree/2.3.3" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - } - ], - "time": "2021-12-13T09:22:56+00:00" - }, - { - "name": "php-di/php-di", - "version": "6.4.0", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/PHP-DI.git", - "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/ae0f1b3b03d8b29dff81747063cbfd6276246cc4", - "reference": "ae0f1b3b03d8b29dff81747063cbfd6276246cc4", - "shasum": "" - }, - "require": { - "laravel/serializable-closure": "^1.0", - "php": ">=7.4.0", - "php-di/invoker": "^2.0", - "php-di/phpdoc-reader": "^2.0.1", - "psr/container": "^1.0" - }, - "provide": { - "psr/container-implementation": "^1.0" - }, - "require-dev": { - "doctrine/annotations": "~1.10", - "friendsofphp/php-cs-fixer": "^2.4", - "mnapoli/phpunit-easymock": "^1.2", - "ocramius/proxy-manager": "^2.11.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^9.5" - }, - "suggest": { - "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)", - "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~2.0)" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "DI\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "The dependency injection container for humans", - "homepage": "https://php-di.org/", - "keywords": [ - "PSR-11", - "container", - "container-interop", - "dependency injection", - "di", - "ioc", - "psr11" - ], - "support": { - "issues": "https://github.com/PHP-DI/PHP-DI/issues", - "source": "https://github.com/PHP-DI/PHP-DI/tree/6.4.0" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/php-di/php-di", - "type": "tidelift" - } - ], - "time": "2022-04-09T16:46:38+00:00" - }, - { - "name": "php-di/phpdoc-reader", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/PHP-DI/PhpDocReader.git", - "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c", - "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "mnapoli/hard-mode": "~0.3.0", - "phpunit/phpunit": "^8.5|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "PhpDocReader\\": "src/PhpDocReader" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", - "keywords": [ - "phpdoc", - "reflection" - ], - "support": { - "issues": "https://github.com/PHP-DI/PhpDocReader/issues", - "source": "https://github.com/PHP-DI/PhpDocReader/tree/2.2.1" - }, - "time": "2020-10-12T12:39:22+00:00" - }, - { - "name": "php-http/discovery", - "version": "1.15.3", - "source": { - "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "3ccd28dd9fb34b52db946abea1b538568e34eae8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/3ccd28dd9fb34b52db946abea1b538568e34eae8", - "reference": "3ccd28dd9fb34b52db946abea1b538568e34eae8", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0|^2.0", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "nyholm/psr7": "<1.0" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/http-client-implementation": "*", - "psr/http-factory-implementation": "*", - "psr/http-message-implementation": "*" - }, - "require-dev": { - "composer/composer": "^1.0.2|^2.0", - "graham-campbell/phpspec-skip-example-extension": "^5.0", - "php-http/httplug": "^1.0 || ^2.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", - "symfony/phpunit-bridge": "^6.2" - }, - "type": "composer-plugin", - "extra": { - "class": "Http\\Discovery\\Composer\\Plugin", - "plugin-optional": true - }, - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", - "homepage": "http://php-http.org", - "keywords": [ - "adapter", - "client", - "discovery", - "factory", - "http", - "message", - "psr17", - "psr7" - ], - "support": { - "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.15.3" - }, - "time": "2023-03-31T14:40:37+00:00" - }, - { - "name": "php-http/message-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/message-factory.git", - "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57", - "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57", - "shasum": "" - }, - "require": { - "php": ">=5.4", + "php": "^7.0 || ^8.0", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Factory interfaces for PSR-7 HTTP Message", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "stream", - "uri" - ], - "support": { - "issues": "https://github.com/php-http/message-factory/issues", - "source": "https://github.com/php-http/message-factory/tree/1.1.0" - }, - "time": "2023-04-14T14:16:17+00:00" - }, - { - "name": "php-http/multipart-stream-builder", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/multipart-stream-builder.git", - "reference": "11c1d31f72e01c738bbce9e27649a7cca829c30e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/11c1d31f72e01c738bbce9e27649a7cca829c30e", - "reference": "11c1d31f72e01c738bbce9e27649a7cca829c30e", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0", - "php-http/discovery": "^1.7", - "php-http/message-factory": "^1.0.2", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "nyholm/psr7": "^1.0", - "php-http/message": "^1.5", - "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Message\\MultipartStream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com" - } - ], - "description": "A builder class that help you create a multipart stream", - "homepage": "http://php-http.org", - "keywords": [ - "factory", - "http", - "message", - "multipart stream", - "stream" - ], - "support": { - "issues": "https://github.com/php-http/multipart-stream-builder/issues", - "source": "https://github.com/php-http/multipart-stream-builder/tree/1.2.0" - }, - "time": "2021-05-21T08:32:01+00:00" - }, - { - "name": "psr/container", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Http\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -814,20 +1395,18 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "http", + "http-client", + "psr", + "psr-18" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/http-client/tree/1.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2023-04-10T20:12:12+00:00" }, { "name": "psr/http-factory", @@ -886,16 +1465,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -904,7 +1483,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -919,7 +1498,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -933,36 +1512,36 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -983,780 +1562,36 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { - "name": "react/cache", - "version": "v1.2.0", + "name": "psr/simple-cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/cache.git", - "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", - "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0", - "react/promise": "^3.0 || ^2.0 || ^1.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, Promise-based cache interface for ReactPHP", - "keywords": [ - "cache", - "caching", - "promise", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/cache/issues", - "source": "https://github.com/reactphp/cache/tree/v1.2.0" - }, - "funding": [ - { - "url": "https://opencollective.com/reactphp", - "type": "open_collective" - } - ], - "time": "2022-11-30T15:59:55+00:00" - }, - { - "name": "react/dns", - "version": "v1.10.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/dns.git", - "reference": "a5427e7dfa47713e438016905605819d101f238c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/a5427e7dfa47713e438016905605819d101f238c", - "reference": "a5427e7dfa47713e438016905605819d101f238c", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "react/cache": "^1.0 || ^0.6 || ^0.5", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7 || ^1.2.1", - "react/promise-timer": "^1.9" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^4.8.35", - "react/async": "^4 || ^3 || ^2" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Dns\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async DNS resolver for ReactPHP", - "keywords": [ - "async", - "dns", - "dns-resolver", - "reactphp" - ], - "support": { - "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.10.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-09-08T12:22:46+00:00" - }, - { - "name": "react/event-loop", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/event-loop.git", - "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/187fb56f46d424afb6ec4ad089269c72eec2e137", - "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "suggest": { - "ext-event": "~1.0 for ExtEventLoop", - "ext-pcntl": "For signal handling support when using the StreamSelectLoop", - "ext-uv": "* for ExtUvLoop" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\EventLoop\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", - "keywords": [ - "asynchronous", - "event-loop" - ], - "support": { - "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.3.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-03-17T11:10:22+00:00" - }, - { - "name": "react/http", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/http.git", - "reference": "aa7512ee17258c88466de30f9cb44ec5f9df3ff3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/http/zipball/aa7512ee17258c88466de30f9cb44ec5f9df3ff3", - "reference": "aa7512ee17258c88466de30f9cb44ec5f9df3ff3", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "fig/http-message-util": "^1.1", - "php": ">=5.3.0", - "psr/http-message": "^1.0", - "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.3 || ^1.2.1", - "react/promise-stream": "^1.4", - "react/socket": "^1.12", - "react/stream": "^1.2", - "ringcentral/psr7": "^1.2" - }, - "require-dev": { - "clue/http-proxy-react": "^1.8", - "clue/reactphp-ssh-proxy": "^1.4", - "clue/socks-react": "^1.4", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/async": "^4 || ^3 || ^2", - "react/promise-timer": "^1.9" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Http\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Event-driven, streaming HTTP client and server implementation for ReactPHP", - "keywords": [ - "async", - "client", - "event-driven", - "http", - "http client", - "http server", - "https", - "psr-7", - "reactphp", - "server", - "streaming" - ], - "support": { - "issues": "https://github.com/reactphp/http/issues", - "source": "https://github.com/reactphp/http/tree/v1.8.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-09-29T12:55:52+00:00" - }, - { - "name": "react/promise", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-02-11T10:27:51+00:00" - }, - { - "name": "react/promise-stream", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise-stream.git", - "reference": "e6d2805e09ad50c4896f65f5e8705fe4ee7731a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise-stream/zipball/e6d2805e09ad50c4896f65f5e8705fe4ee7731a3", - "reference": "e6d2805e09ad50c4896f65f5e8705fe4ee7731a3", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/promise": "^3 || ^2.1 || ^1.2", - "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.6" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\Stream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "The missing link between Promise-land and Stream-land for ReactPHP", - "homepage": "https://github.com/reactphp/promise-stream", - "keywords": [ - "Buffer", - "async", - "promise", - "reactphp", - "stream", - "unwrap" - ], - "support": { - "issues": "https://github.com/reactphp/promise-stream/issues", - "source": "https://github.com/reactphp/promise-stream/tree/v1.5.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-09-09T11:42:18+00:00" - }, - { - "name": "react/promise-timer", - "version": "v1.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise-timer.git", - "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", - "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7.0 || ^1.2.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\Timer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", - "homepage": "https://github.com/reactphp/promise-timer", - "keywords": [ - "async", - "event-loop", - "promise", - "reactphp", - "timeout", - "timer" - ], - "support": { - "issues": "https://github.com/reactphp/promise-timer/issues", - "source": "https://github.com/reactphp/promise-timer/tree/v1.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-06-13T13:41:03+00:00" - }, - { - "name": "react/socket", - "version": "v1.12.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b", - "reference": "81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.0", - "react/dns": "^1.8", - "react/event-loop": "^1.2", - "react/promise": "^3 || ^2.6 || ^1.2.1", - "react/promise-timer": "^1.9", - "react/stream": "^1.2" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/async": "^4 || ^3 || ^2", - "react/promise-stream": "^1.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Socket\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", - "keywords": [ - "Connection", - "Socket", - "async", - "reactphp", - "stream" - ], - "support": { - "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.12.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-08-25T12:32:25+00:00" - }, - { - "name": "react/stream", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/stream.git", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "shasum": "" - }, - "require": { - "evenement/evenement": "^3.0 || ^2.0 || ^1.0", - "php": ">=5.3.8", - "react/event-loop": "^1.2" - }, - "require-dev": { - "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Stream\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", - "keywords": [ - "event-driven", - "io", - "non-blocking", - "pipe", - "reactphp", - "readable", - "stream", - "writable" - ], - "support": { - "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.2.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2021-07-11T12:37:55+00:00" - }, - { - "name": "ringcentral/psr7", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/ringcentral/psr7.git", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ringcentral/psr7/zipball/360faaec4b563958b673fb52bbe94e37f14bc686", - "reference": "360faaec4b563958b673fb52bbe94e37f14bc686", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "RingCentral\\Psr7\\": "src/" + "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1765,28 +1600,260 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "PSR-7 message implementation", + "description": "Common interfaces for simple caching", "keywords": [ - "http", - "message", - "stream", - "uri" + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" ], "support": { - "source": "https://github.com/ringcentral/psr7/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2018-05-29T20:21:04+00:00" + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "triagens/arangodb", + "version": "v3.8.0", + "source": { + "type": "git", + "url": "https://github.com/arangodb/arangodb-php.git", + "reference": "5104c4e2803d8b7fab97a0c80a3abe3f3ff3253e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/arangodb/arangodb-php/zipball/5104c4e2803d8b7fab97a0c80a3abe3f3ff3253e", + "reference": "5104c4e2803d8b7fab97a0c80a3abe3f3ff3253e", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "ArangoDBClient": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Jan Steemann", + "homepage": "https://github.com/arangodb/arangodb-php", + "role": "Developer" + }, + { + "name": "Frank Mayer", + "homepage": "https://github.com/arangodb/arangodb-php", + "role": "Developer" + }, + { + "name": "Contributors", + "homepage": "https://github.com/arangodb/arangodb-php/graphs/contributors" + } + ], + "description": "ArangoDB PHP client", + "homepage": "https://github.com/arangodb/arangodb-php", + "keywords": [ + "Arango", + "ArangoDb", + "database", + "distributed", + "document store", + "graph database", + "multi-model", + "nosql" + ], + "support": { + "issues": "https://github.com/arangodb/arangodb-php/issues", + "source": "https://github.com/arangodb/arangodb-php/tree/v3.8.0" + }, + "time": "2021-06-18T12:06:02+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "flow-php/etl-adapter-google-sheet": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/mirzaev/google_sheets/parser/system/public/.gitignore b/mirzaev/google_sheets/parser/system/public/.gitignore new file mode 100644 index 0000000..fee99d8 --- /dev/null +++ b/mirzaev/google_sheets/parser/system/public/.gitignore @@ -0,0 +1,2 @@ +storage/* +!storage diff --git a/mirzaev/google_sheets/parser/system/public/markets.php b/mirzaev/google_sheets/parser/system/public/markets.php new file mode 100644 index 0000000..eb080a9 --- /dev/null +++ b/mirzaev/google_sheets/parser/system/public/markets.php @@ -0,0 +1,105 @@ + 'id', + 'type', 'ТИП', 'Тип', 'тип' => 'type', + 'director', 'ДИРЕКТОР', 'Директор', 'директор' => 'director', + 'address', 'АДРЕС', 'Адрес', 'адрес' => 'address', + default => throw new exception("Неизвестный столбец: $name") + }; +} + +function degenerateLabel(string $name): string +{ + return match ($name) { + 'ID', 'id' => 'ID', + 'ТИП', 'type' => 'ТИП', + 'ДИРЕКТОР', 'director' => 'ДИРЕКТОР', + 'АДРЕС', 'address' => 'АДРЕС', + default => throw new exception("Неизвестный столбец: $name") + }; +} + +function init(array $row, bool $reverse = false): array +{ + $buffer = []; + + foreach ($row as $key => $value) $buffer[(($reverse ? 'de' : null) . 'generateLabel')($key)] = $value ?? ''; + + return $buffer; +} + + +function sync(Row &$row, string $city = 'Красноярск'): void +{ + global $arangodb; + + $_row = init($row->entries()->toArray()['row']); + + if ($_row['id'] !== null) + if (collection::init($arangodb->session, 'markets')) + if ($market = collection::search($arangodb->session, sprintf("FOR d IN markets FILTER d.id == '%s' RETURN d", $_row['id']))) + if ($_row === $new = array_diff_key($market->getAll(), ['_key' => true, 'created' => true, 'city' => true])); + else $row = $row->set((new Flow())->read(From::array([init($new, true)]))->fetch(1)[0]->get('row')); + else if (collection::search($arangodb->session, sprintf("FOR d IN markets FILTER d._id == '%s' RETURN d", document::write($arangodb->session, 'markets', $_row + ['city' => $city])))); + else throw new exception('Не удалось создать или найти созданного магазина'); + else throw new exception('Не удалось инициализировать коллекцию'); +} + +$settings = json_decode(require('../settings/markets/google.php'), true); +$document = require('../settings/markets/document.php'); +$sheets = require('../settings/markets/sheets.php'); + +$client = new Client(); +$client->setScopes(Sheets::SPREADSHEETS); +$client->setAuthConfig($settings); +$api = new Sheets($client); + +foreach ($sheets as $sheet) { + $rows = (new Flow())->read(new GoogleSheetExtractor($api, $document, new Columns($sheet, 'A', 'D'), true, 1000, 'row')); + + $i = 1; + foreach ($rows->fetch(100) as $row) { + ++$i; + $buffer = $row; + sync($row, $sheet); + if ($buffer !== $row) + $api->spreadsheets_values->update( + $document, + "$sheet!A$i:D$i", + new ValueRange(['values' => [array_values($row->entries()->toArray()['row'])]]), + ['valueInputOption' => 'USER_ENTERED'] + ); + } +} diff --git a/mirzaev/google_sheets/parser/system/public/workers.php b/mirzaev/google_sheets/parser/system/public/workers.php new file mode 100644 index 0000000..7f25a35 --- /dev/null +++ b/mirzaev/google_sheets/parser/system/public/workers.php @@ -0,0 +1,188 @@ + 'id', + 'name', 'ФИО', 'фио', 'ф.и.о.', 'ф. и. о.', 'Ф.И.О.', 'Ф. И. О.' => 'name', + 'phone', 'Номер', 'номер', 'телефон', 'Телефон' => 'phone', + 'birth', 'Дата рождения', 'дата рождения', 'Год рождения', 'год рождения', 'Год', 'год', 'День рождения', 'день рождения' => 'birth', + 'address', 'Адрес регистрации', 'адрес регистрации', 'Адрес', 'адрес', 'Регистрация', 'регистрация' => 'address', + 'commentary', 'Комментарий', 'ПРИМЕЧАНИЕ', 'Примечание', 'примечание' => 'commentary', + 'activity', 'Работа', 'работа', 'Вид Работы', 'Вид работы', 'вид работы' => 'activity', + 'passport', 'Паспорт', 'паспорт', 'серия и номер паспорта', 'Серия и номер паспорта' => 'passport', + 'issued', 'Выдан', 'выдан' => 'issued', + 'department', 'Код подразделения', 'код подразделения', 'Подразделение', 'подразделение' => 'department', + 'hiring', 'Дата присоединения', 'Когда устроили', 'когда устроили' => 'hiring', + 'district', 'Район', 'район' => 'district', + 'requisites', 'Реквизиты', 'реквизиты' => 'requisites', + 'fired', 'Дата увольнения', 'дата увольнения', 'Уволен', 'уволен', 'Увольнение', 'увольнение' => 'fired', + 'payment', 'Оплата', 'оплата' => 'payment', + 'tax', 'ИНН', 'инн' => 'tax', + default => throw new exception("Неизвестный столбец: $name") + }; +} + +function degenerateLabel(string $name): string +{ + return match ($name) { + 'ID', 'id' => 'ID', + 'ФИО', 'name' => 'ФИО', + 'Номер', 'phone' => 'Номер', + 'Дата рождения', 'birth' => 'Дата рождения', + 'Адрес регистрации', 'address' => 'Адрес регистрации', + 'Комментарий', 'commentary' => 'Комментарий', + 'Работа', 'activity' => 'Работа', + 'Паспорт', 'passport' => 'Паспорт', + 'Выдан', 'issued' => 'Выдан', + 'Код подразделения', 'department' => 'Код подразделения', + 'Дата присоединения', 'hiring' => 'Дата присоединения', + 'Район', 'district' => 'Район', + 'Реквизиты', 'requisites' => 'Реквизиты', + 'Дата увольнения', 'fired' => 'Дата увольнения', + 'Оплата', 'payment' => 'Оплата', + 'ИНН', 'tax' => 'ИНН', + default => throw new exception("Неизвестный столбец: $name") + }; +} + +function init(array $row, bool $reverse = false): array +{ + $buffer = []; + + foreach ($row as $key => $value) $buffer[(($reverse ? 'de' : null) . 'generateLabel')($key)] = $value ?? ''; + + return $buffer; +} + +function connect(_document $worker, _document $robot): void +{ + global $arangodb; + + if ( + collection::init($arangodb->session, 'connections', true) + && (collection::search( + $arangodb->session, + sprintf( + "FOR d IN connections FILTER d._from == '%s' && d._to == '%s' RETURN d", + $worker->getId(), + $robot->getId() + ) + ) + ?? collection::search( + $arangodb->session, + sprintf( + "FOR d IN connections FILTER d._id == '%s' RETURN d", + document::write( + $arangodb->session, + 'connections', + ['_from' => $worker->getId(), '_to' => $robot->getId()] + ) + ) + )) + ) { + // Инициализировано ребро: workers -> robot (любой) + + // Активация + $robot->status = 'active'; + document::update($arangodb->session, $robot); + } +} + +function connectAll(_document $worker): void +{ + global $arangodb; + + // Инициализация ребра: workers -> viber + if ( + collection::init($arangodb->session, 'viber') + && $viber = collection::search( + $arangodb->session, + sprintf( + "FOR d IN viber FILTER d.number == '%d' RETURN d", + $worker->phone + ) + ) + ) connect($worker, $viber); +} + + +function sync(Row &$row, string $city = 'Красноярск'): void +{ + global $arangodb; + + $_row = init($row->entries()->toArray()['row']); + + if ($_row['id'] !== null) + if (collection::init($arangodb->session, 'workers')) + if ($worker = collection::search($arangodb->session, sprintf("FOR d IN workers FILTER d.id == '%s' RETURN d", $_row['id'])) + ?? collection::search($arangodb->session, sprintf("FOR d IN workers FILTER d._id == '%s' RETURN d", document::write($arangodb->session, 'workers', $_row + ['city' => $city]))) + ) { + // Инициализирован работник + + // Реинициализация строки с актуальными записями (приоритет у базы данных) + if ($_row !== $new = array_diff_key($worker->getAll(), ['_key' => true, 'created' => true, 'city' => true])) + $row = $row->set((new Flow())->read(From::array([init($new, true)]))->fetch(1)[0]->get('row')); + + // Подключение к чат-роботам + connectAll($worker); + } else throw new exception('Не удалось создать или найти созданного работника'); + else throw new exception('Не удалось инициализировать коллекцию'); +} + +$settings = json_decode(require('../settings/workers/google.php'), true); +$document = require('../settings/workers/document.php'); +$sheets = require('../settings/workers/sheets.php'); + +$client = new Client(); +$client->setScopes(Sheets::SPREADSHEETS); +$client->setAuthConfig($settings); +$api = new Sheets($client); + +foreach ($sheets as $sheet) { + $rows = (new Flow())->read(new GoogleSheetExtractor($api, $document, new Columns($sheet, 'A', 'P'), true, 1000, 'row')); + + $i = 1; + foreach ($rows->fetch(5000) as $row) { + ++$i; + $buffer = $row; + sync($row, $sheet); + if ($buffer !== $row) { + $api->spreadsheets_values->update( + $document, + "$sheet!A$i:P$i", + new ValueRange(['values' => [array_values($row->entries()->toArray()['row'])]]), + ['valueInputOption' => 'USER_ENTERED'] + ); + } + } +} diff --git a/mirzaev/google_sheets/parser/system/public/works.php b/mirzaev/google_sheets/parser/system/public/works.php new file mode 100644 index 0000000..4cbc347 --- /dev/null +++ b/mirzaev/google_sheets/parser/system/public/works.php @@ -0,0 +1,190 @@ + '_id', + 'market', 'Магазин' => 'market', + 'worker', 'Сотрудник' => 'worker', + 'work', 'Работа' => 'work', + 'date', 'Дата' => 'date', + 'start', 'Начало' => 'start', + 'end', 'Конец' => 'end', + 'confirmed', 'Подтверждено' => 'confirmed', + 'commentary', 'Комментарий' => 'commentary', + 'response', 'Ответ' => 'response', + default => throw new exception("Неизвестный столбец: $name") + }; +} + +function degenerateLabel(string $name): string +{ + return match ($name) { + 'ID', '_id' => 'ID', + 'Магазин', 'market' => 'Магазин', + 'Сотрудник', 'worker' => 'Сотрудник', + 'Работа', 'work' => 'Работа', + 'Дата', 'date' => 'Дата', + 'Начало', 'start' => 'Начало', + 'Конец', 'end' => 'Конец', + 'Подтверждено', 'confirmed' => 'Подтверждено', + 'Комментарий', 'commentary' => 'Комментарий', + 'Ответ', 'response' => 'Ответ', + default => throw new exception("Неизвестный столбец: $name") + }; +} + +function init(array $row, bool $reverse = false): array +{ + $buffer = []; + + foreach ($row as $key => $value) $buffer[(($reverse ? 'de' : null) . 'generateLabel')($key)] = $value; + + return $buffer; +} + + +function sync(Row &$row): void +{ + global $arangodb; + + $_row = init($row->entries()->toArray()['row']); + + if (collection::init($arangodb->session, 'works')) + if (!empty($_row['_id']) && $work = collection::search($arangodb->session, sprintf("FOR d IN works FILTER d._id == '%s' RETURN d", $_row['_id']))) { + // Найдена запись работы (строки) в базе данных + + // Очистка перед записью в таблицу + $new = array_diff_key($work->getAll(), ['_key' => true, 'created' => true]); + + // Инициализация выбранного сотрудника + if (collection::init($arangodb->session, 'readinesses', true) && collection::init($arangodb->session, 'workers')) + $new = ['worker' => collection::search( + $arangodb->session, + sprintf( + "FOR d IN workers LET e = (FOR e IN readinesses FILTER e._to == '%s' RETURN e._from)[0] FILTER d._id == e RETURN d", + $_row['_id'] + ) + )->id ?? ''] + $new; + else throw new exception('Не удалось инициализировать коллекции'); + + // Инициализация магазина + if (collection::init($arangodb->session, 'requests', true) && collection::init($arangodb->session, 'markets')) + if ($market = collection::search( + $arangodb->session, + sprintf( + "FOR d IN markets LET e = (FOR e IN requests FILTER e._to == '%s' RETURN e._from)[0] FILTER d._id == e RETURN d", + $_row['_id'] + ) + )) $new = ['market' => $market->id] + $new; + else throw new exception('Не удалось найти магазин'); + else throw new exception('Не удалось инициализировать коллекции'); + + // Запись идентификатора только что созданной записи в базе данных для записи в таблицу + $new = ['_id' => $work->getId()] + $new; + + // Реинициализация строки с новыми данными по ссылке (приоритет из базы данных) + if ($_row !== $new) $row = $row->set((new Flow())->read(From::array([init($new, true)]))->fetch(1)[0]->get('row')); + } else if ( + !empty($_row['market']) + && collection::init($arangodb->session, 'requests', true) && collection::init($arangodb->session, 'markets') + && ($market = collection::search($arangodb->session, sprintf("FOR d IN markets FILTER d.id == '%s' RETURN d", $_row['market']))) + && $work = collection::search( + $arangodb->session, + sprintf( + "FOR d IN works FILTER d._id == '%s' RETURN d", + document::write($arangodb->session, 'works', array_diff_key($_row, ['_id' => true, 'market' => true, 'worker' => true])) + ) + ) + ) { + // Не найдена запись работы (строки) в базе данных и была создана + + // Инициализация ребра: market -> work (запрос магазина о работе) + if (collection::search( + $arangodb->session, + sprintf( + "FOR d IN requests FILTER d._id == '%s' RETURN d", + document::write($arangodb->session, 'requests', ['_from' => $market->getId(), '_to' => $work->getId()]) + ) + )); + else throw new exception('Не удалось создать заявку магазина'); + + if ( + !empty($_row['worker']) + && collection::init($arangodb->session, 'readinesses', true) && collection::init($arangodb->session, 'workers') + && ($worker = collection::search($arangodb->session, sprintf("FOR d IN workers FILTER d.id == '%s' RETURN d", $_row['worker']))) + ) { + // Инициализация ребра: workers -> work (готовность работника приступать к заявке) + if (collection::search( + $arangodb->session, + sprintf( + "FOR d IN readinesses FILTER d._id == '%s' RETURN d", + document::write($arangodb->session, 'readinesses', ['_from' => $worker->getId(), '_to' => $work->getId()]) + ) + )); + else throw new exception('Не удалось создать готовность сотрудника'); + } + + // Реинициализация строки с новыми данными по ссылке (приоритет из базы данных) + $row = $row->set((new Flow())->read(From::array([init(['_id' => $work->getId()] + $_row, true)]))->fetch(1)[0]->get('row')); + } else return; + else throw new exception('Не удалось инициализировать коллекцию'); +} + +$settings = json_decode(require('../settings/works/google.php'), true); +$document = require('../settings/works/document.php'); +$sheets = require('../settings/works/sheets.php'); + +$client = new Client(); +$client->setScopes(Sheets::SPREADSHEETS); +$client->setAuthConfig($settings); + +foreach ($sheets as $sheet) { + $sheets = new Sheets($client); + + $rows = (new Flow())->read(new GoogleSheetExtractor($sheets, $document, new Columns($sheet, 'A', 'J'), true, 1000, 'row')); + + $i = 1; + + foreach ($rows->fetch(10000) as $row) { + ++$i; + $buffer = $row; + sync($row); + if ($buffer !== $row) + $sheets->spreadsheets_values->update( + $document, + "$sheet!A$i:J$i", + new ValueRange(['values' => [array_values($row->entries()->toArray()['row'])]]), + ['valueInputOption' => 'USER_ENTERED'] + ); + } +} diff --git a/mirzaev/google_sheets/parser/system/settings/.gitignore b/mirzaev/google_sheets/parser/system/settings/.gitignore new file mode 100644 index 0000000..531ac1d --- /dev/null +++ b/mirzaev/google_sheets/parser/system/settings/.gitignore @@ -0,0 +1,4 @@ +* +!*/ +!.gitignore +!*.sample diff --git a/mirzaev/google_sheets/parser/system/settings/arangodb.php.sample b/mirzaev/google_sheets/parser/system/settings/arangodb.php.sample new file mode 100644 index 0000000..fc1c2d1 --- /dev/null +++ b/mirzaev/google_sheets/parser/system/settings/arangodb.php.sample @@ -0,0 +1,8 @@ + 'unix:///var/run/arangodb3/arango.sock', + 'database' => '', + 'name' => '', + 'password' => '' +]; diff --git a/mirzaev/telegram/registry/people/system/settings/.gitignore b/mirzaev/google_sheets/parser/system/settings/markets/.gitignore similarity index 100% rename from mirzaev/telegram/registry/people/system/settings/.gitignore rename to mirzaev/google_sheets/parser/system/settings/markets/.gitignore diff --git a/mirzaev/google_sheets/parser/system/settings/markets/document.php.sample b/mirzaev/google_sheets/parser/system/settings/markets/document.php.sample new file mode 100644 index 0000000..7679934 --- /dev/null +++ b/mirzaev/google_sheets/parser/system/settings/markets/document.php.sample @@ -0,0 +1,3 @@ +setParseMode(Config::PARSE_MODE_MARKDOWN); - -$bot = new Zanzara(KEY, $config); - -$pdo = new \PDO('mysql:host=localhost;port=3306;dbname=telegram-registry-people;charset=utf8', 'dolboeb', 'sosiska228'); - -function isAdmin(int $id): bool -{ - global $pdo; - - return ($pdo->query("SELECT `admin` FROM accounts WHERE id_telegram=$id")->fetch(PDO::FETCH_ASSOC)['admin'] ?? 0) === 1; -} - -function isActive(int $id): bool -{ - global $pdo; - - return ($pdo->query("SELECT `status` FROM accounts WHERE id_telegram=$id")->fetch(PDO::FETCH_ASSOC)['status'] ?? 'inactive') === 'active'; -} - -function countEntries(): array -{ - global $pdo; - - $date = time(); - - $year = date('Y-m-d H:i:s', $date - 31556952); - $month = date('Y-m-d H:i:s', $date - 2678400); - $week = date('Y-m-d H:i:s', $date - 604800); - $day = date('Y-m-d H:i:s', $date - 86400); - - return $pdo->query( - <<= '$year') AS 'year', - (SELECT COUNT(`id`) FROM `people` WHERE `created` >= '$month') AS 'month', - (SELECT COUNT(`id`) FROM `people` WHERE `created` >= '$week') AS 'week', - (SELECT COUNT(`id`) FROM `people` WHERE `created` >= '$day') AS 'day' - SQL - )->fetch(PDO::FETCH_ASSOC); -} - -function lastUpdate(): string -{ - global $pdo; - - return date('Y\\\.m\\\.d H:i:s', strtotime($pdo->query('SELECT `updated` FROM people ORDER BY updated DESC LIMIT 1')->fetch(PDO::FETCH_ASSOC)['updated'] ?? 0)); -} - -function initEntry(): ?int -{ - global $pdo; - - $pdo->query("INSERT INTO `people` () VALUES ()")->fetch(); - - return $pdo->lastInsertId(); -} - -function generateMenu(Context $ctx): void -{ - $keyboard = [ - 'reply_markup' => - ['inline_keyboard' => [ - [ - ['callback_data' => 'read', 'text' => '🔍 Поиск'], - ] - ], 'resize_keyboard' => false] - ]; - - if (isAdmin($ctx->getMessage()?->getFrom()?->getId()) ?? $ctx->getCallbackQuery()->getFrom()->getId()) - $keyboard['reply_markup']['inline_keyboard'][0][] = ['callback_data' => 'write', 'text' => '📔 Записать']; - - $lastUpdate = lastUpdate(); - $count = countEntries(); - - $ctx->sendMessage( - <<deleteUserDataItem('wait_for'); - - match (null) { - $name => waitFor($ctx, 'name'), - $surname => waitFor($ctx, 'surname'), - $patronymic => waitFor($ctx, 'patronymic'), - $phone => waitFor($ctx, 'phone'), - $address => waitFor($ctx, 'address'), - $year => waitFor($ctx, 'year'), - $month => waitFor($ctx, 'month'), - $day => waitFor($ctx, 'day'), - $data => waitFor($ctx, 'data'), - $cover => waitFor($ctx, 'cover'), - default => (function () use ($ctx) { - $ctx->sendMessage('📦 *Все поля заполнены и записаны в реестре*')->then(function () use ($ctx) { - stopProcess($ctx)->then(function () use ($ctx) { - generateMenu($ctx); - }); - }); - })() - }; -} - -function readEntry( - Context $ctx, - ?string $name = null, - ?string $surname = null, - ?string $patronymic = null, - ?int $phone = null, - ?string $address = null, - ?int $year = null, - ?int $month = null, - ?int $day = null, - ?string $data = null -): PromiseInterface { - $ctx->deleteUserDataItem('wait_for'); - - return match (null) { - $name => waitFor($ctx, 'name'), - $surname => waitFor($ctx, 'surname'), - $patronymic => waitFor($ctx, 'patronymic'), - $phone => waitFor($ctx, 'phone'), - $address => waitFor($ctx, 'address'), - $year => waitFor($ctx, 'year'), - $month => waitFor($ctx, 'month'), - $day => waitFor($ctx, 'day'), - $data => waitFor($ctx, 'data'), - default => (function () use ($ctx) { - return $ctx->sendMessage('📦 *Все поля заполнены*'); - })() - }; -} - -function generateQueryStatus( - Context $ctx, - ?string $name = null, - ?string $surname = null, - ?string $patronymic = null, - ?int $phone = null, - ?string $address = null, - ?int $year = null, - ?int $month = null, - ?int $day = null, - ?string $data = null -): PromiseInterface { - if (isset($name)) $name = preg_replace('/([._\-()!])/', '\\\$1', $name); - if (isset($surname)) $surname = preg_replace('/([._\-()!])/', '\\\$1', $surname); - if (isset($patronymic)) $patronymic = preg_replace('/([._\-()!])/', '\\\$1', $patronymic); - if (isset($phone)) $phone = preg_replace('/([._\-()!])/', '\\\$1', $phone); - if (isset($address)) $address = preg_replace('/([._\-()!])/', '\\\$1', $address); - if (isset($year)) $year = preg_replace('/([._\-()!])/', '\\\$1', $year); - if (isset($month)) $month = preg_replace('/([._\-()!])/', '\\\$1', $month); - if (isset($day)) $day = preg_replace('/([._\-()!])/', '\\\$1', $day); - if (isset($data)) $data = preg_replace('/([._\-()!])/', '\\\$1', $data); - - $keyboard = generateFieldsButtons( - ...[ - 'name' => true, - 'surname' => true, - 'patronymic' => true, - 'name' => true, - 'phone' => true, - 'address' => true, - 'year' => true, - 'month' => true, - 'day' => true, - 'data' => true - ] - ); - - $keyboard['reply_markup']['inline_keyboard'][] = [ - ['callback_data' => 'stop', 'text' => '❎ Отмена'], - ['callback_data' => 'complete', 'text' => '✅ Отправить'] - ]; - - return $ctx->sendMessage( - << 'Введите имя', - 'surname' => 'Введите фамилию', - 'patronymic' => 'Введите отчество', - 'phone' => 'Введите номер телефона', - 'address' => 'Введите адрес', - 'year' => 'Введите год рождения', - 'month' => 'Введите номер месяца рождения', - 'day' => 'Введите номер дня рождения', - 'data' => 'Введите дополнительную информацию', - 'cover' => 'Отправьте обложку \(изображение\)', - default => 'Введите данные для записи в реестр', - }; - - if (isset($value)) $buffer .= "\n\n*Текущее значение:* " . preg_replace('/([._\-()!])/', '\\\$1', $value); - - return $buffer; -} - -function generateLabel(string $target): string -{ - return match ($target) { - 'name' => 'Имя', - 'surname' => 'Фамилия', - 'patronymic' => 'Отчество', - 'phone' => 'Номер', - 'address' => 'Адрес', - 'year' => 'Год', - 'month' => 'Месяц', - 'day' => 'День', - 'data' => 'Дополнительно', - 'cover' => 'Обложка', - default => 'Информация', - }; -} - -function generateFieldsButtons( - ?string $name = null, - ?string $surname = null, - ?string $patronymic = null, - ?int $phone = null, - ?string $address = null, - ?int $year = null, - ?int $month = null, - ?int $day = null, - ?string $data = null, - ?string $cover = null -): array { - $buffer = []; - $buffer2 = []; - - if (isset($name)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'name', 'text' => generateLabel('name')] - : $buffer2[] = ['callback_data' => 'name', 'text' => generateLabel('name')]; - if (isset($surname)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'surname', 'text' => generateLabel('surname')] - : $buffer2[] = ['callback_data' => 'surname', 'text' => generateLabel('surname')]; - if (isset($patronymic)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'patronymic', 'text' => generateLabel('patronymic')] - : $buffer2[] = ['callback_data' => 'patronymic', 'text' => generateLabel('patronymic')]; - if (isset($phone)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'phone', 'text' => generateLabel('phone')] - : $buffer2[] = ['callback_data' => 'phone', 'text' => generateLabel('phone')]; - if (isset($address)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'address', 'text' => generateLabel('address')] - : $buffer2[] = ['callback_data' => 'address', 'text' => generateLabel('address')]; - if (isset($year)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'year', 'text' => generateLabel('year')] - : $buffer2[] = ['callback_data' => 'year', 'text' => generateLabel('year')]; - if (isset($month)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'month', 'text' => generateLabel('month')] - : $buffer2[] = ['callback_data' => 'month', 'text' => generateLabel('month')]; - if (isset($day)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'day', 'text' => generateLabel('day')] - : $buffer2[] = ['callback_data' => 'day', 'text' => generateLabel('day')]; - if (isset($data)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'data', 'text' => generateLabel('data')] - : $buffer2[] = ['callback_data' => 'data', 'text' => generateLabel('data')]; - if (isset($cover)) count($buffer) < 4 - ? $buffer[] = ['callback_data' => 'cover', 'text' => generateLabel('cover')] - : $buffer2[] = ['callback_data' => 'cover', 'text' => generateLabel('cover')]; - - return ['reply_markup' => ['inline_keyboard' => [$buffer, $buffer2], 'resize_keyboard' => false]]; -} - -function waitFor(Context $ctx, string $target): PromiseInterface -{ - return $ctx->getUserDataItem('process')->then(function ($process) use ($ctx, $target) { - if (isset($process)) - return $ctx->setUserDataItem("wait_for", $target)->then(function () use ($ctx, $target, $process) { - return $ctx->sendMessage('⚠️ ' . generateRequestLabel($target, $process['data'][$target]), ['reply_markup' => ['inline_keyboard' => [[['callback_data' => 'delete_field', 'text' => 'Удалить']]], 'resize_keyboard' => false]]); - }); - }); -} - -function updateEntry(int $id, string $name, string|int $value): void -{ - global $pdo; - - try { - $pdo->prepare("UPDATE `people` SET `$name` = :value WHERE `id` = :id")->execute([':value' => $value, ':id' => $id]); - } catch (Exception $e) { - } -} - -function checkEntry(int $id, string $name, string|int $value): bool -{ - global $pdo; - - $query = $pdo->prepare("SELECT `$name` FROM people WHERE `id` = :id"); - - $query->execute([':id' => $id]); - - return $query->fetch(PDO::FETCH_ASSOC)[$name] === $value; -} - -function startSearch(Context $ctx, string $order = 'updated', bool $desc = true, int $page = 1): PromiseInterface -{ - return $ctx->getUserDataItem('process')->then(function ($process) use ($ctx, $order, $desc, $page) { - if (empty($process)) return; - - return stopProcess($ctx)->then(function () use ($ctx, $process, $order, $desc, $page) { - return $ctx->sendMessage('⚙️ Запрос отправляется\.\.\.')->then(function () use ($ctx, $process, $order, $desc, $page) { - foreach ($process['search']($order, $desc, 3, --$page, ...$process['data']) as $entry) { - if (isset($entry['name'])) $entry['name'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['name']); - if (isset($entry['surname'])) $entry['surname'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['surname']); - if (isset($entry['patronymic'])) $entry['patronymic'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['patronymic']); - if (isset($entry['phone'])) $entry['phone'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['phone']); - if (isset($entry['address'])) $entry['address'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['address']); - if (isset($entry['year'])) $entry['year'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['year']); - if (isset($entry['month'])) $entry['month'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['month']); - if (isset($entry['day'])) $entry['day'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['day']); - if (isset($entry['data'])) $entry['data'] = preg_replace('/([._\-()!])/', '\\\$1', $entry['data']); - - $text = "*Имя:* {$entry['name']}\n*Фамилия:* {$entry['surname']}\n*Отчество:* {$entry['patronymic']}\n*Номер:* {$entry['phone']}\n*Адрес:* {$entry['address']}\n*Дата рождения:* {$entry['year']} {$entry['month']} {$entry['day']}\n*Дополнительно:* {$entry['data']}"; - - $file = parse_url($entry['cover'])['path']; - - if (file_exists($file)) $ctx->sendPhoto(new InputFile($file), ['caption' => $text, 'protect_content' => true]); - else $ctx->sendMessage($text, ['protect_content' => true]); - } - }); - }); - }); -} - -function searchSmartEntry( - string $order = 'updated', - bool $desc = true, - int $limit = 3, - int $page = 0, - ?string $name = null, - ?string $surname = null, - ?string $patronymic = null, - ?int $phone = null, - ?string $address = null, - ?int $year = null, - ?int $month = null, - ?int $day = null, - ?string $data = null -): array { - global $pdo; - - if ( - empty($name) - && empty($surname) - && empty($patronymic) - && empty($phone) - && empty($address) - && empty($year) - && empty($month) - && empty($day) - && empty($data) - ) return []; - - $query = 'SELECT * FROM `people` WHERE '; - $args = []; - $another = false; - - if (isset($name)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= 'levenshtein(`name`, :name) < 3 && `name` != \'\''; - $args[':name'] = $name; - } - - if (isset($surname)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= 'levenshtein(`surname`, :surname) < 3 && `surname` != \'\''; - $args[':surname'] = $surname; - } - - if (isset($patronymic)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= 'levenshtein(`patronymic`, :patronymic) < 3 && `patronymic` != \'\''; - $args[':patronymic'] = $patronymic; - } - - if (isset($phone)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= 'levenshtein(`phone`, :phone) < 2 && `phone` != \'\''; - $args[':phone'] = $phone; - } - - if (isset($address)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= 'levenshtein(`address`, :address) < 4 && `address` != \'\''; - $args[':address'] = $address; - } - - if (isset($year)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= '`year` == :year'; - $args[':year'] = $year; - } - - if (isset($month)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= '`month` == :month'; - $args[':month'] = $month; - } - - if (isset($day)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= '`day` == :day'; - $args[':day'] = $day; - } - - if (isset($data)) { - if ($another) $query .= ' && '; - else $another = true; - $query .= 'levenshtein(`data`, :data) < 6 && `data` != \'\''; - $args[':data'] = $data; - } - - $query .= " ORDER BY `$order` " . ($desc ? 'DESC' : 'ASC'); - - $offset = $page === 0 ? 0 : $limit * $page; - $query .= " LIMIT $limit OFFSET $offset"; - - try { - $instance = $pdo->prepare($query); - if ($instance->execute($args)) return $instance->fetchAll(PDO::FETCH_ASSOC); - else return []; - } catch (Exception $e) { - } - - return []; -} - -$stop = false; - -$bot->onUpdate(function (Context $ctx) use (&$stop): void { - if (!isActive($ctx->getMessage()?->getFrom()?->getId() ?? $ctx->getCallbackQuery()->getFrom()->getId())) $stop = true; -}); - -$bot->onCommand('start', function (Context $ctx) use ($stop): void { - if ($stop) return; - generateMenu($ctx); -}); - -$bot->onMessage(function (Context $ctx) use ($stop): void { - $text = $ctx->getMessage()->getText(); - - if (!empty($text) && $text[0] !== '/' || empty($text)) - $ctx->getUserDataItem('process')->then(function ($process) use ($ctx, $text) { - if (empty($process)) return; - - $ctx->getUserDataItem('wait_for')->then(function ($wait_for) use ($ctx, &$process, $text) { - $target = match ($wait_for) { - 'phone', 'day', 'month', 'year' => (function () use ($ctx, $text) { - preg_match_all('!\d+!', $text, $matches); - return (int) implode('', $matches[0]); - })(), - default => $text - }; - - if ($process['type'] === 'createEntry') { - // Создание записи в реестре - - if ($wait_for === 'cover') { - if (!file_exists($path = 'storage/' . $process['id'])) mkdir($path, '0755', true); - - $photos = $ctx->getMessage()->getPhoto(); - - $ctx->getFile(end($photos)->getFileId())->then(function ($file) use ($ctx, $wait_for, &$path, &$process, &$target) { - $url = pathinfo($file->getFilePath()); - - if (!file_exists($path .= '/' . $url['dirname'])) mkdir($path, '0755', true); - - file_put_contents($path .= '/' . $url['basename'], fopen('https://api.telegram.org/file/bot' . KEY . '/' . $file->getFilePath(), 'r')); - updateEntry($process['id'], $wait_for, $path); - - if (checkEntry($process['id'], $wait_for, $path)) { - $process['data'][$wait_for] = $path; - $ctx->setUserDataItem('process', $process)->then(function () use ($ctx, $path, $process) { - $ctx->sendMessage("✏️ *Записано в реестр*\n\n" . generateLabel('cover') . ': ' . ($link = preg_replace('/([._\-()!])/', '\\\$1', STORAGE . '/' . $path)) . "\n[]($link)")->then(function () use ($ctx, $process) { - // Запуск процесса создания - createEntry($ctx, ...$process['data']); - }); - }); - } else $ctx->sendMessage('🚫 Не удалось записать значение в реестр'); - }); - } else { - updateEntry($process['id'], $wait_for, $target); - - if (checkEntry($process['id'], $wait_for, $target)) { - $process['data'][$wait_for] = $target; - $ctx->setUserDataItem('process', $process)->then(function () use ($ctx, $target, $wait_for, $process) { - $ctx->sendMessage("✏️ *Записано в реестр*\n\n" . generateLabel($wait_for) . ': ' . preg_replace('/([._\-()!])/', '\\\$1', $target))->then(function () use ($ctx, $process) { - // Запуск процесса создания - createEntry($ctx, ...$process['data']); - }); - }); - } else $ctx->sendMessage('🚫 *Не удалось записать значение в реестр*'); - } - } else if ($process['type'] === 'readEntry') { - // Чтение записей в реестре - - $process['data'][$wait_for] = $target; - $ctx->setUserDataItem('process', $process)->then(function () use ($ctx, $process) { - generateQueryStatus($ctx, ...$process['data'])->then(function () use ($ctx, $process) { - readEntry($ctx, ...$process['data']); - }); - }); - } - }); - }); -}); - -function read(Context $ctx, bool $smart = false): void -{ - global $stop; - - if ($stop) return; - - // Инициализация процесса в кеше - $ctx->setUserDataItem('process', [ - 'type' => 'readEntry', - 'search' => 'searchSmartEntry', - 'data' => $data = [ - 'name' => null, - 'surname' => null, - 'patronymic' => null, - 'phone' => null, - 'address' => null, - 'year' => null, - 'month' => null, - 'day' => null, - 'data' => null - ] - ])->then(function () use ($ctx, $data) { - $ctx->sendMessage("⚡ *Запущен процесс поиска*")->then(function () use ($ctx, $data) { - generateQueryStatus($ctx, ...$data)->then(function () use ($ctx, $data) { - // Запуск процесса создания поиска - readEntry($ctx, ...$data); - }); - }); - }); -} - -function write(Context $ctx): void -{ - global $stop; - - if ($stop) return; - - if (isAdmin($ctx->getMessage()?->getFrom()?->getId() ?? $ctx->getCallbackQuery()->getFrom()->getId())) { - // Администратор - - if ($id = initEntry()) { - // Инициализирован человек в базе данных - - // Инициализация процесса в кеше - $ctx->setUserDataItem('process', [ - 'type' => 'createEntry', - 'id' => $id, - 'data' => $data = [ - 'name' => null, - 'surname' => null, - 'patronymic' => null, - 'phone' => null, - 'address' => null, - 'year' => null, - 'month' => null, - 'day' => null, - 'data' => null, - 'cover' => null - ] - ])->then(function () use ($ctx, $id, $data) { - $ctx->sendMessage("⚡ *Запущен процесс создания записи*")->then(function () use ($ctx, $data, $id) { - $ctx->sendMessage("📦 *Инициализирована запись в реестре:* $id")->then(function () use ($ctx, $data, $id) { - // Запуск процесса создания - createEntry($ctx, ...$data); - }); - }); - }); - } - } -} - -function stopProcess(Context $ctx): PromiseInterface -{ - return $ctx->deleteUserDataItem('process')->then(function () use ($ctx) { - return $ctx->deleteUserDataItem('wait_for')->then(function () use ($ctx) { - return $ctx->sendMessage('⛔ Процесс завершён'); - }); - }); -} - -function deleteField(Context $ctx): void -{ - $ctx->getUserDataItem('process')->then(function ($process) use ($ctx) { - $ctx->getUserDataItem('wait_for')->then(function ($wait_for) use ($ctx, $process) { - $process['data'][$wait_for] = null; - $ctx->setUserDataItem('process', $process)->then(function () use ($ctx, $process, $wait_for) { - $ctx->sendMessage('🗑️ *Удалено значение поля:* ' . mb_strtolower(generateLabel($wait_for)))->then(function () use ($ctx, $process) { - generateQueryStatus($ctx, ...$process['data'])->then(function () use ($ctx, $process) { - $process['type']($ctx, ...$process['data']); - }); - }); - }); - }); - }); -} - -$bot->onCommand('write', fn ($ctx) => write($ctx)); -$bot->onCommand('read', fn ($ctx) => read($ctx)); -$bot->onCommand('read_smart', fn ($ctx) => read($ctx, true)); - -$bot->onCbQueryData(['write'], fn ($ctx) => write($ctx)); -$bot->onCbQueryData(['read'], fn ($ctx) => read($ctx)); -$bot->onCbQueryData(['read_smart'], fn ($ctx) => read($ctx, true)); - -$bot->onCommand('name', fn ($ctx) => waitFor($ctx, 'name')); -$bot->onCommand('surname', fn ($ctx) => waitFor($ctx, 'surname')); -$bot->onCommand('patronymic', fn ($ctx) => waitFor($ctx, 'patronymic')); -$bot->onCommand('phone', fn ($ctx) => waitFor($ctx, 'phone')); -$bot->onCommand('address', fn ($ctx) => waitFor($ctx, 'address')); -$bot->onCommand('year', fn ($ctx) => waitFor($ctx, 'year')); -$bot->onCommand('month', fn ($ctx) => waitFor($ctx, 'month')); -$bot->onCommand('day', fn ($ctx) => waitFor($ctx, 'day')); -$bot->onCommand('data', fn ($ctx) => waitFor($ctx, 'data')); -$bot->onCommand('cover', fn ($ctx) => waitFor($ctx, 'cover')); - -$bot->onCbQueryData(['name'], fn ($ctx) => waitFor($ctx, 'name')); -$bot->onCbQueryData(['surname'], fn ($ctx) => waitFor($ctx, 'surname')); -$bot->onCbQueryData(['patronymic'], fn ($ctx) => waitFor($ctx, 'patronymic')); -$bot->onCbQueryData(['phone'], fn ($ctx) => waitFor($ctx, 'phone')); -$bot->onCbQueryData(['address'], fn ($ctx) => waitFor($ctx, 'address')); -$bot->onCbQueryData(['year'], fn ($ctx) => waitFor($ctx, 'year')); -$bot->onCbQueryData(['month'], fn ($ctx) => waitFor($ctx, 'month')); -$bot->onCbQueryData(['day'], fn ($ctx) => waitFor($ctx, 'day')); -$bot->onCbQueryData(['data'], fn ($ctx) => waitFor($ctx, 'data')); -$bot->onCbQueryData(['cover'], fn ($ctx) => waitFor($ctx, 'cover')); - -$bot->onCbQueryData(['delete_field'], fn ($ctx) => deleteField($ctx)); - -$bot->onCommand('stop', fn ($ctx) => stopProcess($ctx)); -$bot->onCbQueryData(['stop'], fn ($ctx) => stopProcess($ctx)); - -$bot->onCommand('complete', fn ($ctx) => startSearch($ctx)); -$bot->onCbQueryData(['complete'], fn ($ctx) => startSearch($ctx)); - -$bot->run(); diff --git a/mirzaev/telegram/registry/people/system/settings/key.php.sample b/mirzaev/telegram/registry/people/system/settings/key.php.sample deleted file mode 100644 index 106ab10..0000000 --- a/mirzaev/telegram/registry/people/system/settings/key.php.sample +++ /dev/null @@ -1,3 +0,0 @@ -