Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 056ea66

Browse files
authored
Merge pull request #246 from mesilov/feature/core-with-credentials
set credentials from core builder
2 parents 320fb5e + bc506db commit 056ea66

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858
- name: "integration tests failed"
5959
if: ${{ failure() }}
6060
run: |
61-
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻ '
61+
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻ '

.github/workflows/vendor-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
- name: "integration tests failed"
5858
if: ${{ failure() }}
5959
run: |
60-
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻'
60+
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻'

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# bitrix24-php-sdk change log
22

3-
## 2.0-alpha.6 — 20.01.2021
3+
## 2.0-alpha.6 — 7.02.2021
44

55
### Added
66

77
* add «fast» batch-query without counting elements in result
8-
recordset [Добавить поддержку выгрузки большого количества данных без подсчёта элементов (-1](https://github.com/mesilov/bitrix24-php-sdk/issues/248)
8+
recordset [Добавить поддержку выгрузки большого количества данных без подсчёта элементов -1](https://github.com/mesilov/bitrix24-php-sdk/issues/248)
9+
* add `Credentials` in CoreBuilder [set credentials from core builder](https://github.com/mesilov/bitrix24-php-sdk/pull/246)
910
* add method `Core\Batch::deleteEntityItems` for delete items in batch mode and integration test
1011
* add integration test for read strategy `FilterWithBatchWithoutCountOrderTest`
1112
* add type check in method `Core\Batch::deleteEntityItems` - only integer id allowed
@@ -19,7 +20,7 @@
1920
* add `Bitrix24\SDK\Core\BulkItemsReader` for data-intensive applications for bulk export data from Bitrix24, read strategies located in
2021
folder `ReadStrategies`, in services read model **must** use most effective read strategy.
2122
* add integration tests in GitHub Actions pipeline 🎉, now integration tests run on push on `dev-branch`
22-
* add incoming webhook for run integration tests `vendor-check.yml` from vendor CI\CD pipeline
23+
* add incoming webhook for run integration tests `vendor-check.yml` from vendor CI\CD pipeline
2324

2425
### Changed
2526

examples/core/oauth-examp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static function (\Bitrix24\SDK\Events\AuthTokenRenewedEvent $event) {
4444
}
4545
);
4646

47-
$app = new \Bitrix24\SDK\Services\Main($apiClient, $ed, $log);
47+
$app = (new \Bitrix24\SDK\Core\CoreBuilder())->withCredentials($credentials)->withApiClient($apiClient)->build();
4848

4949
$log->debug('================================');
5050

src/Core/CoreBuilder.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ public function __construct()
5050
$this->apiLevelErrorHandler = new ApiLevelErrorHandler($this->logger);
5151
}
5252

53+
/**
54+
* @param Credentials $credentials
55+
*
56+
* @return $this
57+
*/
58+
public function withCredentials(Credentials $credentials): self
59+
{
60+
$this->credentials = $credentials;
61+
return $this;
62+
}
63+
5364
/**
5465
* @param string $webhookUrl
5566
*

0 commit comments

Comments
 (0)