Skip to content

Commit

Permalink
Merge pull request #269 from mesilov/dev
Browse files Browse the repository at this point in the history
feature/core-with-credentials
  • Loading branch information
mesilov authored Feb 6, 2022
2 parents 320fb5e + 056ea66 commit 4ab0060
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
- name: "integration tests failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻ '
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻ '
2 changes: 1 addition & 1 deletion .github/workflows/vendor-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
- name: "integration tests failed"
if: ${{ failure() }}
run: |
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻'
echo '::error:: ❗integration tests failed (╯°益°)╯彡┻━┻'
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/core/oauth-examp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('================================');

Expand Down
11 changes: 11 additions & 0 deletions src/Core/CoreBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 4ab0060

Please sign in to comment.