From 212694c917ca201580a6657ee0c6978a330e75ec Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Jan 2021 07:42:10 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=20=D0=B8?= =?UTF-8?q?=D0=BC=D0=BF=D0=BE=D1=80=D1=82=20=D0=B8=D0=B7=201C,=20=D0=B1?= =?UTF-8?q?=D0=B5=D0=B7=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B3=D1=80=D1=83=D0=BF=D0=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 4 +- composer.lock | 627 ++++++++++++++---- .../skillparts/system/config/web.php.example | 11 +- mirzaev/skillparts/system/models/Account.php | 18 +- mirzaev/skillparts/system/models/Document.php | 39 +- mirzaev/skillparts/system/models/Edge.php | 96 ++- mirzaev/skillparts/system/models/Product.php | 228 +------ .../skillparts/system/models/ProductGroup.php | 20 +- mirzaev/skillparts/system/models/Purchase.php | 42 +- mirzaev/skillparts/system/models/Supply.php | 273 ++++---- .../system/models/SupplyEdgeProduct.php | 70 +- .../skillparts/system/models/SupplyGroup.php | 5 - .../system/models/traits/Xml2Array.php | 13 + 13 files changed, 900 insertions(+), 546 deletions(-) create mode 100644 mirzaev/skillparts/system/models/traits/Xml2Array.php diff --git a/composer.json b/composer.json index 46238fd..fecc00a 100644 --- a/composer.json +++ b/composer.json @@ -12,9 +12,9 @@ } ], "require": { - "php": ">=8.0.0", + "php": "^8.0.0", "twbs/bootstrap": ">=4.5", - "yiisoft/yii2": ">=2.0.14", + "yiisoft/yii2": "2.*", "yiisoft/yii2-bootstrap": ">=2.0.0", "yiisoft/yii2-swiftmailer": ">=2.0.0", "bower-asset/bootstrap": "*", diff --git a/composer.lock b/composer.lock index 56b2099..41fc3d5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "88957d501cd6111bfb6987bd71d90524", + "content-hash": "4196a4ecb3a65a932cab9cbdeeb2b47f", "packages": [ { "name": "bower-asset/bootstrap", @@ -32,7 +32,7 @@ "version": "3.3.11", "source": { "type": "git", - "url": "https://github.com/RobinHerbots/Inputmask.git", + "url": "git@github.com:RobinHerbots/Inputmask.git", "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" }, "dist": { @@ -53,7 +53,7 @@ "version": "3.5.1", "source": { "type": "git", - "url": "git@github.com:jquery/jquery-dist.git", + "url": "https://github.com/jquery/jquery-dist.git", "reference": "4c0e4becb8263bb5b3e6dadc448d8e7305ef8215" }, "dist": { @@ -151,6 +151,9 @@ "1c", "commerceml" ], + "support": { + "source": "https://github.com/carono/php-commerceml/tree/0.2.5" + }, "time": "2019-06-24T13:49:20+00:00" }, { @@ -196,6 +199,10 @@ } ], "description": "Yii2 module for the exchange of goods and documents from 1C", + "support": { + "issues": "https://github.com/carono/yii2-1c-exchange/issues", + "source": "https://github.com/carono/yii2-1c-exchange/tree/0.3.1" + }, "time": "2020-09-08T12:58:28+00:00" }, { @@ -256,6 +263,10 @@ "markdown", "markdown-extra" ], + "support": { + "issues": "https://github.com/cebe/markdown/issues", + "source": "https://github.com/cebe/markdown" + }, "time": "2018-03-26T11:24:36+00:00" }, { @@ -318,6 +329,10 @@ "parser", "php" ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -336,16 +351,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.24", + "version": "2.1.25", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448" + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", "shasum": "" }, "require": { @@ -390,13 +405,17 @@ "validation", "validator" ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" + }, "funding": [ { "url": "https://github.com/egulias", "type": "github" } ], - "time": "2020-11-14T15:56:27+00:00" + "time": "2020-12-29T14:50:06+00:00" }, { "name": "explosivebit/arangodb", @@ -456,6 +475,10 @@ "keywords": [ "html" ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/master" + }, "time": "2020-06-29T00:56:53+00:00" }, { @@ -517,6 +540,10 @@ "stream", "zip" ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/master" + }, "funding": [ { "url": "https://opencollective.com/zipstream", @@ -618,6 +645,10 @@ "complex", "mathematics" ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8" + }, "time": "2020-08-26T10:42:07+00:00" }, { @@ -688,6 +719,10 @@ "matrix", "vector" ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/PHP8" + }, "time": "2020-08-28T17:11:00+00:00" }, { @@ -733,6 +768,10 @@ "xls", "yii2" ], + "support": { + "issues": "https://github.com/moonlandsoft/yii2-phpexcel/issues", + "source": "https://github.com/moonlandsoft/yii2-phpexcel/tree/master" + }, "time": "2018-10-27T03:52:57+00:00" }, { @@ -779,6 +818,10 @@ "keywords": [ "enum" ], + "support": { + "issues": "https://github.com/myclabs/php-enum/issues", + "source": "https://github.com/myclabs/php-enum/tree/1.7.7" + }, "funding": [ { "url": "https://github.com/mnapoli", @@ -805,7 +848,7 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.16.1", + "version": "1.16.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", @@ -898,6 +941,10 @@ "xls", "xlsx" ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.16.0" + }, "time": "2020-12-31T18:03:49+00:00" }, { @@ -947,6 +994,9 @@ "psr", "psr-18" ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, "time": "2020-06-29T06:28:15+00:00" }, { @@ -999,6 +1049,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, "time": "2019-04-30T12:38:16+00:00" }, { @@ -1049,6 +1102,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -1097,20 +1153,23 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.4", + "version": "v6.2.5", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e" + "reference": "698a6a9f54d7eb321274de3ad19863802c879fb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", - "reference": "56f0ab23f54c4ccbb0d5dcc67ff8552e0c98d59e", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/698a6a9f54d7eb321274de3ad19863802c879fb7", + "reference": "698a6a9f54d7eb321274de3ad19863802c879fb7", "shasum": "" }, "require": { @@ -1160,7 +1219,7 @@ ], "support": { "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.4" + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.5" }, "funding": [ { @@ -1172,20 +1231,20 @@ "type": "tidelift" } ], - "time": "2020-12-08T18:02:06+00:00" + "time": "2021-01-12T09:35:59+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c536646fdb4f29104dd26effc2fdcb9a5b085024" + "reference": "b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c536646fdb4f29104dd26effc2fdcb9a5b085024", - "reference": "c536646fdb4f29104dd26effc2fdcb9a5b085024", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6", + "reference": "b34bfb8c4c22650ac080d2662ae3502e5f2f4ae6", "shasum": "" }, "require": { @@ -1197,7 +1256,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1235,6 +1294,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1249,20 +1311,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117" + "reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117", - "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", + "reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", "shasum": "" }, "require": { @@ -1276,7 +1338,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1319,6 +1381,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1333,20 +1398,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "727d1096295d807c309fb01a851577302394c897" + "reference": "6e971c891537eb617a00bb07a43d182a6915faba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897", - "reference": "727d1096295d807c309fb01a851577302394c897", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", + "reference": "6e971c891537eb617a00bb07a43d182a6915faba", "shasum": "" }, "require": { @@ -1358,7 +1423,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1400,6 +1465,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1414,20 +1482,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T17:09:11+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531" + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531", - "reference": "39d483bdf39be819deabf04ec872eb0b2410b531", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", + "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13", "shasum": "" }, "require": { @@ -1439,7 +1507,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1477,6 +1545,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1491,20 +1562,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930" + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930", - "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", "shasum": "" }, "require": { @@ -1513,7 +1584,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1550,6 +1621,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1564,7 +1638,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "triagens/arangodb", @@ -1621,6 +1695,10 @@ "multi-model", "nosql" ], + "support": { + "issues": "https://github.com/arangodb/arangodb-php/issues", + "source": "https://github.com/arangodb/arangodb-php/tree/v3.6.0" + }, "time": "2019-12-02T13:11:34+00:00" }, { @@ -1672,6 +1750,10 @@ "sass", "web" ], + "support": { + "issues": "https://github.com/twbs/bootstrap/issues", + "source": "https://github.com/twbs/bootstrap/tree/v4.5.3" + }, "funding": [ { "url": "https://opencollective.com/bootstrap", @@ -1682,16 +1764,16 @@ }, { "name": "yiisoft/yii2", - "version": "2.0.39.3", + "version": "2.0.40", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-framework.git", - "reference": "7c3b93b57e568509a7cb5cef826d8c424a779f3f" + "reference": "debb520c1d72a2c97c09d70a2a2a4f600ef3958e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/7c3b93b57e568509a7cb5cef826d8c424a779f3f", - "reference": "7c3b93b57e568509a7cb5cef826d8c424a779f3f", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/debb520c1d72a2c97c09d70a2a2a4f600ef3958e", + "reference": "debb520c1d72a2c97c09d70a2a2a4f600ef3958e", "shasum": "" }, "require": { @@ -1778,6 +1860,13 @@ "framework", "yii2" ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "source": "https://github.com/yiisoft/yii2", + "wiki": "http://www.yiiframework.com/wiki/" + }, "funding": [ { "url": "https://github.com/yiisoft", @@ -1792,7 +1881,7 @@ "type": "tidelift" } ], - "time": "2020-11-23T19:17:58+00:00" + "time": "2020-12-23T15:44:43+00:00" }, { "name": "yiisoft/yii2-bootstrap", @@ -1855,6 +1944,13 @@ "bootstrap", "yii2" ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2-bootstrap/issues", + "source": "https://github.com/yiisoft/yii2-bootstrap", + "wiki": "http://www.yiiframework.com/wiki/" + }, "time": "2019-04-23T13:18:43+00:00" }, { @@ -1910,6 +2006,13 @@ "extension installer", "yii2" ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2-composer/issues", + "source": "https://github.com/yiisoft/yii2-composer", + "wiki": "http://www.yiiframework.com/wiki/" + }, "funding": [ { "url": "https://github.com/yiisoft", @@ -1974,6 +2077,13 @@ "swiftmailer", "yii2" ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2-swiftmailer/issues", + "source": "https://github.com/yiisoft/yii2-swiftmailer", + "wiki": "http://www.yiiframework.com/wiki/" + }, "time": "2018-09-23T22:00:47+00:00" } ], @@ -2035,20 +2145,24 @@ "gherkin", "parser" ], + "support": { + "issues": "https://github.com/Behat/Gherkin/issues", + "source": "https://github.com/Behat/Gherkin/tree/master" + }, "time": "2020-03-17T14:03:26+00:00" }, { "name": "codeception/codeception", - "version": "4.1.12", + "version": "4.1.15", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "fc550bf6e90d69fbfc8ab7e9e0a330ac98ffafdd" + "reference": "9b174d18ba58bb2e8cc4cecce619d6124df1d83a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/fc550bf6e90d69fbfc8ab7e9e0a330ac98ffafdd", - "reference": "fc550bf6e90d69fbfc8ab7e9e0a330ac98ffafdd", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/9b174d18ba58bb2e8cc4cecce619d6124df1d83a", + "reference": "9b174d18ba58bb2e8cc4cecce619d6124df1d83a", "shasum": "" }, "require": { @@ -2120,13 +2234,17 @@ "functional testing", "unit testing" ], + "support": { + "issues": "https://github.com/Codeception/Codeception/issues", + "source": "https://github.com/Codeception/Codeception/tree/4.1.15" + }, "funding": [ { "url": "https://opencollective.com/codeception", "type": "open_collective" } ], - "time": "2020-11-16T06:36:57+00:00" + "time": "2021-01-17T19:19:40+00:00" }, { "name": "codeception/lib-asserts", @@ -2176,20 +2294,24 @@ "keywords": [ "codeception" ], + "support": { + "issues": "https://github.com/Codeception/lib-asserts/issues", + "source": "https://github.com/Codeception/lib-asserts/tree/1.13.2" + }, "time": "2020-10-21T16:26:20+00:00" }, { "name": "codeception/lib-innerbrowser", - "version": "1.3.4", + "version": "1.3.6", "source": { "type": "git", "url": "https://github.com/Codeception/lib-innerbrowser.git", - "reference": "fd921e089147057b456ca3660de72112167e40a4" + "reference": "41b79ba6761001bdb1f373a347400180693ad4e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/fd921e089147057b456ca3660de72112167e40a4", - "reference": "fd921e089147057b456ca3660de72112167e40a4", + "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/41b79ba6761001bdb1f373a347400180693ad4e7", + "reference": "41b79ba6761001bdb1f373a347400180693ad4e7", "shasum": "" }, "require": { @@ -2232,7 +2354,11 @@ "keywords": [ "codeception" ], - "time": "2020-10-22T05:45:03+00:00" + "support": { + "issues": "https://github.com/Codeception/lib-innerbrowser/issues", + "source": "https://github.com/Codeception/lib-innerbrowser/tree/1.3.6" + }, + "time": "2021-01-17T11:21:09+00:00" }, { "name": "codeception/module-asserts", @@ -2285,6 +2411,10 @@ "asserts", "codeception" ], + "support": { + "issues": "https://github.com/Codeception/module-asserts/issues", + "source": "https://github.com/Codeception/module-asserts/tree/1.3.1" + }, "time": "2020-10-21T16:48:15+00:00" }, { @@ -2333,26 +2463,30 @@ "codeception", "filesystem" ], + "support": { + "issues": "https://github.com/Codeception/module-filesystem/issues", + "source": "https://github.com/Codeception/module-filesystem/tree/1.0.3" + }, "time": "2020-10-24T14:46:40+00:00" }, { "name": "codeception/module-webdriver", - "version": "1.1.4", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/Codeception/module-webdriver.git", - "reference": "f719edc1eca033e0dc5fd8d99db122070b1fb933" + "reference": "63ea08880a44df809bdfbca08597e1b68cee9f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/f719edc1eca033e0dc5fd8d99db122070b1fb933", - "reference": "f719edc1eca033e0dc5fd8d99db122070b1fb933", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/63ea08880a44df809bdfbca08597e1b68cee9f87", + "reference": "63ea08880a44df809bdfbca08597e1b68cee9f87", "shasum": "" }, "require": { "codeception/codeception": "^4.0", "php": ">=5.6.0 <9.0", - "php-webdriver/webdriver": "^1.6.0" + "php-webdriver/webdriver": "^1.8.0" }, "suggest": { "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" @@ -2385,29 +2519,30 @@ "browser-testing", "codeception" ], - "time": "2020-11-16T06:50:15+00:00" + "support": { + "issues": "https://github.com/Codeception/module-webdriver/issues", + "source": "https://github.com/Codeception/module-webdriver/tree/1.2.0" + }, + "time": "2021-01-17T19:23:20+00:00" }, { "name": "codeception/module-yii2", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/Codeception/module-yii2.git", - "reference": "0e33d34991b58ffe7f2cae7158ae4221b677ec66" + "reference": "7e2eaeb414315271d545e17c330b3aaf08911927" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-yii2/zipball/0e33d34991b58ffe7f2cae7158ae4221b677ec66", - "reference": "0e33d34991b58ffe7f2cae7158ae4221b677ec66", + "url": "https://api.github.com/repos/Codeception/module-yii2/zipball/7e2eaeb414315271d545e17c330b3aaf08911927", + "reference": "7e2eaeb414315271d545e17c330b3aaf08911927", "shasum": "" }, "require": { "codeception/codeception": "^4.0", "codeception/lib-innerbrowser": "^1.0", - "php": ">=5.6.0 <8.0" - }, - "require-dev": { - "codeception/util-robohelpers": "dev-master" + "php": ">=5.6.0 <8.1" }, "type": "library", "autoload": { @@ -2436,20 +2571,24 @@ "codeception", "yii2" ], - "time": "2020-08-28T06:50:26+00:00" + "support": { + "issues": "https://github.com/Codeception/module-yii2/issues", + "source": "https://github.com/Codeception/module-yii2/tree/1.1.2" + }, + "time": "2020-12-21T15:21:56+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "9.0.5", + "version": "9.0.6", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "72bac7770866799e23a7dda1ac6bec2f8baccf45" + "reference": "b0c06abb3181eedca690170f7ed0fd26a70bfacc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/72bac7770866799e23a7dda1ac6bec2f8baccf45", - "reference": "72bac7770866799e23a7dda1ac6bec2f8baccf45", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/b0c06abb3181eedca690170f7ed0fd26a70bfacc", + "reference": "b0c06abb3181eedca690170f7ed0fd26a70bfacc", "shasum": "" }, "require": { @@ -2458,6 +2597,7 @@ }, "require-dev": { "codeception/specify": "*", + "consolidation/robo": "^3.0.0-alpha3", "vlucas/phpdotenv": "^3.0" }, "type": "library", @@ -2480,7 +2620,11 @@ } ], "description": "PHPUnit classes used by Codeception", - "time": "2020-10-11T18:14:42+00:00" + "support": { + "issues": "https://github.com/Codeception/phpunit-wrapper/issues", + "source": "https://github.com/Codeception/phpunit-wrapper/tree/9.0.6" + }, + "time": "2020-12-28T13:59:47+00:00" }, { "name": "codeception/specify", @@ -2556,6 +2700,10 @@ "MIT" ], "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", + "support": { + "issues": "https://github.com/Codeception/Stub/issues", + "source": "https://github.com/Codeception/Stub/tree/3.7.0" + }, "time": "2020-07-03T15:54:43+00:00" }, { @@ -2601,6 +2749,10 @@ } ], "description": "BDD assertion library for PHPUnit", + "support": { + "issues": "https://github.com/Codeception/Verify/issues", + "source": "https://github.com/Codeception/Verify/tree/2.1.1" + }, "time": "2020-12-18T16:18:31+00:00" }, { @@ -2652,6 +2804,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -2714,6 +2870,10 @@ "faker", "fixtures" ], + "support": { + "issues": "https://github.com/FakerPHP/Faker/issues", + "source": "https://github.com/FakerPHP/Faker/tree/v1.13.0" + }, "time": "2020-12-18T16:50:48+00:00" }, { @@ -2785,6 +2945,10 @@ "uri", "url" ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.7.0" + }, "time": "2020-09-30T07:37:11+00:00" }, { @@ -2833,6 +2997,10 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", @@ -2843,16 +3011,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.10.3", + "version": "v4.10.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984" + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", - "reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", "shasum": "" }, "require": { @@ -2893,9 +3061,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.3" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" }, - "time": "2020-12-03T17:45:45+00:00" + "time": "2020-12-20T10:01:03+00:00" }, { "name": "opis/closure", @@ -2956,6 +3124,10 @@ "serialization", "serialize" ], + "support": { + "issues": "https://github.com/opis/closure/issues", + "source": "https://github.com/opis/closure/tree/3.6.1" + }, "time": "2020-11-07T02:01:34+00:00" }, { @@ -3012,6 +3184,10 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, "time": "2020-06-27T14:33:11+00:00" }, { @@ -3059,6 +3235,10 @@ } ], "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.0.4" + }, "time": "2020-12-13T23:18:30+00:00" }, { @@ -3126,6 +3306,10 @@ "selenium", "webdriver" ], + "support": { + "issues": "https://github.com/php-webdriver/php-webdriver/issues", + "source": "https://github.com/php-webdriver/php-webdriver/tree/1.9.0" + }, "time": "2020-11-19T15:21:05+00:00" }, { @@ -3175,6 +3359,10 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, "time": "2020-06-27T09:03:43+00:00" }, { @@ -3227,6 +3415,10 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, "time": "2020-09-03T19:13:55+00:00" }, { @@ -3272,6 +3464,10 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, "time": "2020-09-17T18:55:26+00:00" }, { @@ -3310,20 +3506,23 @@ } ], "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", + "support": { + "source": "https://github.com/phpspec/php-diff/tree/v1.1.3" + }, "time": "2020-09-18T13:47:07+00:00" }, { "name": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { @@ -3335,7 +3534,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -3373,7 +3572,11 @@ "spy", "stub" ], - "time": "2020-09-29T09:10:42+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + }, + "time": "2020-12-19T10:15:11+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3440,6 +3643,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -3496,6 +3703,10 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -3555,6 +3766,10 @@ "keywords": [ "process" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -3610,6 +3825,10 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -3665,6 +3884,10 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -3675,16 +3898,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.0", + "version": "9.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe" + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", - "reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", + "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", "shasum": "" }, "require": { @@ -3762,7 +3985,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.0" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.1" }, "funding": [ { @@ -3774,7 +3997,7 @@ "type": "github" } ], - "time": "2020-12-04T05:05:53+00:00" + "time": "2021-01-17T07:42:25+00:00" }, { "name": "psr/container", @@ -3823,6 +4046,10 @@ "container-interop", "psr" ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/master" + }, "time": "2017-02-14T16:28:37+00:00" }, { @@ -3869,6 +4096,10 @@ "psr", "psr-14" ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, "time": "2019-01-08T18:20:26+00:00" }, { @@ -3909,6 +4140,10 @@ } ], "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" }, { @@ -3955,6 +4190,10 @@ ], "description": "Library for parsing CLI options", "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4007,6 +4246,10 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4058,6 +4301,10 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4128,6 +4375,10 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4181,6 +4432,10 @@ ], "description": "Library for calculating the complexity of PHP code units", "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4243,6 +4498,10 @@ "unidiff", "unified diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4302,6 +4561,10 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4375,6 +4638,10 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4435,6 +4702,10 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4488,6 +4759,10 @@ ], "description": "Library for counting the lines of code in PHP source code", "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4541,6 +4816,10 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4592,6 +4871,10 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4651,6 +4934,10 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4702,6 +4989,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4754,6 +5045,10 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.1" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4803,6 +5098,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -4863,6 +5162,9 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/browser-kit/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -4957,6 +5259,9 @@ "console", "terminal" ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5019,6 +5324,9 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5083,6 +5391,9 @@ ], "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/master" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5154,6 +5465,9 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5236,6 +5550,9 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5312,6 +5629,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.2.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5370,6 +5690,9 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5388,16 +5711,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41", - "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { @@ -5409,7 +5732,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5446,6 +5769,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5460,20 +5786,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c" + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", - "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af", + "reference": "267a9adeb8ecb8071040a740930e077cdfb987af", "shasum": "" }, "require": { @@ -5485,7 +5811,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5524,6 +5850,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5538,20 +5867,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed", - "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { @@ -5560,7 +5889,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5600,6 +5929,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5614,20 +5946,20 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.20.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de", - "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { @@ -5636,7 +5968,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.20-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5680,6 +6012,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5694,7 +6029,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T14:02:19+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", @@ -5739,6 +6074,9 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5815,6 +6153,9 @@ "interoperability", "standards" ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/master" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5895,6 +6236,9 @@ "utf-8", "utf8" ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -5967,6 +6311,9 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v5.2.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -6021,6 +6368,10 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, "funding": [ { "url": "https://github.com/theseer", @@ -6076,20 +6427,24 @@ "check", "validate" ], + "support": { + "issues": "https://github.com/webmozart/assert/issues", + "source": "https://github.com/webmozart/assert/tree/master" + }, "time": "2020-07-08T17:02:28+00:00" }, { "name": "yiisoft/yii2-debug", - "version": "2.1.15", + "version": "2.1.16", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-debug.git", - "reference": "317f85c1ac7a8c0b73eea345a49066b5570aa2c6" + "reference": "0d8ce76b2dd036a5fc38b26434e1c672ad8975a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/317f85c1ac7a8c0b73eea345a49066b5570aa2c6", - "reference": "317f85c1ac7a8c0b73eea345a49066b5570aa2c6", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/0d8ce76b2dd036a5fc38b26434e1c672ad8975a9", + "reference": "0d8ce76b2dd036a5fc38b26434e1c672ad8975a9", "shasum": "" }, "require": { @@ -6145,6 +6500,13 @@ "debugger", "yii2" ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2-debug/issues", + "source": "https://github.com/yiisoft/yii2-debug", + "wiki": "http://www.yiiframework.com/wiki/" + }, "funding": [ { "url": "https://github.com/yiisoft", @@ -6159,7 +6521,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T10:09:11+00:00" + "time": "2020-12-23T16:36:12+00:00" }, { "name": "yiisoft/yii2-faker", @@ -6220,6 +6582,13 @@ "faker", "yii2" ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2-faker/issues", + "source": "https://github.com/yiisoft/yii2-faker", + "wiki": "http://www.yiiframework.com/wiki/" + }, "funding": [ { "url": "https://github.com/yiisoft", @@ -6315,8 +6684,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4.0" + "php": "^8.0.0" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/mirzaev/skillparts/system/config/web.php.example b/mirzaev/skillparts/system/config/web.php.example index bb36ea9..e69bb90 100644 --- a/mirzaev/skillparts/system/config/web.php.example +++ b/mirzaev/skillparts/system/config/web.php.example @@ -68,12 +68,19 @@ $config = [ 'class' => 'carono\exchange1c\ExchangeModule', 'groupClass' => 'app\models\SupplyGroup', 'productClass' => 'app\models\Supply', - 'offerClass' => 'app\models\Product', + 'offerClass' => 'app\models\SupplyEdgeProduct', 'partnerClass' => 'app\models\Account', 'documentClass' => 'app\models\Purchase', 'auth' => function ($mail, $pswd) { // Необходимо уничтожить AccountForm - return (new \app\models\AccountForm())->authentication($mail, $pswd); + // return (new \app\models\AccountForm())->authentication($mail, $pswd); + + if ($user = \app\models\Account::findByMail($mail)) { + if ($user->validatePassword($pswd)) { + return $user; + } + } + return false; } ] ], diff --git a/mirzaev/skillparts/system/models/Account.php b/mirzaev/skillparts/system/models/Account.php index 6cb5ee4..5a9cdb3 100644 --- a/mirzaev/skillparts/system/models/Account.php +++ b/mirzaev/skillparts/system/models/Account.php @@ -17,7 +17,16 @@ class Account extends Document implements IdentityInterface, PartnerInterface { return array_merge( parent::attributes(), - ['mail', 'pswd', 'name', 'simc', 'sity', 'comp', 'taxn', 'auth'] + [ + 'mail', + 'pswd', + 'name', + 'simc', + 'sity', + 'comp', + 'taxn', + 'auth' + ] ); } @@ -73,11 +82,16 @@ class Account extends Document implements IdentityInterface, PartnerInterface ]; } - public function getId() + public function getId(): string { return $this->_key; } + public function readId(): string + { + return self::collectionName() . '/' . $this->getId(); + } + public function getAuthKey() { return $this->auth; diff --git a/mirzaev/skillparts/system/models/Document.php b/mirzaev/skillparts/system/models/Document.php index 1b48a67..2158e16 100644 --- a/mirzaev/skillparts/system/models/Document.php +++ b/mirzaev/skillparts/system/models/Document.php @@ -2,30 +2,36 @@ namespace app\models; +use Yii; use explosivebit\arangodb\ActiveRecord; abstract class Document extends ActiveRecord { public function attributes() - { - return ['_key', 'date']; - } - - public function rules() { return [ - // [ - // 'date', - // 'required', - // 'message' => 'Заполните поле: {attribute}' - // ] + '_key', + 'date', + 'writer' ]; } public function attributeLabels() { return [ - 'date' => 'Дата' + 'date' => 'Дата', + 'writer' => 'Аккаунт записавшего' + ]; + } + + public function rules() + { + return [ + [ + 'writer', + 'string' + // Надо добавить проверку существования аккаунта + ] ]; } @@ -33,16 +39,23 @@ abstract class Document extends ActiveRecord { if (parent::beforeSave($data)) { if ($this->isNewRecord) { - $this->date = time(); } + $this->date = time(); + $this->writer = $this->writer ?? Yii::$app->user->identity->readId(); + return true; } return false; } - public static function readAmount() + public function readId(): ?string + { + return isset($this->_key) ? static::collectionName() . '/' . $this->_key : null; + } + + public static function readAmount(): int { return static::find()->count(); } diff --git a/mirzaev/skillparts/system/models/Edge.php b/mirzaev/skillparts/system/models/Edge.php index e358c3d..7f4ffd5 100644 --- a/mirzaev/skillparts/system/models/Edge.php +++ b/mirzaev/skillparts/system/models/Edge.php @@ -4,53 +4,89 @@ namespace app\models; use explosivebit\arangodb\ActiveRecord; -abstract class Edge extends ActiveRecord +abstract class Edge extends Document { public function attributes() { - return ['_key', '_from', '_to', 'date', 'type', 'account']; - } - - public function rules() - { - return [ + return array_merge( + parent::attributes(), [ - ['_from', '_to', 'date', 'type', 'account'], - 'required', - 'message' => 'Заполните поле: {attribute}' - ], - [ - 'date', - 'integer' - ], - [ - 'type', - 'string' - ], - [ - 'account', - 'string' - // Надо добавить проверку существования аккаунта + '_from', + '_to', + 'type' ] - ]; + ); } public function attributeLabels() { - return [ - 'date' => 'Дата', - 'type' => 'Тип', - 'account' => 'Аккаунт' - ]; + return array_merge( + parent::attributeLabels(), + [ + 'date' => 'От кого', + 'date' => 'К кому', + 'type' => 'Тип' + ] + ); + } + + public function rules() + { + return array_merge( + parent::rules(), + [ + [ + ['_from', '_to'], + 'required', + 'message' => 'Заполните поле: {attribute}' + ], + [ + 'type', + 'string' + ] + ] + ); + } + + /** + * Записать + */ + public function write(string $_from, string $_to, string $type = '', array $data = []): ?static + { + // Инициализация + $edge = isset($this->_key) ? $this : new static; + + // Настройка + $edge->_from = $_from; + $edge->_to = $_to; + $edge->type = $type; + + foreach ($data as $key => $value) { + if(is_int($key)) { + // Если ключ задан автоматически + + $edge->{$value} = true; + } else { + // Иначе ключ записан вручную + + $edge->{$key} = $value; + } + } + + // Запись + $edge->save(); + + return $edge; } public function beforeSave($data) { if (parent::beforeSave($data)) { if ($this->isNewRecord) { - $this->date = time(); } + $this->type = $this->type ?? ''; + return true; } diff --git a/mirzaev/skillparts/system/models/Product.php b/mirzaev/skillparts/system/models/Product.php index 8ab6950..fc0ba04 100644 --- a/mirzaev/skillparts/system/models/Product.php +++ b/mirzaev/skillparts/system/models/Product.php @@ -3,30 +3,37 @@ namespace app\models; use moonland\phpexcel\Excel; -use carono\exchange1c\interfaces\ProductInterface; -use Zenwalker\CommerceML\Model\Product as Product1c; -class Product extends Document implements ProductInterface +class Product extends Document { const SCENARIO_IMPORT = 'import'; + const SCENARIO_WRITE = 'write'; public $file; public $group; - public static function collectionName() + public static function collectionName(): string { return 'product'; } - public function attributes() + public function attributes(): array { return array_merge( parent::attributes(), - ['name', 'catn', 'oemn', 'data', 'cost', 'time'] + [ + 'name', + 'ocid', + 'catn', + 'oemn' + // 'data', + // 'cost', + // 'time' + ] ); } - public function rules() + public function rules(): array { return array_merge( parent::rules(), @@ -35,6 +42,7 @@ class Product extends Document implements ProductInterface ['name', 'catn'], 'required', 'message' => 'Заполните поля: {attribute}', + 'on' => self::SCENARIO_WRITE, 'except' => self::SCENARIO_IMPORT ], [ @@ -43,7 +51,7 @@ class Product extends Document implements ProductInterface 'message' => 'Заполните поля: {attribute}', 'on' => self::SCENARIO_IMPORT ], - ['catn', 'integer', 'message' => '{attribute} должен быть числом'], + ['catn', 'string', 'message' => '{attribute} должен быть строкой'], // ['oemn', 'integer'], Нужна своя проверка на массив [ 'file', @@ -61,37 +69,24 @@ class Product extends Document implements ProductInterface ); } - public function attributeLabels() + public function attributeLabels(): array { return array_merge( parent::attributeLabels(), [ 'name' => 'Название (name)', + 'ocid' => 'Идентификатор 1C (ocid)', 'catn' => 'Каталожный номер (catn)', 'oemn' => 'OEM номера (oemn)', - 'data' => 'Данные товара (data)', - 'cost' => 'Цены (cost)', - 'time' => 'Сроки доставки (time)', + // 'data' => 'Данные товара (data)', + // 'cost' => 'Цены (cost)', + // 'time' => 'Сроки доставки (time)', 'file' => 'Документ', - 'group' => 'Группа', + 'group' => 'Группа' ] ); } - public function beforeSave($data) - { - if (parent::beforeSave($data)) { - if ($this->isNewRecord) { - // Надо избавиться от unset(); - unset($this->_key); - } - - return true; - } - - return false; - } - public function import() { // Инициализация массива данных @@ -144,171 +139,6 @@ class Product extends Document implements ProductInterface return false; } - /** - * Установка реквизитов для продукта - */ - // public function setRequisite1c(string $name, string $value): bool - public function setRequisite1c($name, $value): bool - { - if (!$requisite = Requisite::readByName($name)) { - // Реквизиты не найдены - - // Инициализация - $requisite = new Requisite(); - - $requisite->name = $name; - $requisite->value = $value; - - // Запись - return $requisite->save(); - } - - return false; - } - - /** - * Установка группы, где находится продукт - */ - // public function setGroup1c(ProductGroup $group): bool - public function setGroup1c($group): bool - { - // Чтение группы - $group = SupplyGroup::readByOnecName($group->id)[0]; - - // Запись ребра: ПОСТАВКА => ГРУППА ПОСТАВОК - return static::writeEdgeBetweenGroup(static::collectionName() . '/' . $this->_key, $group->collectionName() . '/' . $group->_key); - } - - /** - * Запись всех параметров. Вызывается 1 раз при импорте - */ - public static function createProperties1c($properties): void - { - // Это нам не нужно, кажется, надо будет тестить - - /** - * @var \Zenwalker\CommerceML\Model\Property $property - */ - // foreach ($properties as $property) { - // $propertyModel = Property::createByMl($property); - // foreach ($property->getAvailableValues() as $value) { - // if (!$propertyValue = PropertyValue::findOne(['onec_name' => $value->id])) { - // $propertyValue = new PropertyValue(); - // $propertyValue->name = (string)$value->Значение; - // $propertyValue->property_id = $propertyModel->id; - // $propertyValue->onec_name = (string)$value->ИдЗначения; - // $propertyValue->save(); - // unset($propertyValue); - // } - // } - // } - } - - /** - * $property - Свойство товара (import.xml > Классификатор > Свойства > Свойство) - * $property->value - Разыменованное значение (string) (import.xml > Классификатор > Свойства > Свойство > Значение) - * $property->getValueModel() - Данные по значению, Ид значения, и т.д (import.xml > Классификатор > Свойства > Свойство > ВариантыЗначений > Справочник) - * - * @param MlProperty $property - * @return void - */ - public function setProperty1c($property): void - { - // Это тоже нам не нужно - - // $propertyModel = Property::findOne(['onec_name' => $property->id]); - // $propertyValue = $property->getValueModel(); - // if ($propertyAccountingId = (string)$propertyValue->ИдЗначения) { - // $value = PropertyValue::findOne(['onec_name' => $propertyAccountingId]); - // $attributes = ['property_value_id' => $value->id]; - // } else { - // $attributes = ['value' => $propertyValue->value]; - // } - // $this->addPivot($propertyModel, PvProductProperty::class, $attributes); - } - - /** - * В этой фукнции мы получаем абсолютный путь до картинки и название изрбражения (для alt аттрибута) - * - * @param string $path - * @param string $caption - * @return mixed - */ - public function addImage1c($path, $caption): bool - { - // if (!$this->getImages()->andWhere(['md5' => md5_file($path)])->exists()) { - // $this->addPivot(FileUpload::startUpload($path)->process(), PvProductImage::class, ['caption' => $caption]); - // } - - return false; - } - - /** - * В эту фукнцию отправляется xml данные предложения из файла - */ - // public function getOffer1c(Supply $offer): Supply - public function getOffer1c($offer): Supply - { - $supply = Supply::createByMl($offer); - $supply->product_id = $this->id; - if ($supply->getDirtyAttributes()) { - $supply->save(); - } - - return $supply; - } - - /** - * @param MlOffer $offer - */ - public static function createByMl($offer): Supply - { - if (!$model = static::readByOnecName($offer->id)) { - // Нет записей в базе данных - - // Инициализация - $model = new static; - - $model->name = (string) $offer->name; - $model->onec_name = (string) $offer->id; - } - - $model->remnant = (string) $offer->Количество; - - return $model; - } - - /** - * @param $product - * @return self - */ - public static function createModel1c($product): static - { - if (!$model = static::findOne(['onec_name' => $product->id])) { - $model = new static(); - $model->onec_name = $product->id; - } - $model->name = $product->name; - $model->description = (string) $product->Описание; - $model->article = (string) $product->Артикул; - - $model->save(); - - return $model; - } - - public function setRaw1cData($cml, $object) - { - } - - /** - * Название поля в котором хранится ID из 1C - */ - public static function getIdFieldName1c(): string - { - return 'onec_name'; - } - private static function writeEdgeBetweenGroup(string $from, string $to): bool { // Инициализация @@ -337,16 +167,14 @@ class Product extends Document implements ProductInterface public static function readById(string $_key): ?Product { - return Product::findOne(['_key' => $_key]); + return self::findOne(['_key' => $_key]); } - public function getGroup1c(): ProductGroup + /** + * Поиск по каталожному номеру + */ + public static function readByCatn(string $catn): ?Product { - return $this->group; - } - - public static function readByOnecName(string $name): ?Product - { - return static::findOne([static::getIdFieldName1c() => $name]); + return self::findOne(['catn' => $catn]); } } diff --git a/mirzaev/skillparts/system/models/ProductGroup.php b/mirzaev/skillparts/system/models/ProductGroup.php index 648a20d..28d1527 100644 --- a/mirzaev/skillparts/system/models/ProductGroup.php +++ b/mirzaev/skillparts/system/models/ProductGroup.php @@ -16,7 +16,7 @@ class ProductGroup extends Document implements GroupInterface { return array_merge( parent::attributes(), - ['name', 'onec_name', 'onec_prnt_name'] + ['name', 'onec_id', 'onec_prnt_id'] ); } @@ -40,8 +40,8 @@ class ProductGroup extends Document implements GroupInterface parent::attributeLabels(), [ 'name' => 'Название (name)', - 'onec_name' => 'Название 1C (onec_name)', - 'onec_prnt_name' => 'Название родителя 1C (onec_prnt_name)', + 'onec_id' => 'Название 1C (onec_id)', + 'onec_prnt_id' => 'Название родителя 1C (onec_prnt_id)', ] ); } @@ -95,13 +95,13 @@ class ProductGroup extends Document implements GroupInterface */ public static function createByML(Group $group): static|array|null { - if (!$model = static::readByOnecName($group->id)) { + if (!$model = static::readByOnecId($group->id)) { // Группа не найдена // Инициализация $model = new static; - $model->onec_name = $group->id; + $model->onec_id = $group->id; } $model->name = $group->name; @@ -112,11 +112,11 @@ class ProductGroup extends Document implements GroupInterface // Инициализация (рекурсия) $parentModel = static::createByML($parent); - $model->onec_prnt_name = $parentModel->id; + $model->onec_prnt_id = $parentModel->id; unset($parentModel); } else { - $model->onec_prnt_name = null; + $model->onec_prnt_id = null; } $model->save(); @@ -165,11 +165,11 @@ class ProductGroup extends Document implements GroupInterface */ public static function getIdFieldName1c(): string { - return 'onec_name'; + return 'onec_id'; } - public static function readByOnecName(string $name): ?Product + public static function readByOnecId(string $onec_id): ?ProductGroup { - return static::findOne([static::getIdFieldName1c() => $name]); + return static::findOne(['onec_id' => $onec_id]); } } diff --git a/mirzaev/skillparts/system/models/Purchase.php b/mirzaev/skillparts/system/models/Purchase.php index f349fb0..35622be 100644 --- a/mirzaev/skillparts/system/models/Purchase.php +++ b/mirzaev/skillparts/system/models/Purchase.php @@ -6,15 +6,15 @@ use carono\exchange1c\interfaces\DocumentInterface; class Purchase extends Document implements DocumentInterface { - public static function collectionName() + public static function collectionName(): string { - return 'requisite'; + return 'purchase'; } /** * @return DocumentInterface[] */ - public static function findDocuments1c() + public static function findDocuments1c(): ?self { return self::find()->andWhere(['status_id' => 2])->all(); } @@ -22,13 +22,14 @@ class Purchase extends Document implements DocumentInterface /** * @return OfferInterface[] */ - public function getOffers1c() + public function getOffers1c(): mixed { - return $this->offers; + return true; } - public function getRequisites1c() + public function getRequisites1c(): mixed { + return true; } /** @@ -36,32 +37,15 @@ class Purchase extends Document implements DocumentInterface * * @return PartnerInterface */ - public function getPartner1c() + public function getPartner1c(): Account { - return $this->user; + // !!!!!!!!!!!!!!!!!!! + return $this->user ?? new Account; } public function getExportFields1c($context = null) { - return [ - 'Ид' => 'id', - 'Наименование' => 'login', - 'ПолноеНаименование' => 'full_name', - 'Фамилия' => 'surname', - 'Имя' => 'name', - 'Контакты' => [ - [ - '@name' => 'Контакт', - 'Тип' => 'Почта', - 'Значение' => $this->email, - ], - [ - '@name' => 'Контакт', - 'Тип' => 'ТелефонРабочий', - 'Значение' => $this->phone, - ], - ], - ]; + return []; } /** @@ -71,10 +55,10 @@ class Purchase extends Document implements DocumentInterface */ public static function getIdFieldName1c() { - return 'accounting_id'; + return 'onec["Ид"]'; } - public function setRaw1cData($cml, $object) + public function setRaw1cData($cml, $object): void { } } diff --git a/mirzaev/skillparts/system/models/Supply.php b/mirzaev/skillparts/system/models/Supply.php index d5b0277..8d2226c 100644 --- a/mirzaev/skillparts/system/models/Supply.php +++ b/mirzaev/skillparts/system/models/Supply.php @@ -6,153 +6,182 @@ use Yii; use app\models\Account; use app\models\Product; use app\models\SupplyEdgeProduct; -use carono\exchange1c\interfaces\OfferInterface; +use app\models\traits\Xml2Array; +use carono\exchange1c\interfaces\ProductInterface; -class Supply extends Product implements OfferInterface +// class Supply extends Product implements OfferInterface +class Supply extends Product implements ProductInterface { - public static function collectionName() + use Xml2Array; + + public static function collectionName(): string { return 'supply'; } - public function afterSave($data, $vars) + public function attributes(): array { - if (is_null($product = self::readByCatn($this->catn))) { - // Товар не найден + return array_merge( + parent::attributes(), + [ + 'onec' + ] + ); + } - // Инициализация - $product = (new Product(array_intersect_key($this->getAttributes(), (new Product)->getAttributes()))); + public function attributeLabels(): array + { + return array_merge( + parent::attributeLabels(), + [ + 'onec' => 'Данные 1C' + ] + ); + } - // Запись - if (!$product->save()) { - return false; + public function afterSave($data, $vars): void + { + // Запись ребра: АККАУНТ -> ПОСТАВКА + (new AccountEdgeSupply)->write(Yii::$app->user->identity->readId(), $this->readId(), 'import'); + } + + public function setRequisite1c($name, $value): mixed + { + return true; + } + + /** + * Установка группы, где находится продукт + */ + public function setGroup1c($group): mixed + { + // Чтение группы + // if ($group = SupplyGroup::readByOnecId($group->id)) { + // // Запись ребра: ПОСТАВКА => ГРУППА ПОСТАВОК + // return static::writeEdgeBetweenGroup(static::collectionName() . '/' . $this->_key, $group->collectionName() . '/' . $group->_key); + // } + + return true; + } + + public static function createProperties1c($properties): mixed + { + return true; + } + + public function setProperty1c($property): mixed + { + return true; + } + + public function addImage1c($path, $caption): mixed + { + return true; + } + + /** + * Запись ребра (предложения от поставки к продукту) + */ + public function getOffer1c($offer): SupplyEdgeProduct + { + if (empty($this->catn)) { + // Не передан каталожный номер + + // Разработчику библеотеки надо дать по жопе + return new SupplyEdgeProduct; + } else if (!$catn = Product::readByCatn($this->catn)) { + // Продукт не найден + + if (!$this->initProduct()) { + // Не удалось инициализировать продукт + + // Разработчику библеотеки надо дать по жопе + return new SupplyEdgeProduct; } } - // Запись рёбер: АККАУНТ => ПОСТАВКА => ТОВАР, и проверка на то, что оба созданы - static::writeEdgeBetweenAccount(Account::collectionName() . '/' . Yii::$app->user->identity->_key, static::collectionName() . '/' . $this->_key); - static::writeEdgeBetweenProduct(static::collectionName() . '/' . $this->_key, Product::collectionName() . '/' . $product->_key); + $catn = Product::readByCatn($this->catn); + + // Запись ребра: ПОСТАВКА -> ПРОДУКТ + return (new SupplyEdgeProduct)->write( + $this->readId(), + $catn->readId(), + 'sell', + [ + 'onec' => self::xml2array($offer->xml) + ] + ); } /** - * В этом методе необходимо создать все типы цен, фукнция вызывается один раз + * Создать продукт */ - public static function createPriceTypes1c($types): void + public static function createModel1c($product): self { - foreach ($types as $type) { - // PriceType::createByMl($type); - } + // Инициализация + $model = self::readByOnecId($id = (string) $product->Ид) ?? new self; + + // Настройки + $model->ocid = $id ?? null; + $model->catn = (string) $product->Артикул; + $model->oemn = null; + $model->onec = self::xml2array($product->xml); + + // Запись + $model->save(); + + return $model; } - /** - * offers.xml > ПакетПредложений > Предложения > Предложение > Цены - * - * Цена товара, - * К $price можно обратиться как к массиву, чтобы получить список цен (Цены > Цена) - * $price->type - тип цены (offers.xml > ПакетПредложений > ТипыЦен > ТипЦены) - * - * @param \Zenwalker\CommerceML\Model\Price $price - */ + protected function initProduct(): bool + { + // Надо не забыть сделать выборку полей и ручное подключение + + if (empty($this->catn)) { + // Не передан каталожный номер + + return false; + } else if (Product::readByCatn($this->catn)) { + // Продукт уже был инициализирован + + return true; + } + + // Инициализация + $product = new Product(); + + // Настройки + $product->catn = $this->catn; + + // Запись + return $product->save(); + } + + public function setPrice1c($price): void { - // $priceType = PriceType::findOne(['accounting_id' => $price->getType()->id]); - // $priceModel = Price::createByMl($price, $this, $priceType); - // $this->addPivot($priceModel, PvOfferPrice::class); + } + + public function setRaw1cData($cml, $object): bool + { + return false; + } + + public static function readByOnecId(string $ocid): ?Supply + { + return self::findOne([self::getIdFieldName1c() => $ocid]); + } + + public function getGroup1c(): SupplyGroup + { + return $this->group; } /** - * offers.xml > ПакетПредложений > Предложения > Предложение > ХарактеристикиТовара > ХарактеристикаТовара - * - * Характеристики товара - * $name - Наименование - * $value - Значение - * - * @param \Zenwalker\CommerceML\Model\Simple $specification - * @return void + * Название поля в котором хранится ID из 1C */ - public function setSpecification1c($specification) + public static function getIdFieldName1c(): string { - // $specificationModel = Specification::createByMl($specification); - // $this->addPivot($specificationModel, PvOfferSpecification::class, ['value' => (string)$specification->Значение]); - } - - public function getExportFields1c($context = null) - { - return [ - 'Ид' => 'id', - 'Наименование' => 'login', - 'ПолноеНаименование' => 'full_name', - 'Фамилия' => 'surname', - 'Имя' => 'name', - 'Контакты' => [ - [ - '@name' => 'Контакт', - 'Тип' => 'Почта', - 'Значение' => $this->email, - ], - [ - '@name' => 'Контакт', - 'Тип' => 'ТелефонРабочий', - 'Значение' => $this->phone, - ], - ], - ]; - } - - public static function writeEdgeBetweenAccount(string $from, string $to): bool - { - // Инициализация - $edge = new AccountEdgeSupply(); - - // Настройка - $edge->_from = $from; - $edge->_to = $to; - - // Запись - return $edge->save(); - } - - private static function writeEdgeBetweenProduct(string $from, string $to): bool - { - // Инициализация - $edge = new SupplyEdgeProduct(); - - // Настройка - $edge->_from = $from; - $edge->_to = $to; - - // Запись - return $edge->save(); - } - - private static function writeEdgeBetweenGroup(string $from, string $to): bool - { - // Инициализация - $edge = new SupplyEdgeSupplyGroup(); - - // Настройка - $edge->_from = $from; - $edge->_to = $to; - - // Запись - return $edge->save(); - } - - private static function writeEdgeBetweenRequisite(string $from, string $to): bool - { - // Инициализация - $edge = new SupplyEdgeRequisite(); - - // Настройка - $edge->_from = $from; - $edge->_to = $to; - - // Запись - return $edge->save(); - } - - public static function readByCatn(string $catn): ?Product - { - return Product::findOne(['catn' => $catn]); + return 'ocid'; } } diff --git a/mirzaev/skillparts/system/models/SupplyEdgeProduct.php b/mirzaev/skillparts/system/models/SupplyEdgeProduct.php index 0f5cf21..7f51d4d 100644 --- a/mirzaev/skillparts/system/models/SupplyEdgeProduct.php +++ b/mirzaev/skillparts/system/models/SupplyEdgeProduct.php @@ -2,10 +2,76 @@ namespace app\models; -class SupplyEdgeProduct extends Edge +use app\models\traits\Xml2Array; +use carono\exchange1c\interfaces\OfferInterface; +use Zenwalker\CommerceML\Model\Offer; + +class SupplyEdgeProduct extends Edge implements OfferInterface { - public static function collectionName() + use Xml2Array; + + public static function collectionName(): string { return 'supply_edge_product'; } + + public function attributes(): array + { + return array_merge( + parent::attributes(), + [ + 'ocid', + 'onec' + ] + ); + } + + public function attributeLabels(): array + { + return array_merge( + parent::attributeLabels(), + [ + 'ocid' => 'Идентификатор 1C (ocid)', + 'onec' => 'Данные 1C' + ] + ); + } + + public static function createPriceTypes1c($types): mixed + { + return true; + } + + public function setPrice1c($price): mixed + { + return true; + } + + public function setSpecification1c($specification): mixed + { + return true; + } + + public function getExportFields1c($context = null): array + { + return []; + } + + public function getGroup1c(): ProductGroup + { + return $this->group ?? new ProductGroup; + } + + public static function readByOnecId(string $ocid): ?Supply + { + return self::findOne([self::getIdFieldName1c() => $ocid]); + } + + /** + * Название поля в котором хранится ID из 1C + */ + public static function getIdFieldName1c(): string + { + return 'ocid'; + } } diff --git a/mirzaev/skillparts/system/models/SupplyGroup.php b/mirzaev/skillparts/system/models/SupplyGroup.php index d41b34e..adbeb8d 100644 --- a/mirzaev/skillparts/system/models/SupplyGroup.php +++ b/mirzaev/skillparts/system/models/SupplyGroup.php @@ -34,9 +34,4 @@ class SupplyGroup extends ProductGroup // Запись return $edge->save(); } - - public static function readByOnecName(string $onec_name): ?Product - { - return static::findOne(['onec_name' => $onec_name]); - } } diff --git a/mirzaev/skillparts/system/models/traits/Xml2Array.php b/mirzaev/skillparts/system/models/traits/Xml2Array.php new file mode 100644 index 0000000..6c8a6c2 --- /dev/null +++ b/mirzaev/skillparts/system/models/traits/Xml2Array.php @@ -0,0 +1,13 @@ + $node) + $out[$index] = (is_object($node) || is_array($node)) ? self::xml2array($node) : $node; + + return $out; + } +} \ No newline at end of file