From cc4d2722949ba6081ef4c23ded3bd1ac916bca01 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 14:20:04 +0300 Subject: [PATCH 01/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=9E=D1=82?= =?UTF-8?q?=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=B1?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20API=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/ApiController.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/controllers/ApiController.php b/controllers/ApiController.php index d1e989c6..387635d6 100644 --- a/controllers/ApiController.php +++ b/controllers/ApiController.php @@ -98,6 +98,7 @@ public function actionList() /** * Экшен для рендеринга страницы с детальной информацией о предмете + * UPD 05.01.2025 - новые предметы не прилетают в API в связи с рефакторингом * * @param string $url - строка с Url адресом * @return mixed @@ -112,14 +113,14 @@ public function actionItem(string $url) if ($item) { /** Инициализируем API */ - $api = new ApiService(); - - /** Обновляем данные о предмете через API, если не получится */ - if ($api->renewItemData($item) === false) { - - /** Если не смогли получить предмет из API - Исключительный случай, редирект на страницу списка предметов */ - return $this->redirect('/items', ResponseStatusInterface::REDIRECT_TEMPORARILY_CODE); - } +// $api = new ApiService(); +// +// /** Обновляем данные о предмете через API, если не получится */ +// if ($api->renewItemData($item) === false) { +// +// /** Если не смогли получить предмет из API - Исключительный случай, редирект на страницу списка предметов */ +// return $this->redirect('/items', ResponseStatusInterface::REDIRECT_TEMPORARILY_CODE); +// } /** Ренденирг данных */ return $this->render(self::ACTION_ITEM, ['item' => $item]); From 5ed8f3d9f13da3f9e55493db96d9a1d9783a8bb2 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 14:35:45 +0300 Subject: [PATCH 02/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=92=D1=8B?= =?UTF-8?q?=D0=BF=D0=B8=D0=BB=D0=B5=D0=BD=20ELfinder=20=D1=82.=D0=BA.=20De?= =?UTF-8?q?precated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 3 +- README.md | 12 ++++++- common/interfaces/ApiInterface.php | 2 +- common/services/ApiService.php | 34 ++++++------------ composer.json | 1 - composer.lock | 56 ------------------------------ controllers/ApiController.php | 2 +- 7 files changed, 25 insertions(+), 85 deletions(-) diff --git a/.env.example b/.env.example index 7a6d996a..90ffa9bb 100644 --- a/.env.example +++ b/.env.example @@ -9,7 +9,6 @@ ENVIRONMENT=dev DEBUG_STATUS=false # Database -# --------------------- DB_DSN=mysql:host=localhost;dbname=dev_db DB_NAME=dev_db DB_USER=usr_test @@ -37,5 +36,5 @@ RECAPCHASITEKEY=your_site_key # DSN for log SENTRY_DSN=https://log-url.ru -# Restriced urls +# Restriced urls that should be excepted RESTRICTED_URLS=test1,test2,test \ No newline at end of file diff --git a/README.md b/README.md index c9faa1cd..f14dc821 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![GitHub Actions](https://github.com/PC-Principal/wiki-tarkov/actions/workflows/DockerApp-Actions.yml/badge.svg)](https://github.com/PC-Principal/wiki-tarkov/actions/workflows/DockerApp-Actions.yml) [![Deploy on Prod](https://github.com/V-Power-Inc/wiki-tarkov/actions/workflows/DeployProd.yml/badge.svg)](https://github.com/V-Power-Inc/wiki-tarkov/actions/workflows/DeployProd.yml) ![Site status](https://img.shields.io/badge/site%20status-works-success) -![Stable Version](https://img.shields.io/badge/version-v7.3.31-brightgreen) +![Stable Version](https://img.shields.io/badge/version-v7.3.41-brightgreen) ![Stable branch](https://img.shields.io/badge/Stable%20branch-master-success) ![Tests Count](https://img.shields.io/badge/tests%20count-815-informational) ![Tests Code Coverage](https://img.shields.io/badge/coverage-87%25-success) @@ -206,6 +206,16 @@ Snyk в настоящий момент применяет 2 теста для # Domain Credentials DOMAIN_PROTOCOL=http:// DOMAIN=localhost + + # Recapcha things (Без рекапчи не будет авторизация в админку/отправка форм с сайта, можно отключить проверку в AR моделях) + RECAPCHAKEY=your_custom_secret_key + RECAPCHASITEKEY=your_site_key + + # DSN for log + SENTRY_DSN=https://log-url.ru + + # Restriced urls that should be excepted + RESTRICTED_URLS=test1,test2,test Домен и протокол можно указать и свои, это для продакшена. Мы все равно будем на localhost, когда проект будет развернут через Docker. diff --git a/common/interfaces/ApiInterface.php b/common/interfaces/ApiInterface.php index d4ac782c..4237ace6 100644 --- a/common/interfaces/ApiInterface.php +++ b/common/interfaces/ApiInterface.php @@ -37,7 +37,7 @@ function getBosses(string $map_name = null); * @param ApiForm $model - Объект поисковой формы Api * @return mixed */ - function proccessSearchItem(ApiForm $model); + function processSearchItem(ApiForm $model); /** * Метод для получения квестов торговцев, в качестве параметра используется URL адрес квестов этого приложения diff --git a/common/services/ApiService.php b/common/services/ApiService.php index dc96acd4..02a46069 100644 --- a/common/services/ApiService.php +++ b/common/services/ApiService.php @@ -134,9 +134,9 @@ private function isEmptyBosses(): bool * @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data * being deleted is outdated. * @throws \Throwable in case delete failed. - * @return bool + * @return void */ - private function removeOldBosses(): bool + private function removeOldBosses(): void { /** Задаем SQL запрос переменной - ищем устаревшие записи */ $bosses = Bosses::find()->all(); @@ -145,9 +145,6 @@ private function removeOldBosses(): bool foreach ($bosses as $boss) { $boss->delete(); } - - /** Возвращаем true - если удаление боссов прошло успешно */ - return true; } /** @@ -187,10 +184,10 @@ private function getApiData(bool $encoded = true) * Метод сохраняет данные в таблицу Bosses * * @param array $data - массив с данными о боссах - * @return bool + * @return void * @throws InvalidConfigException */ - private function saveData(array $data): bool + private function saveData(array $data): void { /** Проходим в цикле все полученные карты */ foreach ($data[Api::ATTR_DATA][Api::ATTR_MAPS] as $map) { @@ -210,9 +207,6 @@ private function saveData(array $data): bool /** Логируем что API вернул кривые данные */ LogService::saveErrorData(Yii::$app->request->getUrl(), ErrorDesc::TYPE_ERROR_JSON_ENCODE_API, ErrorDesc::DESC_ERROR_JSON_ENCODE_API); - - /** Возвращаем false - Не удалось сохранить новые данные */ - return false; } /** Передаем название карты в генератор Url */ @@ -221,17 +215,14 @@ private function saveData(array $data): bool /** Сохраняем новый объект данных о боссе */ $model->save(); } - - /** Возвращаем true - если сохранение прошло удачно */ - return true; } /** * Метод проверяет актуальность данных и если они устарели - помечает их на удаление * - * @return bool + * @return void */ - private function setOldBosses(): bool + private function setOldBosses(): void { /** Задаем переменную с выборкой боссов, которые еще актуальны */ $bosses = Bosses::findAll([Bosses::ATTR_OLD => Bosses::FALSE]); @@ -240,9 +231,9 @@ private function setOldBosses(): bool foreach ($bosses as $boss) { /** Дата устаревания записи */ - $date = date('Y-m-d H:i:s', strtotime($boss->date_create . ' +1 month')); + $date = date('Y-m-d H:i:s', strtotime($boss->date_create . ' +2 month')); - /** Если дата записи +1 месяца - меньше текущего времени - запись должна быть помечена на удаление */ + /** Если дата записи +2 месяца - меньше текущего времени - запись должна быть помечена на удаление */ if ($date < date("Y-m-d H:i:s",time())) { /** Устанавливаем флаг старой записи */ @@ -252,9 +243,6 @@ private function setOldBosses(): bool $boss->save(); } } - - /** Возвращаем true если все прошло успешно */ - return true; } /** @@ -343,7 +331,7 @@ public function getTasks(string $url) * @throws \Throwable in case delete failed. * @throws InvalidConfigException */ - public function proccessSearchItem(ApiForm $model) + public function processSearchItem(ApiForm $model) { /** Проверка - если в БД у нас есть эта запись, тогда должны спарсить и обновить */ if (ApiLoot::findItemsByName($model->item_name)) { @@ -439,7 +427,7 @@ private function createNewItems(ApiForm $model): bool $newItem->name = trim($data[Api::ATTR_ITEM_NAME]); $newItem->url = $data[Api::ATTR_NORMALIZED_ITEM_NAME]; - /** Исключение по определенным урлам */ + /** Исключение обновлений по определенным урлам */ if (in_array($newItem->url, explode(',', $_ENV['RESTRICTED_URLS'])) === true) { continue; } @@ -502,7 +490,7 @@ public function setSearchLog(ApiForm $model, int $flag = 0): bool */ private function isEmptyTasks(): bool { - return empty(Tasks::find()->all()) ? true : false; + return empty(Tasks::find()->all()); } /** diff --git a/composer.json b/composer.json index 8017c2ee..c5d6f2b7 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,6 @@ "yiisoft/yii2-bootstrap": "~2.0.4", "yiisoft/yii2-swiftmailer": "~2.1.0", "mihaildev/yii2-ckeditor": "*", - "mihaildev/yii2-elfinder": "*", "himiklab/yii2-recaptcha-widget" : "*", "yiisoft/yii2-imagine": "~2.1.0", "kartik-v/yii2-widget-typeahead": "*", diff --git a/composer.lock b/composer.lock index 1ca2e023..baeec678 100644 --- a/composer.lock +++ b/composer.lock @@ -1218,62 +1218,6 @@ }, "time": "2014-11-19T22:04:08+00:00" }, - { - "name": "mihaildev/yii2-elfinder", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/MihailDev/yii2-elfinder.git", - "reference": "adc705b32f8d64f6bcf97d3c45d0a972c86e372e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MihailDev/yii2-elfinder/zipball/adc705b32f8d64f6bcf97d3c45d0a972c86e372e", - "reference": "adc705b32f8d64f6bcf97d3c45d0a972c86e372e", - "shasum": "" - }, - "require": { - "studio-42/elfinder": "^2.1.10", - "yiisoft/yii2": "~2.0.13", - "yiisoft/yii2-jui": "*" - }, - "type": "yii2-extension", - "extra": { - "asset-installer-paths": { - "npm-asset-library": "vendor/npm", - "bower-asset-library": "vendor/bower" - } - }, - "autoload": { - "psr-4": { - "mihaildev\\elfinder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Mihail", - "email": "mihail.kucher@gmail.com", - "homepage": "https://github.com/MihailDev", - "role": "Developer" - } - ], - "description": "Yii2 ElFinder", - "homepage": "https://github.com/MihailDev/yii2-elfinder", - "keywords": [ - "elfinder", - "filemanager", - "yii" - ], - "support": { - "issues": "https://github.com/MihailDev/yii2-elfinder/issues", - "source": "https://github.com/MihailDev/yii2-elfinder/tree/1.4.0" - }, - "time": "2019-06-07T20:43:53+00:00" - }, { "name": "miloschuman/yii2-highcharts-widget", "version": "v8.0", diff --git a/controllers/ApiController.php b/controllers/ApiController.php index 387635d6..1189b03c 100644 --- a/controllers/ApiController.php +++ b/controllers/ApiController.php @@ -66,7 +66,7 @@ public function actionList() $api = new ApiService(); /** Присваиваем переменной результат работы APIшки */ - $items = $api->proccessSearchItem($form_model); + $items = $api->processSearchItem($form_model); /** Если $items не пустой - тогда логируем запрос с флагом */ if ($items) { From d7c71af54db33b40f51714e4e38a5bb8308e2cb8 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 14:38:07 +0300 Subject: [PATCH 03/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=92=D1=8B?= =?UTF-8?q?=D0=BF=D0=B8=D0=BB=D0=B5=D0=BD=20ELfinder=20=D1=82.=D0=BA.=20De?= =?UTF-8?q?precated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.lock | 707 +++++++++++++++++--------------------------------- 1 file changed, 245 insertions(+), 462 deletions(-) diff --git a/composer.lock b/composer.lock index baeec678..0630e121 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": "5fd334c2055c4d447466e1c081d4165e", + "content-hash": "526f9a7ce8c60aa1c9d4387bd6a20c10", "packages": [ { "name": "bower-asset/bootstrap", @@ -68,37 +68,16 @@ }, { "name": "bower-asset/jquery", - "version": "3.7.1", + "version": "3.6.4", "source": { "type": "git", - "url": "https://github.com/jquery/jquery-dist.git", - "reference": "fde1f76e2799dd877c176abde0ec836553246991" + "url": "git@github.com:jquery/jquery-dist.git", + "reference": "91ef2d8836342875f2519b5815197ea0f23613cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/fde1f76e2799dd877c176abde0ec836553246991", - "reference": "fde1f76e2799dd877c176abde0ec836553246991" - }, - "type": "bower-asset", - "license": [ - "MIT" - ] - }, - { - "name": "bower-asset/jquery-ui", - "version": "1.12.1", - "source": { - "type": "git", - "url": "git@github.com:components/jqueryui.git", - "reference": "44ecf3794cc56b65954cc19737234a3119d036cc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/components/jqueryui/zipball/44ecf3794cc56b65954cc19737234a3119d036cc", - "reference": "44ecf3794cc56b65954cc19737234a3119d036cc" - }, - "require": { - "bower-asset/jquery": ">=1.6" + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/91ef2d8836342875f2519b5815197ea0f23613cf", + "reference": "91ef2d8836342875f2519b5815197ea0f23613cf" }, "type": "bower-asset", "license": [ @@ -273,29 +252,27 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -303,7 +280,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -314,9 +291,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" }, - "time": "2024-01-30T19:34:25+00:00" + "time": "2024-12-07T21:18:45+00:00" }, { "name": "doctrine/lexer", @@ -465,20 +442,20 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.17.0", + "version": "v4.18.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" + "reference": "cb56001e54359df7ae76dc522d08845dc741621b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", - "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/cb56001e54359df7ae76dc522d08845dc741621b", + "reference": "cb56001e54359df7ae76dc522d08845dc741621b", "shasum": "" }, "require": { - "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { "cerdic/css-tidy": "^1.7 || ^2.0", @@ -520,9 +497,9 @@ ], "support": { "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.18.0" }, - "time": "2023-11-17T15:01:25+00:00" + "time": "2024-11-01T03:51:45+00:00" }, { "name": "graham-campbell/result-type", @@ -945,28 +922,28 @@ }, { "name": "jean85/pretty-package-versions", - "version": "2.0.6", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "f9fdd29ad8e6d024f52678b570e5593759b550b4" + "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/f9fdd29ad8e6d024f52678b570e5593759b550b4", - "reference": "f9fdd29ad8e6d024f52678b570e5593759b550b4", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", + "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", "shasum": "" }, "require": { - "composer-runtime-api": "^2.0.0", - "php": "^7.1|^8.0" + "composer-runtime-api": "^2.1.0", + "php": "^7.4|^8.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "jean85/composer-provided-replaced-stub-package": "^1.0", "phpstan/phpstan": "^1.4", - "phpunit/phpunit": "^7.5|^8.5|^9.4", - "vimeo/psalm": "^4.3" + "phpunit/phpunit": "^7.5|^8.5|^9.6", + "vimeo/psalm": "^4.3 || ^5.0" }, "type": "library", "extra": { @@ -998,9 +975,9 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.6" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.0" }, - "time": "2024-03-08T09:58:59+00:00" + "time": "2024-11-18T16:19:46+00:00" }, { "name": "kartik-v/yii2-krajee-base", @@ -1374,16 +1351,16 @@ }, { "name": "php-http/client-common", - "version": "2.7.1", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "1e19c059b0e4d5f717bf5d524d616165aeab0612" + "reference": "0cfe9858ab9d3b213041b947c881d5b19ceeca46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/1e19c059b0e4d5f717bf5d524d616165aeab0612", - "reference": "1e19c059b0e4d5f717bf5d524d616165aeab0612", + "url": "https://api.github.com/repos/php-http/client-common/zipball/0cfe9858ab9d3b213041b947c881d5b19ceeca46", + "reference": "0cfe9858ab9d3b213041b947c881d5b19ceeca46", "shasum": "" }, "require": { @@ -1437,22 +1414,22 @@ ], "support": { "issues": "https://github.com/php-http/client-common/issues", - "source": "https://github.com/php-http/client-common/tree/2.7.1" + "source": "https://github.com/php-http/client-common/tree/2.7.2" }, - "time": "2023-11-30T10:31:25+00:00" + "time": "2024-09-24T06:21:48+00:00" }, { "name": "php-http/discovery", - "version": "1.19.4", + "version": "1.20.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "0700efda8d7526335132360167315fdab3aeb599" + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/0700efda8d7526335132360167315fdab3aeb599", - "reference": "0700efda8d7526335132360167315fdab3aeb599", + "url": "https://api.github.com/repos/php-http/discovery/zipball/82fe4c73ef3363caed49ff8dd1539ba06044910d", + "reference": "82fe4c73ef3363caed49ff8dd1539ba06044910d", "shasum": "" }, "require": { @@ -1516,22 +1493,22 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.19.4" + "source": "https://github.com/php-http/discovery/tree/1.20.0" }, - "time": "2024-03-29T13:00:05+00:00" + "time": "2024-10-02T11:20:13+00:00" }, { "name": "php-http/httplug", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "625ad742c360c8ac580fcc647a1541d29e257f67" + "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67", - "reference": "625ad742c360c8ac580fcc647a1541d29e257f67", + "url": "https://api.github.com/repos/php-http/httplug/zipball/5cad731844891a4c282f3f3e1b582c46839d22f4", + "reference": "5cad731844891a4c282f3f3e1b582c46839d22f4", "shasum": "" }, "require": { @@ -1573,22 +1550,22 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/2.4.0" + "source": "https://github.com/php-http/httplug/tree/2.4.1" }, - "time": "2023-04-14T15:10:03+00:00" + "time": "2024-09-23T11:39:58+00:00" }, { "name": "php-http/message", - "version": "1.16.1", + "version": "1.16.2", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "5997f3289332c699fa2545c427826272498a2088" + "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/5997f3289332c699fa2545c427826272498a2088", - "reference": "5997f3289332c699fa2545c427826272498a2088", + "url": "https://api.github.com/repos/php-http/message/zipball/06dd5e8562f84e641bf929bfe699ee0f5ce8080a", + "reference": "06dd5e8562f84e641bf929bfe699ee0f5ce8080a", "shasum": "" }, "require": { @@ -1642,9 +1619,9 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.16.1" + "source": "https://github.com/php-http/message/tree/1.16.2" }, - "time": "2024-03-07T13:22:09+00:00" + "time": "2024-10-02T11:34:13+00:00" }, { "name": "php-http/message-factory", @@ -2239,74 +2216,6 @@ ], "time": "2023-11-13T11:47:28+00:00" }, - { - "name": "studio-42/elfinder", - "version": "2.1.65", - "source": { - "type": "git", - "url": "https://github.com/Studio-42/elFinder.git", - "reference": "5535a8677558c44a20c19ff9b97ec37702f9c44d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Studio-42/elFinder/zipball/5535a8677558c44a20c19ff9b97ec37702f9c44d", - "reference": "5535a8677558c44a20c19ff9b97ec37702f9c44d", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "suggest": { - "barryvdh/elfinder-flysystem-driver": "VolumeDriver for elFinder to use Flysystem as a root.", - "google/apiclient": "VolumeDriver GoogleDrive require `google/apiclient:^2.0.", - "kunalvarma05/dropbox-php-sdk": "VolumeDriver `Dropbox`2 require `kunalvarma05/dropbox-php-sdk.", - "nao-pon/flysystem-google-drive": "require in GoogleDrive network volume mounting with Flysystem." - }, - "type": "library", - "autoload": { - "classmap": [ - "php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Dmitry Levashov", - "email": "dio@std42.ru", - "homepage": "http://std42.ru" - }, - { - "name": "Troex Nevelin", - "email": "troex@fury.scancode.ru", - "homepage": "http://std42.ru" - }, - { - "name": "Naoki Sawada", - "email": "hypweb+elfinder@gmail.com", - "homepage": "http://xoops.hypweb.net" - }, - { - "name": "Community contributions", - "homepage": "https://github.com/Studio-42/elFinder/contributors" - } - ], - "description": "File manager for web", - "homepage": "http://elfinder.org", - "support": { - "issues": "https://github.com/Studio-42/elFinder/issues", - "source": "https://github.com/Studio-42/elFinder/tree/2.1.65" - }, - "funding": [ - { - "url": "https://github.com/nao-pon", - "type": "github" - } - ], - "time": "2024-01-05T05:01:39+00:00" - }, { "name": "swiftmailer/swiftmailer", "version": "v6.3.0", @@ -2385,16 +2294,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.3", + "version": "v2.5.4", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918", + "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918", "shasum": "" }, "require": { @@ -2402,12 +2311,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2432,7 +2341,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.4" }, "funding": [ { @@ -2448,27 +2357,27 @@ "type": "tidelift" } ], - "time": "2023-01-24T14:02:46+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/http-client", - "version": "v5.4.43", + "version": "v5.4.49", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4d547e5259221bd37685f4ddc8e8947acc2cb755" + "reference": "d77d8e212cde7b5c4a64142bf431522f19487c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4d547e5259221bd37685f4ddc8e8947acc2cb755", - "reference": "4d547e5259221bd37685f4ddc8e8947acc2cb755", + "url": "https://api.github.com/repos/symfony/http-client/zipball/d77d8e212cde7b5c4a64142bf431522f19487c28", + "reference": "d77d8e212cde7b5c4a64142bf431522f19487c28", "shasum": "" }, "require": { "php": ">=7.2.5", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-client-contracts": "^2.5.3", + "symfony/http-client-contracts": "^2.5.4", "symfony/polyfill-php73": "^1.11", "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.0|^2|^3" @@ -2523,7 +2432,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.43" + "source": "https://github.com/symfony/http-client/tree/v5.4.49" }, "funding": [ { @@ -2539,20 +2448,20 @@ "type": "tidelift" } ], - "time": "2024-08-20T14:48:02+00:00" + "time": "2024-11-28T08:37:04+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v2.5.3", + "version": "v2.5.5", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "e5cc97c2b4a4db0ba26bebc154f1426e3fd1d2f1" + "reference": "48ef1d0a082885877b664332b9427662065a360c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/e5cc97c2b4a4db0ba26bebc154f1426e3fd1d2f1", - "reference": "e5cc97c2b4a4db0ba26bebc154f1426e3fd1d2f1", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/48ef1d0a082885877b664332b9427662065a360c", + "reference": "48ef1d0a082885877b664332b9427662065a360c", "shasum": "" }, "require": { @@ -2563,12 +2472,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -2601,7 +2510,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v2.5.3" + "source": "https://github.com/symfony/http-client-contracts/tree/v2.5.5" }, "funding": [ { @@ -2617,20 +2526,20 @@ "type": "tidelift" } ], - "time": "2024-03-26T19:42:53+00:00" + "time": "2024-11-28T08:37:04+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.40", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "bd1afbde6613a8d6b956115e0e14b196191fd0c4" + "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/bd1afbde6613a8d6b956115e0e14b196191fd0c4", - "reference": "bd1afbde6613a8d6b956115e0e14b196191fd0c4", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", + "reference": "74e5b6f0db3e8589e6cfd5efb317a1fc2bb52fb6", "shasum": "" }, "require": { @@ -2670,7 +2579,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.40" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.45" }, "funding": [ { @@ -2686,24 +2595,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -2714,8 +2623,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2749,7 +2658,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -2765,24 +2674,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805" + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c027e6a3c6aee334663ec21f5852e89738abc805", - "reference": "c027e6a3c6aee334663ec21f5852e89738abc805", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/48becf00c920479ca2e910c22a5a39e5d47ca956", + "reference": "48becf00c920479ca2e910c22a5a39e5d47ca956", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-iconv": "*" @@ -2793,8 +2702,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2829,7 +2738,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.31.0" }, "funding": [ { @@ -2845,26 +2754,25 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -2872,8 +2780,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2913,7 +2821,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" }, "funding": [ { @@ -2929,24 +2837,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -2954,8 +2862,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2994,7 +2902,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -3010,24 +2918,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -3038,8 +2946,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3074,7 +2982,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -3090,103 +2998,30 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "10112722600777e02d2745716b70c5db4ca70442" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", - "reference": "10112722600777e02d2745716b70c5db4ca70442", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "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": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.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": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1" + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/ec444d3f3f6505bb28d11afa41e75faadebc10a1", - "reference": "ec444d3f3f6505bb28d11afa41e75faadebc10a1", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb", + "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3223,7 +3058,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.31.0" }, "funding": [ { @@ -3239,30 +3074,30 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3303,7 +3138,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -3319,7 +3154,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/service-contracts", @@ -3612,17 +3447,17 @@ }, "type": "yii2-extension", "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - }, "patches": { - "phpunit/phpunit-mock-objects": { - "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" - }, "phpunit/phpunit": { "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch", "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch" + }, + "phpunit/phpunit-mock-objects": { + "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" } + }, + "branch-alias": { + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3782,19 +3617,19 @@ }, "type": "yii2-extension", "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - }, - "composer-exit-on-patch-failure": true, "patches": { - "phpunit/phpunit-mock-objects": { - "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" - }, "phpunit/phpunit": { "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch", "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch" + }, + "phpunit/phpunit-mock-objects": { + "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" } - } + }, + "branch-alias": { + "dev-master": "2.0.x-dev" + }, + "composer-exit-on-patch-failure": true }, "autoload": { "psr-4": { @@ -3896,59 +3731,6 @@ }, "time": "2018-02-22T11:57:06+00:00" }, - { - "name": "yiisoft/yii2-jui", - "version": "2.0.7", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/yii2-jui.git", - "reference": "ce45c16d4fbbe7d1c516d8d0e8311e07f6138eed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-jui/zipball/ce45c16d4fbbe7d1c516d8d0e8311e07f6138eed", - "reference": "ce45c16d4fbbe7d1c516d8d0e8311e07f6138eed", - "shasum": "" - }, - "require": { - "bower-asset/jquery-ui": "~1.12.1", - "yiisoft/yii2": "~2.0.4" - }, - "type": "yii2-extension", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "yii\\jui\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Qiang Xue", - "email": "qiang.xue@gmail.com" - } - ], - "description": "The Jquery UI extension for the Yii framework", - "keywords": [ - "jQuery UI", - "yii2" - ], - "support": { - "forum": "http://www.yiiframework.com/forum/", - "irc": "irc://irc.freenode.net/yii", - "issues": "https://github.com/yiisoft/yii2-jui/issues", - "source": "https://github.com/yiisoft/yii2-jui", - "wiki": "http://www.yiiframework.com/wiki/" - }, - "time": "2017-11-25T15:32:29+00:00" - }, { "name": "yiisoft/yii2-redis", "version": "2.0.18", @@ -4047,19 +3829,19 @@ }, "type": "yii2-extension", "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - }, - "composer-exit-on-patch-failure": true, "patches": { - "phpunit/phpunit-mock-objects": { - "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" - }, "phpunit/phpunit": { "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch", "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch" + }, + "phpunit/phpunit-mock-objects": { + "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" } - } + }, + "branch-alias": { + "dev-master": "2.1.x-dev" + }, + "composer-exit-on-patch-failure": true }, "autoload": { "psr-4": { @@ -4112,25 +3894,25 @@ "packages-dev": [ { "name": "behat/gherkin", - "version": "v4.9.0", + "version": "v4.10.0", "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4" + "reference": "cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4", - "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6", + "reference": "cbb83c4c435dd8d05a161f2a5ae322e61b2f4db6", "shasum": "" }, "require": { "php": "~7.2|~8.0" }, "require-dev": { - "cucumber/cucumber": "dev-gherkin-22.0.0", + "cucumber/cucumber": "dev-gherkin-24.1.0", "phpunit/phpunit": "~8|~9", - "symfony/yaml": "~3|~4|~5" + "symfony/yaml": "~3|~4|~5|~6|~7" }, "suggest": { "symfony/yaml": "If you want to parse features, represented in YAML files" @@ -4169,9 +3951,9 @@ ], "support": { "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.9.0" + "source": "https://github.com/Behat/Gherkin/tree/v4.10.0" }, - "time": "2021-10-12T13:05:09+00:00" + "time": "2024-10-19T14:46:06+00:00" }, { "name": "bower-asset/typeahead.js", @@ -4589,16 +4371,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.23.1", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", - "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", + "reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5", "shasum": "" }, "require": { @@ -4646,9 +4428,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" + "source": "https://github.com/FakerPHP/Faker/tree/v1.24.1" }, - "time": "2024-01-02T13:46:09+00:00" + "time": "2024-11-21T13:46:39+00:00" }, { "name": "guzzlehttp/guzzle", @@ -4767,16 +4549,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -4815,7 +4597,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -4823,7 +4605,7 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "phar-io/manifest", @@ -4990,16 +4772,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", + "version": "5.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", + "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", "shasum": "" }, "require": { @@ -5008,17 +4790,17 @@ "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7", + "phpstan/phpdoc-parser": "^1.7|^2.0", "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.5", + "mockery/mockery": "~1.3.5 || ~1.6.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" + "psalm/phar": "^5.26" }, "type": "library", "extra": { @@ -5048,29 +4830,29 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.1" }, - "time": "2024-05-21T05:55:05+00:00" + "time": "2024-12-07T09:39:29+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.2", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "153ae662783729388a584b4361f2545e4d841e3c" + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", - "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.13" + "phpstan/phpdoc-parser": "^1.18|^2.0" }, "require-dev": { "ext-tokenizer": "*", @@ -5106,9 +4888,9 @@ "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.8.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" }, - "time": "2024-02-23T11:10:43+00:00" + "time": "2024-11-09T15:12:26+00:00" }, { "name": "phpspec/php-diff", @@ -5153,26 +4935,27 @@ }, { "name": "phpspec/prophecy", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" + "reference": "a0165c648cab6a80311c74ffc708a07bb53ecc93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", - "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/a0165c648cab6a80311c74ffc708a07bb53ecc93", + "reference": "a0165c648cab6a80311c74ffc708a07bb53ecc93", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.* || 8.4.*", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { + "friendsofphp/php-cs-fixer": "^3.40", "phpspec/phpspec": "^6.0 || ^7.0", "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" @@ -5216,36 +4999,36 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.20.0" }, - "time": "2024-02-29T11:52:51+00:00" + "time": "2024-11-19T13:12:41+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.30.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "51b95ec8670af41009e2b2b56873bad96682413e" + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51b95ec8670af41009e2b2b56873bad96682413e", - "reference": "51b95ec8670af41009e2b2b56873bad96682413e", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299", + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "doctrine/annotations": "^2.0", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^5.3.0", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.5", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", "symfony/process": "^5.2" }, "type": "library", @@ -5263,9 +5046,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.30.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0" }, - "time": "2024-09-07T20:13:05+00:00" + "time": "2024-10-13T11:29:49+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6771,12 +6554,12 @@ }, "type": "library", "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, "branch-alias": { "dev-main": "1.1-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -7208,19 +6991,19 @@ }, "type": "yii2-extension", "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - }, - "composer-exit-on-patch-failure": true, "patches": { - "phpunit/phpunit-mock-objects": { - "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" - }, "phpunit/phpunit": { "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch", "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch" + }, + "phpunit/phpunit-mock-objects": { + "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch" } - } + }, + "branch-alias": { + "dev-master": "2.0.x-dev" + }, + "composer-exit-on-patch-failure": true }, "autoload": { "psr-4": { From a8486c6cd9a888f87d903601d793649e67bc42e1 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 14:47:49 +0300 Subject: [PATCH 04/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=92=D1=8B?= =?UTF-8?q?=D0=BF=D0=B8=D0=BB=D0=B5=D0=BD=20ELfinder=20=D1=82.=D0=BA.=20De?= =?UTF-8?q?precated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/admin/views/articles/_form.php | 4 ++-- modules/admin/views/barters/_form.php | 4 ++-- modules/admin/views/catskills/_form.php | 4 ++-- modules/admin/views/doorkeys/_form.php | 6 +++--- modules/admin/views/items/_form.php | 4 ++-- modules/admin/views/maps/_form.php | 4 ++-- modules/admin/views/news/_form.php | 4 ++-- modules/admin/views/questions/_form.php | 4 ++-- modules/admin/views/skills/_form.php | 4 ++-- modules/admin/views/traders/_form.php | 6 +++--- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/modules/admin/views/articles/_form.php b/modules/admin/views/articles/_form.php index 3c78e4b6..851e272a 100644 --- a/modules/admin/views/articles/_form.php +++ b/modules/admin/views/articles/_form.php @@ -6,7 +6,7 @@ use yii\widgets\ActiveForm; use yii\jui\DatePicker; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива use app\modules\admin\controllers\ArticlesController; use app\models\Articles; @@ -40,7 +40,7 @@ field($model, Articles::ATTR_SHORTDESC)->textarea(['rows' => 3]) ?> field($model, Articles::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/barters/_form.php b/modules/admin/views/barters/_form.php index 5e31c1cc..ac77d86e 100644 --- a/modules/admin/views/barters/_form.php +++ b/modules/admin/views/barters/_form.php @@ -6,7 +6,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива /* @var $this yii\web\View */ /* @var $model app\models\Barters */ @@ -29,7 +29,7 @@ field($model, Barters::ATTR_TRADER_GROUP)->dropDownList(Traders::getTradersList(false)) ?> field($model, Barters::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/catskills/_form.php b/modules/admin/views/catskills/_form.php index 95db8cb2..c7867395 100644 --- a/modules/admin/views/catskills/_form.php +++ b/modules/admin/views/catskills/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива /* @var $this yii\web\View */ /* @var $model app\models\Catskills */ @@ -41,7 +41,7 @@
field($model, Catskills::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/doorkeys/_form.php b/modules/admin/views/doorkeys/_form.php index 28f16ed8..11bd0c2c 100644 --- a/modules/admin/views/doorkeys/_form.php +++ b/modules/admin/views/doorkeys/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива /* @var $this yii\web\View */ /* @var $model app\models\Doorkeys */ @@ -56,7 +56,7 @@ ?> field($model, Doorkeys::ATTR_SHORTCONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full', 'height' => '100']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full', 'height' => '100']), ]); ?> @@ -64,7 +64,7 @@
field($model, Doorkeys::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/items/_form.php b/modules/admin/views/items/_form.php index 408ba2d6..1a524de1 100644 --- a/modules/admin/views/items/_form.php +++ b/modules/admin/views/items/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива use yii\helpers\ArrayHelper; use app\models\Category; @@ -44,7 +44,7 @@ field($model, Items::ATTR_SHORTDESC)->textarea(['rows' => 3]) ?> field($model, Items::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/maps/_form.php b/modules/admin/views/maps/_form.php index 3fd56a29..271b390b 100644 --- a/modules/admin/views/maps/_form.php +++ b/modules/admin/views/maps/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива use app\models\Maps; /* @var $this yii\web\View */ @@ -80,7 +80,7 @@ field($model, Maps::ATTR_COORDS_Y)->textInput() ?> field($model, Maps::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/news/_form.php b/modules/admin/views/news/_form.php index ae64d78d..e69693e2 100644 --- a/modules/admin/views/news/_form.php +++ b/modules/admin/views/news/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива /* @var $this yii\web\View */ /* @var $model app\models\News */ @@ -37,7 +37,7 @@ field($model, News::ATTR_SHORTDESC)->textarea(['rows' => 3]) ?> field($model, News::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/questions/_form.php b/modules/admin/views/questions/_form.php index ecfd0e25..63e0baa3 100644 --- a/modules/admin/views/questions/_form.php +++ b/modules/admin/views/questions/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива /* @var $this yii\web\View */ /* @var $model app\models\Questions */ @@ -18,7 +18,7 @@ field($model, Questions::ATTR_TITLE)->textInput(['maxlength' => true]) ?> field($model, Questions::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/skills/_form.php b/modules/admin/views/skills/_form.php index 8663252f..f02b1ac0 100644 --- a/modules/admin/views/skills/_form.php +++ b/modules/admin/views/skills/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива use app\models\Catskills; use yii\helpers\ArrayHelper; @@ -37,7 +37,7 @@ field($model, Skills::ATTR_SHORT_DESC)->textarea(['rows' => 3]) ?> field($model, Skills::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> diff --git a/modules/admin/views/traders/_form.php b/modules/admin/views/traders/_form.php index a4fe72c7..4ddd088e 100644 --- a/modules/admin/views/traders/_form.php +++ b/modules/admin/views/traders/_form.php @@ -4,7 +4,7 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use mihaildev\ckeditor\CKEditor; -use mihaildev\elfinder\ElFinder; +use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива /* @var $this yii\web\View */ /* @var $model app\models\Traders */ @@ -52,12 +52,12 @@
field($model, Traders::ATTR_CONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full', 'height' => '200']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full', 'height' => '200']), ]); ?> field($model, Traders::ATTR_FULLCONTENT)->widget(CKEditor::class,[ - 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), + // 'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => '/'],['preset' => 'full']), ]); ?> From 745066d22c40bb1877b5347eb50662cf1416a2dc Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 14:59:47 +0300 Subject: [PATCH 05/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/services/ApiService.php | 40 ++++++++++++++++++---------------- models/Tasks.php | 6 ++--- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/common/services/ApiService.php b/common/services/ApiService.php index 02a46069..31002b72 100644 --- a/common/services/ApiService.php +++ b/common/services/ApiService.php @@ -272,6 +272,8 @@ private function setTasksQuery(): void * - Если квестов в БД нет или устарели, удалим их * - Если квесты есть и нет устаревших, возвращаем их из базы по урлу торговца * + * UPD 05-01-2025 - Обновление данных отключено на время рефакторинга + * * @param string $url - URL до квестов торговцев * @return mixed * @throws StaleObjectException @@ -281,25 +283,25 @@ private function setTasksQuery(): void public function getTasks(string $url) { /** Проверяем, если записи о квестах устарели или их нет - проводим следующие операции */ - if ($this->isOldTasks() | $this->isEmptyTasks()) { - - /** Удаляем устаревшие записи о квестах */ - $this->removeOldTasks(); - - /** Сетапим запрос для API на получение информации о квестах */ - $this->setTasksQuery(); - - /** Переменная для получения данных о квестах через API */ - $data = $this->getApiData(); - - /** Отправляем массив с данными о квестах в метод, который сохранит их в БД */ - $this->createTasks($data); - - } else if (!$this->isEmptyTasks()) { /** Если таблица с квестами не пуста - помечаем устаревшие записи */ - - /** Помечаем устаревшие квесты */ - $this->setOldTasks(); - } +// if ($this->isOldTasks() | $this->isEmptyTasks()) { +// +// /** Удаляем устаревшие записи о квестах */ +// $this->removeOldTasks(); +// +// /** Сетапим запрос для API на получение информации о квестах */ +// $this->setTasksQuery(); +// +// /** Переменная для получения данных о квестах через API */ +// $data = $this->getApiData(); +// +// /** Отправляем массив с данными о квестах в метод, который сохранит их в БД */ +// $this->createTasks($data); +// +// } else if (!$this->isEmptyTasks()) { /** Если таблица с квестами не пуста - помечаем устаревшие записи */ +// +// /** Помечаем устаревшие квесты */ +// $this->setOldTasks(); +// } /** Получаем данные о квестах из таблицы Tasks */ $result = new TasksResult(Tasks::getTasksData($url)); diff --git a/models/Tasks.php b/models/Tasks.php index 3ccdb10c..971e189b 100644 --- a/models/Tasks.php +++ b/models/Tasks.php @@ -115,12 +115,12 @@ public static function isExists(string $url): bool /** * Метод возвращает все AR объекты квестов для конкретного торговца * - * @param string $url - URL адрес до квестов босса - * @return mixed + * @param string $url - URL адрес до квестов торговца + * @return array */ public static function getTasksData(string $url): array { - return Tasks::findAll([Tasks::ATTR_URL => $url]) ?? false; + return Tasks::findAll([Tasks::ATTR_URL => $url]); } /** From 64f290246fa429c558bb1928b3ce37b3fee1f647 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 15:02:49 +0300 Subject: [PATCH 06/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 1 + composer.lock | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c5d6f2b7..c7954eba 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ "mihaildev/yii2-ckeditor": "*", "himiklab/yii2-recaptcha-widget" : "*", "yiisoft/yii2-imagine": "~2.1.0", + "yiisoft/yii2-jui": "~2.0.0", "kartik-v/yii2-widget-typeahead": "*", "yiisoft/yii2-redis": "~2.0.0", "martyn911/yii2-adblock-detector":"*", diff --git a/composer.lock b/composer.lock index 0630e121..77e79821 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": "526f9a7ce8c60aa1c9d4387bd6a20c10", + "content-hash": "f87ab1cbb3e12907b09ce85f4744b6d3", "packages": [ { "name": "bower-asset/bootstrap", @@ -84,6 +84,27 @@ "MIT" ] }, + { + "name": "bower-asset/jquery-ui", + "version": "1.12.1", + "source": { + "type": "git", + "url": "git@github.com:components/jqueryui.git", + "reference": "44ecf3794cc56b65954cc19737234a3119d036cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/components/jqueryui/zipball/44ecf3794cc56b65954cc19737234a3119d036cc", + "reference": "44ecf3794cc56b65954cc19737234a3119d036cc" + }, + "require": { + "bower-asset/jquery": ">=1.6" + }, + "type": "bower-asset", + "license": [ + "MIT" + ] + }, { "name": "bower-asset/punycode", "version": "v2.3.1", @@ -3731,6 +3752,59 @@ }, "time": "2018-02-22T11:57:06+00:00" }, + { + "name": "yiisoft/yii2-jui", + "version": "2.0.7", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-jui.git", + "reference": "ce45c16d4fbbe7d1c516d8d0e8311e07f6138eed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-jui/zipball/ce45c16d4fbbe7d1c516d8d0e8311e07f6138eed", + "reference": "ce45c16d4fbbe7d1c516d8d0e8311e07f6138eed", + "shasum": "" + }, + "require": { + "bower-asset/jquery-ui": "~1.12.1", + "yiisoft/yii2": "~2.0.4" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\jui\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" + } + ], + "description": "The Jquery UI extension for the Yii framework", + "keywords": [ + "jQuery UI", + "yii2" + ], + "support": { + "forum": "http://www.yiiframework.com/forum/", + "irc": "irc://irc.freenode.net/yii", + "issues": "https://github.com/yiisoft/yii2-jui/issues", + "source": "https://github.com/yiisoft/yii2-jui", + "wiki": "http://www.yiiframework.com/wiki/" + }, + "time": "2017-11-25T15:32:29+00:00" + }, { "name": "yiisoft/yii2-redis", "version": "2.0.18", From 9735aee681ed8e92ff033a9254d9e09538f91b3c Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 15:26:22 +0300 Subject: [PATCH 07/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20Docker=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/php/Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index b06e0a77..ec1f77bc 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -6,8 +6,6 @@ RUN apt update && apt install -y \ mcrypt \ libxpm-dev \ libvpx-dev \ - libldap2-dev \ - unixodbc-dev \ libpq-dev \ libicu-dev \ zlib1g-dev \ @@ -22,8 +20,6 @@ RUN apt update && apt install -y \ COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN pecl install mcrypt-1.0.4 && docker-php-ext-enable mcrypt - # Install required extensions # RUN docker-php-ext-configure mysql RUN docker-php-ext-install pdo pdo_mysql @@ -32,8 +28,6 @@ RUN docker-php-ext-install mbstring RUN docker-php-ext-install zip RUN docker-php-ext-install bcmath -RUN echo "sendmail_path=/usr/sbin/sendmail -t -i" >> /usr/local/etc/php/conf.d/sendmail.ini - RUN set -eux; \ docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp;\ docker-php-ext-install -j "$(nproc)" \ From f50f8479c7fd1bcc9af511eb493af4b905b4fb2e Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 15:50:35 +0300 Subject: [PATCH 08/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20Docker=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/php/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index ec1f77bc..6ac441c9 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -6,7 +6,6 @@ RUN apt update && apt install -y \ mcrypt \ libxpm-dev \ libvpx-dev \ - libpq-dev \ libicu-dev \ zlib1g-dev \ libpng-dev \ @@ -39,5 +38,5 @@ ARG DEBIAN_FRONTEND=noninteractive # Install selected extensions and other stuff RUN apt-get update \ - && apt-get -y --no-install-recommends install apt-utils libxml2-dev gnupg apt-transport-https \ + && apt-get -y --no-install-recommends install apt-utils \ && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \ No newline at end of file From f86a9257315181f5675b2413976be4033adde2ef Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 15:58:37 +0300 Subject: [PATCH 09/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20=D0=B2=D1=8C=D1=8E=D1=85?= =?UTF-8?q?=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D1=81=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D0=B0=20deprecated=20=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/admin/views/news/_form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/admin/views/news/_form.php b/modules/admin/views/news/_form.php index e69693e2..6852519d 100644 --- a/modules/admin/views/news/_form.php +++ b/modules/admin/views/news/_form.php @@ -3,6 +3,7 @@ use app\models\News; use yii\helpers\Html; use yii\widgets\ActiveForm; +use yii\jui\DatePicker; use mihaildev\ckeditor\CKEditor; use mihaildev\elfinder\ElFinder; // TODO: Это Deprecated пакет, нужна альтернатива @@ -41,7 +42,7 @@ ]); ?> - field($model, News::ATTR_DATE_CREATE)->widget(\yii\jui\DatePicker::class, [ + field($model, News::ATTR_DATE_CREATE)->widget(DatePicker::class, [ 'language' => 'ru', 'dateFormat' => 'yyyy-MM-dd', ]) ?> From 069b3323491222c32084c221c4408414c3ad9861 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 16:10:38 +0300 Subject: [PATCH 10/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/services/ApiService.php | 3 ++- controllers/ApiController.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/services/ApiService.php b/common/services/ApiService.php index 31002b72..34a2ce53 100644 --- a/common/services/ApiService.php +++ b/common/services/ApiService.php @@ -429,7 +429,7 @@ private function createNewItems(ApiForm $model): bool $newItem->name = trim($data[Api::ATTR_ITEM_NAME]); $newItem->url = $data[Api::ATTR_NORMALIZED_ITEM_NAME]; - /** Исключение обновлений по определенным урлам */ + /** Исключение обновлений по определенным урлам @todo - В будущем убрать, после полноценного рефакторинга */ if (in_array($newItem->url, explode(',', $_ENV['RESTRICTED_URLS'])) === true) { continue; } @@ -613,6 +613,7 @@ private function setGraphsItemQuery(string $id): bool /** * @param string $id - id предмета из API tarkov.dev * @return string + * @throws InvalidConfigException */ public function getGraphsById(string $id): string { diff --git a/controllers/ApiController.php b/controllers/ApiController.php index 1189b03c..02f78242 100644 --- a/controllers/ApiController.php +++ b/controllers/ApiController.php @@ -152,7 +152,7 @@ public function actionSearch(string $q): string } /** - * Метод возвращает JSON с графиками состояния цен на предмет в прошлых сделках + * Метод возвращает JSON с графиками состояния цен на предмет в прошлых сделках, вызывается из вьюхи предмета API * * @param string $id - id предмета из API tarkov.dev * @return string From 8fdf23df3ab94a107dee14d9f43f57416baba751 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 16:16:01 +0300 Subject: [PATCH 11/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/services/ApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/services/ApiService.php b/common/services/ApiService.php index 34a2ce53..aeef86ba 100644 --- a/common/services/ApiService.php +++ b/common/services/ApiService.php @@ -429,7 +429,7 @@ private function createNewItems(ApiForm $model): bool $newItem->name = trim($data[Api::ATTR_ITEM_NAME]); $newItem->url = $data[Api::ATTR_NORMALIZED_ITEM_NAME]; - /** Исключение обновлений по определенным урлам @todo - В будущем убрать, после полноценного рефакторинга */ + /** Исключение обновлений по определенным урлам todo - В будущем убрать, после полноценного рефакторинга */ if (in_array($newItem->url, explode(',', $_ENV['RESTRICTED_URLS'])) === true) { continue; } From 5a4c8451e24a5099157898e3caa3acaf8b22d72a Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 16:18:36 +0300 Subject: [PATCH 12/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20=D0=BA=D0=BE=D0=BD=D1=84?= =?UTF-8?q?=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/web.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/config/web.php b/config/web.php index ab1ec0cc..8c6c6498 100644 --- a/config/web.php +++ b/config/web.php @@ -17,21 +17,6 @@ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ], - 'controllerMap' => [ - 'elfinder' => [ - 'class' => 'mihaildev\elfinder\Controller', - 'access' => ['@'], //глобальный доступ к фаил менеджеру @ - для авторизорованных , ? - для гостей , чтоб открыть всем ['@', '?'] - 'disabledCommands' => ['netmount'], //отключение ненужных команд https://github.com/Studio-42/elFinder/wiki/Client-configuration-options#commands - 'roots' => [ - [ - 'baseUrl'=>'@web', - 'basePath'=>'@webroot', - 'path' => 'img/upload', - 'name' => 'Upload' - ], - ] - ] - ], 'components' => [ 'request' => [ From aa089994dd5b33087619879e20e8c3efb10a0611 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 16:29:26 +0300 Subject: [PATCH 13/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/services/ApiService.php | 86 +++++++++++++++++++--------------- controllers/ApiController.php | 3 +- models/ApiLoot.php | 2 +- 3 files changed, 52 insertions(+), 39 deletions(-) diff --git a/common/services/ApiService.php b/common/services/ApiService.php index aeef86ba..64eb0b8d 100644 --- a/common/services/ApiService.php +++ b/common/services/ApiService.php @@ -17,6 +17,7 @@ use app\models\{ApiLoot, ApiSearchLogs, Bosses, Tasks}; use app\models\forms\ApiForm; use yii\base\{InvalidArgumentException, InvalidConfigException, ErrorException}; +use yii\db\Exception; use yii\db\StaleObjectException; use yii\helpers\Json; use yii\web\HttpException; @@ -185,7 +186,7 @@ private function getApiData(bool $encoded = true) * * @param array $data - массив с данными о боссах * @return void - * @throws InvalidConfigException + * @throws InvalidConfigException|Exception */ private function saveData(array $data): void { @@ -221,6 +222,7 @@ private function saveData(array $data): void * Метод проверяет актуальность данных и если они устарели - помечает их на удаление * * @return void + * @throws Exception */ private function setOldBosses(): void { @@ -283,6 +285,7 @@ private function setTasksQuery(): void public function getTasks(string $url) { /** Проверяем, если записи о квестах устарели или их нет - проводим следующие операции */ + // TODO: Раскомментить после рефактора // if ($this->isOldTasks() | $this->isEmptyTasks()) { // // /** Удаляем устаревшие записи о квестах */ @@ -325,52 +328,61 @@ public function getTasks(string $url) * - Предмета нет в базе но есть в API * - Есть предмет в базе * + * UPD 05-01-2025 - Не получаем новые предметы на время рефактора + * * @param ApiForm $model - поисковый запрос на получение предмета * - * @return mixed + * @return null|array * @throws StaleObjectException if [[optimisticLock|optimistic locking]] is enabled and the data * being deleted is outdated. * @throws \Throwable in case delete failed. * @throws InvalidConfigException */ - public function processSearchItem(ApiForm $model) + public function processSearchItem(ApiForm $model): ?array { - /** Проверка - если в БД у нас есть эта запись, тогда должны спарсить и обновить */ - if (ApiLoot::findItemsByName($model->item_name)) { - - /** Сперва удалим существующие записи */ - $this->removeItemsByQuery($model->item_name); - - /** Если нам удалось создать новые предметы, возвращаем их в контроллер */ - if ($this->createNewItems($model)) { - - /** Возвращаем в контроллер набор данных, который искали ранее */ - return ApiLoot::findItemsByName($model->item_name); - } - - /** Возвращаем False в контроллер, если в API нет данных */ - return false; + if (!empty($items = ApiLoot::findItemsByName($model->item_name))) { + return $items; + } else { + return null; } - /** Проверка - если в БД у нас нет похожих записей, тогда должны спарсить и создать */ - if (!ApiLoot::findItemsByName($model->item_name)) { - - /** Если нам удалось создать новые предметы, возвращаем их в контроллер */ - if ($this->createNewItems($model)) { - - /** Возвращаем в контроллер набор данных, который искали ранее */ - return ApiLoot::findItemsByName($model->item_name); - } - - /** Возвращаем False в контроллер, если в API нет данных */ - return false; - } - - /** Логируем в БД ошибку */ - LogService::saveErrorData(Yii::$app->request->getUrl(), ErrorDesc::TYPE_SERVER_API_ERROR, ErrorDesc::DESC_SERVER_API_ERROR); - - /** Эксепшн на случай непредвиденных обстоятельств (Мы не должны сюда попадать, т.к. должны по идее остаться в одном из кейсов выше) */ - throw new HttpException(ResponseStatusInterface::SERVER_ERROR_CODE, 'Server error code'); + // TODO: Вернуть к прежнему виду после рефактора +// /** Проверка - если в БД у нас есть эта запись, тогда должны спарсить и обновить */ +// if (ApiLoot::findItemsByName($model->item_name)) { +// +// /** Сперва удалим существующие записи */ +// $this->removeItemsByQuery($model->item_name); +// +// /** Если нам удалось создать новые предметы, возвращаем их в контроллер */ +// if ($this->createNewItems($model)) { +// +// /** Возвращаем в контроллер набор данных, который искали ранее */ +// return ApiLoot::findItemsByName($model->item_name); +// } +// +// /** Возвращаем False в контроллер, если в API нет данных */ +// return false; +// } +// +// /** Проверка - если в БД у нас нет похожих записей, тогда должны спарсить и создать */ +// if (!ApiLoot::findItemsByName($model->item_name)) { +// +// /** Если нам удалось создать новые предметы, возвращаем их в контроллер */ +// if ($this->createNewItems($model)) { +// +// /** Возвращаем в контроллер набор данных, который искали ранее */ +// return ApiLoot::findItemsByName($model->item_name); +// } +// +// /** Возвращаем False в контроллер, если в API нет данных */ +// return false; +// } +// +// /** Логируем в БД ошибку */ +// LogService::saveErrorData(Yii::$app->request->getUrl(), ErrorDesc::TYPE_SERVER_API_ERROR, ErrorDesc::DESC_SERVER_API_ERROR); +// +// /** Эксепшн на случай непредвиденных обстоятельств (Мы не должны сюда попадать, т.к. должны по идее остаться в одном из кейсов выше) */ +// throw new HttpException(ResponseStatusInterface::SERVER_ERROR_CODE, 'Server error code'); } /** diff --git a/controllers/ApiController.php b/controllers/ApiController.php index 02f78242..4c50c8e1 100644 --- a/controllers/ApiController.php +++ b/controllers/ApiController.php @@ -69,7 +69,7 @@ public function actionList() $items = $api->processSearchItem($form_model); /** Если $items не пустой - тогда логируем запрос с флагом */ - if ($items) { + if (!empty($items)) { /** Логируем поисковый запрос пользователя в таблицу логов с флагом найденных предметов */ $api->setSearchLog($form_model, ApiSearchLogs::TRUE); @@ -113,6 +113,7 @@ public function actionItem(string $url) if ($item) { /** Инициализируем API */ + // TODO: Вернуть после рефактора // $api = new ApiService(); // // /** Обновляем данные о предмете через API, если не получится */ diff --git a/models/ApiLoot.php b/models/ApiLoot.php index 2c3a1881..d675b24f 100644 --- a/models/ApiLoot.php +++ b/models/ApiLoot.php @@ -94,7 +94,7 @@ public function attributeLabels() * @param string $name - имя предмета * @return ApiLoot[] */ - public static function findItemsByName(string $name) + public static function findItemsByName(string $name): array { return ApiLoot::find() ->select([ApiLoot::ATTR_JSON, ApiLoot::ATTR_URL]) From 8b441198744d3f50753fe52889838c5b70326e75 Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 16:31:43 +0300 Subject: [PATCH 14/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/services/ApiService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/common/services/ApiService.php b/common/services/ApiService.php index 64eb0b8d..5959bcf8 100644 --- a/common/services/ApiService.php +++ b/common/services/ApiService.php @@ -478,6 +478,7 @@ private function createNewItems(ApiForm $model): bool * @param ApiForm $model - объект модели ApiForm * @param int $flag - флаг, для проверки - вернулись ли данные по запросу или нет * @return bool + * @throws Exception */ public function setSearchLog(ApiForm $model, int $flag = 0): bool { From df4dce16fc6820c74dfa2aca3d60f1ea6230900c Mon Sep 17 00:00:00 2001 From: PC_Principal Date: Sun, 5 Jan 2025 16:47:29 +0300 Subject: [PATCH 15/15] =?UTF-8?q?05-01-2025=D0=B3.=20-=20=D0=A0=D0=B5?= =?UTF-8?q?=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f14dc821..b36524d6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ![Stable branch](https://img.shields.io/badge/Stable%20branch-master-success) ![Tests Count](https://img.shields.io/badge/tests%20count-815-informational) ![Tests Code Coverage](https://img.shields.io/badge/coverage-87%25-success) -![Vulnerabilities Snyk Bitbucket](https://img.shields.io/badge/vulnerabilities-1-red) +![Vulnerabilities Snyk Bitbucket](https://img.shields.io/badge/vulnerabilities-0-success) ![Discord Online](https://img.shields.io/discord/405924890328432652?label=Discord&logo=Discord&color=informational)