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

Commit f0edf74

Browse files
committed
Merge branch 'dev' into feature/core-with-credentials
2 parents fa5cd05 + 320fb5e commit f0edf74

File tree

90 files changed

+4196
-533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+4196
-533
lines changed

.github/workflows/integration.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "Integration tests"
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
9+
env:
10+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
11+
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK: ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
12+
TEST2_ENV: 12345
13+
14+
jobs:
15+
tests:
16+
name: "Integration tests"
17+
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
php-version:
23+
- "7.4"
24+
dependencies: [ highest ]
25+
26+
steps:
27+
28+
- name: "Checkout"
29+
uses: "actions/checkout@v2"
30+
31+
- name: "Install PHP"
32+
uses: "shivammathur/setup-php@v2"
33+
with:
34+
coverage: "none"
35+
php-version: "${{ matrix.php-version }}"
36+
ini-values: variables_order=EGPCS
37+
env:
38+
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK: ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
39+
TEST2_ENV: 12345
40+
41+
- name: "Install dependencies"
42+
run: |
43+
composer update ${{ env.COMPOSER_FLAGS }}
44+
45+
- name: "Debug ENV variables"
46+
run: |
47+
printenv
48+
49+
- name: "Run integration tests"
50+
run: |
51+
composer phpunit-run-integration-tests
52+
53+
- name: "integration tests succeeded"
54+
if: ${{ success() }}
55+
run: |
56+
echo '✅ integration tests pass, congratulations!'
57+
58+
- name: "integration tests failed"
59+
if: ${{ failure() }}
60+
run: |
61+
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻ '

.github/workflows/phpstan.yml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,49 @@ on:
55
name: PHPStan checks
66

77
jobs:
8-
phpstan:
9-
name: PHPStan
8+
static-analysis:
9+
name: "PHPStan"
10+
runs-on: "ubuntu-latest"
1011

11-
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-version:
16+
- "7.4"
17+
- "8.0"
18+
dependencies:
19+
- "lowest"
20+
- "highest"
1221

1322
steps:
1423
- name: "Checkout"
15-
uses: actions/checkout@v2
24+
uses: "actions/checkout@v2"
1625

17-
- name: PHPStan
18-
uses: docker://oskarstark/phpstan-ga
26+
- name: "Install PHP"
27+
uses: "shivammathur/setup-php@v2"
1928
with:
20-
args: analyse
29+
coverage: "none"
30+
php-version: "${{ matrix.php-version }}"
31+
extensions: mbstring
32+
tools: composer:v2
33+
34+
- name: "Install lowest dependencies"
35+
if: ${{ matrix.dependencies == 'lowest' }}
36+
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
37+
38+
- name: "Install highest dependencies"
39+
if: ${{ matrix.dependencies == 'highest' }}
40+
run: "composer update --no-interaction --no-progress --no-suggest"
41+
42+
- name: "PHPStan"
43+
run: "composer phpstan-analyse"
44+
45+
- name: "is PHPStan check succeeded"
46+
if: ${{ success() }}
47+
run: |
48+
echo '✅ PHPStan check pass, congratulations!'
49+
50+
- name: "is PHPStan check failed"
51+
if: ${{ failure() }}
52+
run: |
53+
echo '::error:: ❗️ PHPStan check failed (╯°益°)╯彡┻━┻'

.github/workflows/phpunit.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,15 @@ jobs:
3333
run: |
3434
composer update ${{ env.COMPOSER_FLAGS }}
3535
36-
- name: "Run tests"
37-
run: "composer exec phpunit -- --verbose"
36+
- name: "run unit tests"
37+
run: "composer phpunit-run-unit-tests"
3838

39-
- name: Run test suite
40-
run: composer run-script unit-tests
39+
- name: "is unit tests tests succeeded"
40+
if: ${{ success() }}
41+
run: |
42+
echo '✅ unit tests pass, congratulations!'
43+
44+
- name: "is unit tests tests failed"
45+
if: ${{ failure() }}
46+
run: |
47+
echo '::error:: ❗️ unit tests tests failed (╯°益°)╯彡┻━┻'

.github/workflows/vendor-check.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Vendor integration tests"
2+
3+
on:
4+
# run integration tests from vendor CI\CD pipeline with webhook
5+
repository_dispatch:
6+
types: [ run_vendor_integration_tests ]
7+
8+
env:
9+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
10+
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK: ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
11+
TEST2_ENV: 12345
12+
13+
jobs:
14+
tests:
15+
name: "Vendor integration tests"
16+
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
php-version:
22+
- "7.4"
23+
dependencies: [ highest ]
24+
25+
steps:
26+
27+
- name: "Checkout"
28+
uses: "actions/checkout@v2"
29+
30+
- name: "Install PHP"
31+
uses: "shivammathur/setup-php@v2"
32+
with:
33+
coverage: "none"
34+
php-version: "${{ matrix.php-version }}"
35+
ini-values: variables_order=EGPCS
36+
env:
37+
BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK: ${{ secrets.BITRIX24_PHP_SDK_PLAYGROUND_WEBHOOK }}
38+
TEST2_ENV: 12345
39+
40+
- name: "Install dependencies"
41+
run: |
42+
composer update ${{ env.COMPOSER_FLAGS }}
43+
44+
- name: "Debug ENV variables"
45+
run: |
46+
printenv
47+
48+
- name: "Run integration tests"
49+
run: |
50+
composer phpunit-run-integration-tests
51+
52+
- name: "integration tests succeeded"
53+
if: ${{ success() }}
54+
run: |
55+
echo '✅ integration tests pass, congratulations!'
56+
57+
- name: "integration tests failed"
58+
if: ${{ failure() }}
59+
run: |
60+
echo '::error:: ❗️iteintegration tests failed (╯°益°)╯彡┻━┻'

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ composer.lock
55
.phpunit.result.cache
66
tools/.env.local
77
tools/logs
8-
examples/logs
8+
examples/logs
9+
.env.local

