From fa5cd050a1e5eabe6c82ed9df38c5e83587daf96 Mon Sep 17 00:00:00 2001 From: MrDeff Date: Fri, 17 Dec 2021 11:56:25 +0700 Subject: [PATCH 1/2] set credentials from core builder fix example --- examples/core/oauth-examp.php | 2 +- src/Core/CoreBuilder.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/core/oauth-examp.php b/examples/core/oauth-examp.php index 4f2225e1..1e9badd6 100644 --- a/examples/core/oauth-examp.php +++ b/examples/core/oauth-examp.php @@ -44,7 +44,7 @@ static function (\Bitrix24\SDK\Events\AuthTokenRenewedEvent $event) { } ); - $app = new \Bitrix24\SDK\Services\Main($apiClient, $ed, $log); + $app = (new \Bitrix24\SDK\Core\CoreBuilder())->withCredentials($credentials)->withApiClient($apiClient)->build(); $log->debug('================================'); diff --git a/src/Core/CoreBuilder.php b/src/Core/CoreBuilder.php index a56c7b08..d55e4109 100644 --- a/src/Core/CoreBuilder.php +++ b/src/Core/CoreBuilder.php @@ -50,6 +50,17 @@ public function __construct() $this->apiLevelErrorHandler = new ApiLevelErrorHandler($this->logger); } + /** + * @param Credentials $credentials + * + * @return $this + */ + public function withCredentials(Credentials $credentials): self + { + $this->credentials = $credentials; + return $this; + } + /** * @param string $webhookUrl * From bc506db2781a9623e31df359fb051563177962a2 Mon Sep 17 00:00:00 2001 From: mesilov Date: Mon, 7 Feb 2022 00:30:35 +0300 Subject: [PATCH 2/2] bump CHANGELOG.md Signed-off-by: mesilov --- .github/workflows/integration.yml | 2 +- .github/workflows/vendor-check.yml | 2 +- CHANGELOG.md | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 4fa9ca09..0137cbe9 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -58,4 +58,4 @@ jobs: - name: "integration tests failed" if: ${{ failure() }} run: | - echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻ ' \ No newline at end of file + echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻ ' \ No newline at end of file diff --git a/.github/workflows/vendor-check.yml b/.github/workflows/vendor-check.yml index de29fada..2ec82413 100644 --- a/.github/workflows/vendor-check.yml +++ b/.github/workflows/vendor-check.yml @@ -57,4 +57,4 @@ jobs: - name: "integration tests failed" if: ${{ failure() }} run: | - echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻' \ No newline at end of file + echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻' \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ff37d69..b3c3de61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ # bitrix24-php-sdk change log -## 2.0-alpha.6 — 20.01.2021 +## 2.0-alpha.6 — 7.02.2021 ### Added * add «fast» batch-query without counting elements in result - recordset [Добавить поддержку выгрузки большого количества данных без подсчёта элементов (-1](https://github.com/mesilov/bitrix24-php-sdk/issues/248) + recordset [Добавить поддержку выгрузки большого количества данных без подсчёта элементов -1](https://github.com/mesilov/bitrix24-php-sdk/issues/248) +* add `Credentials` in CoreBuilder [set credentials from core builder](https://github.com/mesilov/bitrix24-php-sdk/pull/246) * add method `Core\Batch::deleteEntityItems` for delete items in batch mode and integration test * add integration test for read strategy `FilterWithBatchWithoutCountOrderTest` * add type check in method `Core\Batch::deleteEntityItems` - only integer id allowed @@ -19,7 +20,7 @@ * add `Bitrix24\SDK\Core\BulkItemsReader` for data-intensive applications for bulk export data from Bitrix24, read strategies located in folder `ReadStrategies`, in services read model **must** use most effective read strategy. * add integration tests in GitHub Actions pipeline 🎉, now integration tests run on push on `dev-branch` -* add incoming webhook for run integration tests `vendor-check.yml` from vendor CI\CD pipeline +* add incoming webhook for run integration tests `vendor-check.yml` from vendor CI\CD pipeline ### Changed