CHANGELOG.md

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

3-
## 2.0-alpha.3(14.11.2021)
3+
## 2.0-alpha.6 — 20.01.2021
4+
5+
### Added
6+
7+
* add «fast» batch-query without counting elements in result
8+
recordset [Добавить поддержку выгрузки большого количества данных без подсчёта элементов (-1](https://github.com/mesilov/bitrix24-php-sdk/issues/248)
9+
* add method `Core\Batch::deleteEntityItems` for delete items in batch mode and integration test
10+
* add integration test for read strategy `FilterWithBatchWithoutCountOrderTest`
11+
* add type check in method `Core\Batch::deleteEntityItems` - only integer id allowed
12+
* add interface `Core\Contracts\DeletedItemResultInterface`
13+
* add in scope «CRM» `Services\CRM\Deal\Service\Batch::delete` batch delete deals
14+
* add `symfony/stopwatch` component for integration tests
15+
* add `/Infrastructure/HttpClient/TransportLayer/NetworkTimingsParser` for parse `curl_info` network data structures for debug logs
16+
in `Bitrix24\SDK\Core\Response::__destruct()`
17+
* add `/Infrastructure/HttpClient/TransportLayer/ResponseInfoParser` for parse `bitrix24_rest_api` timing info for debug logs
18+
in `Bitrix24\SDK\Core\Response::__destruct()`
19+
* add `Bitrix24\SDK\Core\BulkItemsReader` for data-intensive applications for bulk export data from Bitrix24, read strategies located in
20+
folder `ReadStrategies`, in services read model **must** use most effective read strategy.
21+
* 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+
24+
### Changed
25+
26+
* switch `symfony/http-client` to `5.4.*` version requirement.
27+
* switch `symfony/http-client-contracts` to `^2.5` version requirement.
28+
* switch `symfony/event-dispatcher` to `5.4.*` version requirement.
29+
* switch `ramsey/uuid` to `^4.2.3` version requirement.
30+
31+
## 2.0-alpha.5 – 28.11.2021
32+
33+
### Added
34+
35+
* add method `countByFilter` for all related services, see
36+
issue [Добавить для всех сущностей метод подсчёта количества элементов по фильтру #228](https://github.com/mesilov/bitrix24-php-sdk/issues/228)
37+
* add in scope «CRM» Userfield service and integration test
38+
* add in scope «CRM» ContactUserfield service and integration test, see
39+
issue [Добавить сервис по работе с юзерфилдами контакта #231](https://github.com/mesilov/bitrix24-php-sdk/issues/231)
40+
* add method getUserfieldByFieldName for `ContactItemResult`
41+
* add in scope «CRM» DealUserfield service and integration test, see
42+
issue [Добавить сервис по работе с юзерфилдами cделки #232](https://github.com/mesilov/bitrix24-php-sdk/issues/232)
43+
* add method getUserfieldByFieldName for `DealItemResult`
44+
* add exception `UserfieldNotFoundException`
45+
46+
### Removed
47+
48+
* remove all `0.*` and `1.*` code from `2.*` branch
49+
50+
### Changed
51+
52+
* update type definition for `ContactItemResult`, now return types will be cast to real types: DateTimeInterface, int, boolean etc
53+
54+
## 2.0-alpha.4 – 25.11.2021
55+
56+
### Changed
57+
58+
* switch `symfony/http-client` to `5.3` version requirement.
59+
* switch `symfony/http-client-contracts` to `^2.4` version requirement.
60+
* switch `symfony/event-dispatcher` to `5.3.*` version requirement.
61+
* switch `ramsey/uuid` to `^4.0` version requirement.
62+
63+
### Fixed
64+
65+
* issue [Несовместимость с Laravel 8 #224](https://github.com/mesilov/bitrix24-php-sdk/issues/224)
66+
67+
## 2.0-alpha.3 – 14.11.2021
468

569
* add php8 version support
670
* change in scope «CRM» Product service and integration tests
@@ -11,7 +75,7 @@
1175
* bump phpunit version
1276
* bump phpstan version
1377

14-
## 2.0-alpha.2 (31.01.2021)
78+
## 2.0-alpha.2 31.01.2021
1579

1680
* remove Travis CI and migrate to Github Actions
1781
* add unit-tests in independent github action
@@ -26,7 +90,7 @@
2690
* add in scope «IM» IM service and integration test
2791
* add in default scope «Main» default service
2892

29-
## 2.0-alpha.1 (11.07.2020)
93+
## 2.0-alpha.1 11.07.2020
3094

3195
* remove all v1 code
3296
* migrate to Symfony HttpClient
@@ -35,6 +99,7 @@
3599
* add Events support
36100

37101
## 0.1.0 (14.11.2021)
102+
38103
branch version 1.x – bugfix and security releases only
39104

40105
## 0.7.0 (11.07.2020)

0 commit comments

Comments
 (0)